summaryrefslogtreecommitdiff
path: root/src/gui/search/SearchController.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-07-25 23:43:25 (GMT)
committer jacob1 <jfu614@gmail.com>2013-07-25 23:43:25 (GMT)
commitbfc1cf99cabd5b75f70a8de39cc4b00c408fc6b8 (patch)
tree644bbe8435b3f31c738325cf55419860dd9fa6f4 /src/gui/search/SearchController.cpp
parentbeff3db8d291b00b47fc13a1b936fa4419e3d78d (diff)
downloadpowder-bfc1cf99cabd5b75f70a8de39cc4b00c408fc6b8.zip
powder-bfc1cf99cabd5b75f70a8de39cc4b00c408fc6b8.tar.gz
instant save option option, hold ctrl when clicking a save in the save preview to skip the entire preview and not load the comments
Diffstat (limited to 'src/gui/search/SearchController.cpp')
-rw-r--r--src/gui/search/SearchController.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/search/SearchController.cpp b/src/gui/search/SearchController.cpp
index 0a8ad9e..bd3e4d8 100644
--- a/src/gui/search/SearchController.cpp
+++ b/src/gui/search/SearchController.cpp
@@ -36,6 +36,7 @@ SearchController::SearchController(ControllerCallback * callback):
HasExited(false),
nextQueryTime(0.0f),
nextQueryDone(true),
+ instantOpen(false),
searchModel(NULL)
{
searchModel = new SearchModel();
@@ -46,9 +47,6 @@ SearchController::SearchController(ControllerCallback * callback):
searchModel->UpdateSaveList(1, "");
this->callback = callback;
-
- //Set up interface
- //windowPanel.AddChild();
}
SaveInfo * SearchController::GetLoadedSave()
@@ -180,13 +178,18 @@ void SearchController::Selected(int saveID, bool selected)
searchModel->DeselectSave(saveID);
}
+void SearchController::InstantOpen(bool instant)
+{
+ instantOpen = instant;
+}
+
void SearchController::OpenSave(int saveID)
{
if(activePreview)
delete activePreview;
Graphics * g = ui::Engine::Ref().g;
g->fillrect(XRES/3, YRES+MENUSIZE-20, XRES/3, 20, 0, 0, 0, 150); //dim the "Page X of Y" a little to make the CopyTextButton more noticeable
- activePreview = new PreviewController(saveID, new OpenCallback(this));
+ activePreview = new PreviewController(saveID, instantOpen, new OpenCallback(this));
ui::Engine::Ref().ShowWindow(activePreview->GetView());
}
@@ -196,7 +199,7 @@ void SearchController::OpenSave(int saveID, int saveDate)
delete activePreview;
Graphics * g = ui::Engine::Ref().g;
g->fillrect(XRES/3, YRES+MENUSIZE-20, XRES/3, 20, 0, 0, 0, 150); //dim the "Page X of Y" a little to make the CopyTextButton more noticeable
- activePreview = new PreviewController(saveID, saveDate, new OpenCallback(this));
+ activePreview = new PreviewController(saveID, saveDate, instantOpen, new OpenCallback(this));
ui::Engine::Ref().ShowWindow(activePreview->GetView());
}