summaryrefslogtreecommitdiff
path: root/src/search/SearchView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/search/SearchView.cpp')
-rw-r--r--src/search/SearchView.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/search/SearchView.cpp b/src/search/SearchView.cpp
index 57e5558..e589d20 100644
--- a/src/search/SearchView.cpp
+++ b/src/search/SearchView.cpp
@@ -178,6 +178,16 @@ void SearchView::NotifySaveListChanged(SearchModel * sender)
buttonAreaHeight = Size.Y - buttonYOffset - 18;
buttonWidth = (buttonAreaWidth/savesX) - buttonPadding*2;
buttonHeight = (buttonAreaHeight/savesY) - buttonPadding*2;
+ class SaveOpenAction: public ui::SaveButtonAction
+ {
+ SearchView * v;
+ public:
+ SaveOpenAction(SearchView * _v) { v = _v; }
+ virtual void ActionCallback(ui::SaveButton * sender)
+ {
+ v->c->OpenSave(sender->GetSave()->GetID());
+ }
+ };
for(i = 0; i < saves.size(); i++)
{
if(saveX == savesX)
@@ -195,6 +205,7 @@ void SearchView::NotifySaveListChanged(SearchModel * sender)
),
ui::Point(buttonWidth, buttonHeight),
saves[i]);
+ saveButton->SetActionCallback(new SaveOpenAction(this));
saveButtons.push_back(saveButton);
AddComponent(saveButton);
saveX++;