If you don't assign the callback, it won't be called
This commit is contained in:
parent
7629c98f22
commit
a43463b137
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "lua/CommandInterface.h"
|
#include "lua/CommandInterface.h"
|
||||||
|
|
||||||
ConsoleController::ConsoleController(std::function<void ()> onDone, CommandInterface * commandInterface):
|
ConsoleController::ConsoleController(std::function<void ()> onDone_, CommandInterface * commandInterface):
|
||||||
HasDone(false)
|
HasDone(false)
|
||||||
{
|
{
|
||||||
consoleModel = new ConsoleModel();
|
consoleModel = new ConsoleModel();
|
||||||
@ -15,7 +15,7 @@ ConsoleController::ConsoleController(std::function<void ()> onDone, CommandInter
|
|||||||
consoleView->AttachController(this);
|
consoleView->AttachController(this);
|
||||||
consoleModel->AddObserver(consoleView);
|
consoleModel->AddObserver(consoleView);
|
||||||
|
|
||||||
this->onDone = onDone;
|
onDone = onDone_;
|
||||||
this->commandInterface = commandInterface;
|
this->commandInterface = commandInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ SearchController::SearchController(std::function<void ()> onDone_):
|
|||||||
|
|
||||||
searchModel->UpdateSaveList(1, "");
|
searchModel->UpdateSaveList(1, "");
|
||||||
|
|
||||||
onDone = onDone;
|
onDone = onDone_;
|
||||||
}
|
}
|
||||||
|
|
||||||
SaveInfo * SearchController::GetLoadedSave()
|
SaveInfo * SearchController::GetLoadedSave()
|
||||||
|
@ -438,7 +438,7 @@ void SearchView::NotifyTagListChanged(SearchModel * sender)
|
|||||||
ui::Point(tagWidth, tagHeight),
|
ui::Point(tagWidth, tagHeight),
|
||||||
tag.first.FromUtf8()
|
tag.first.FromUtf8()
|
||||||
);
|
);
|
||||||
tagButton->SetActionCallback({ [this, &tag] {
|
tagButton->SetActionCallback({ [this, tag] {
|
||||||
Search(tag.first.FromUtf8());
|
Search(tag.first.FromUtf8());
|
||||||
} });
|
} });
|
||||||
tagButton->Appearance.BorderInactive = ui::Colour(0, 0, 0);
|
tagButton->Appearance.BorderInactive = ui::Colour(0, 0, 0);
|
||||||
|
@ -83,7 +83,7 @@ void TagsView::NotifyTagsChanged(TagsModel * sender)
|
|||||||
tempButton->Appearance.Margin.Top += 2;
|
tempButton->Appearance.Margin.Top += 2;
|
||||||
tempButton->Appearance.HorizontalAlign = ui::Appearance::AlignCentre;
|
tempButton->Appearance.HorizontalAlign = ui::Appearance::AlignCentre;
|
||||||
tempButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
tempButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle;
|
||||||
tempButton->SetActionCallback({ [this, &tag] { c->RemoveTag(tag); } });
|
tempButton->SetActionCallback({ [this, tag] { c->RemoveTag(tag); } });
|
||||||
tags.push_back(tempButton);
|
tags.push_back(tempButton);
|
||||||
AddComponent(tempButton);
|
AddComponent(tempButton);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user