summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-27 19:06:17 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-27 19:06:17 (GMT)
commit5befe5c25f8f188e7588de44ab2c8bead22ae999 (patch)
tree643b02af217770c1a3156be03e01442557795760 /src/game/GameController.cpp
parentf8ca8af387b8611c18ca7c5357efd19c8bc28941 (diff)
downloadpowder-5befe5c25f8f188e7588de44ab2c8bead22ae999.zip
powder-5befe5c25f8f188e7588de44ab2c8bead22ae999.tar.gz
Local file browser + some more interesting things like Progress bar UI component
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 4d13e52..db23bb8 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -16,6 +16,7 @@
#include "elementsearch/ElementSearchActivity.h"
#include "update/UpdateActivity.h"
#include "Notification.h"
+#include "filebrowser/FileBrowserActivity.h"
using namespace std;
@@ -523,6 +524,32 @@ void GameController::OpenSearch()
ui::Engine::Ref().ShowWindow(search->GetView());
}
+void GameController::OpenLocalSaveWindow()
+{
+
+}
+
+void GameController::LoadSaveFile(SaveFile * file)
+{
+ gameModel->SetSaveFile(file);
+}
+
+void GameController::OpenLocalBrowse()
+{
+ class LocalSaveOpenCallback: public FileSelectedCallback
+ {
+ GameController * c;
+ public:
+ LocalSaveOpenCallback(GameController * _c): c(_c) {}
+ virtual ~LocalSaveOpenCallback() {};
+ virtual void FileSelected(SaveFile* file)
+ {
+ c->LoadSaveFile(file);
+ }
+ };
+ new FileBrowserActivity(LOCAL_SAVE_DIR PATH_SEP, new LocalSaveOpenCallback(this));
+}
+
void GameController::OpenLogin()
{
loginWindow = new LoginController(new LoginCallback(this));