From 05135198fd5b214eb85ea49749d8a333be5aa3e5 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 1 Jan 2016 16:27:46 -1000 Subject: [PATCH] Update submodules --- Editor/SplashScreen.cpp | 13 ++++++++++++- Editor/SplashScreen.hpp | 21 ++++++++++++++++++--- Editor/ViewManager.cpp | 13 ++++++++++++- Editor/ViewManager.hpp | 10 ++++++++++ hecl | 2 +- libSpecter | 2 +- 6 files changed, 54 insertions(+), 7 deletions(-) diff --git a/Editor/SplashScreen.cpp b/Editor/SplashScreen.cpp index 9575daeb8..36b384c74 100644 --- a/Editor/SplashScreen.cpp +++ b/Editor/SplashScreen.cpp @@ -168,7 +168,18 @@ void SplashScreen::touchMove(const boo::STouchCoord& coord, uintptr_t tid) void SplashScreen::charKeyDown(unsigned long charCode, boo::EModifierKey mods, bool isRepeat) { - skipBuildInAnimation(); + if (skipBuildInAnimation()) + return; + if (m_fileBrowser.m_view) + m_fileBrowser.m_view->charKeyDown(charCode, mods, isRepeat); +} + +void SplashScreen::specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat) +{ + if (skipBuildInAnimation()) + return; + if (m_fileBrowser.m_view) + m_fileBrowser.m_view->specialKeyDown(key, mods, isRepeat); } void SplashScreen::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub) diff --git a/Editor/SplashScreen.hpp b/Editor/SplashScreen.hpp index 2b61be0f5..cd98df120 100644 --- a/Editor/SplashScreen.hpp +++ b/Editor/SplashScreen.hpp @@ -9,6 +9,8 @@ namespace RUDE { +static LogVisor::LogModule Log("Specter::SplashScreen"); + class SplashScreen : public Specter::ModalWindow { ViewManager& m_vm; @@ -40,7 +42,11 @@ class SplashScreen : public Specter::ModalWindow m_splash.m_fileBrowser.m_view.reset( new Specter::FileBrowser(m_splash.rootView().viewRes(), m_splash, m_splash.m_newString, - Specter::FileBrowser::Type::SaveFile)); + Specter::FileBrowser::Type::SaveFile, + [](bool, const HECL::SystemString& path) + { + Log.report(LogVisor::Info, _S("Making project '%s'"), path.c_str()); + })); m_splash.updateSize(); m_splash.m_newButt.mouseLeave(coord); } @@ -57,7 +63,11 @@ class SplashScreen : public Specter::ModalWindow m_splash.m_fileBrowser.m_view.reset( new Specter::FileBrowser(m_splash.rootView().viewRes(), m_splash, m_splash.m_openString, - Specter::FileBrowser::Type::OpenHECLProject)); + Specter::FileBrowser::Type::OpenHECLProject, + [](bool, const HECL::SystemString& path) + { + Log.report(LogVisor::Info, _S("Opening project '%s'"), path.c_str()); + })); m_splash.updateSize(); m_splash.m_openButt.mouseLeave(coord); } @@ -74,7 +84,11 @@ class SplashScreen : public Specter::ModalWindow m_splash.m_fileBrowser.m_view.reset( new Specter::FileBrowser(m_splash.rootView().viewRes(), m_splash, m_splash.m_extractString, - Specter::FileBrowser::Type::OpenFile)); + Specter::FileBrowser::Type::OpenFile, + [](bool, const HECL::SystemString& path) + { + Log.report(LogVisor::Info, _S("Extracting game '%s'"), path.c_str()); + })); m_splash.updateSize(); m_splash.m_extractButt.mouseLeave(coord); } @@ -95,6 +109,7 @@ public: void touchUp(const boo::STouchCoord&, uintptr_t); void touchMove(const boo::STouchCoord&, uintptr_t); void charKeyDown(unsigned long, boo::EModifierKey, bool); + void specialKeyDown(boo::ESpecialKey, boo::EModifierKey, bool); void resized(const boo::SWindowRect& root, const boo::SWindowRect& sub); void draw(boo::IGraphicsCommandQueue* gfxQ); diff --git a/Editor/ViewManager.cpp b/Editor/ViewManager.cpp index e8bec9535..d8ffdde85 100644 --- a/Editor/ViewManager.cpp +++ b/Editor/ViewManager.cpp @@ -43,7 +43,8 @@ void ViewManager::SetupEditorView() } ViewManager::ViewManager(HECL::Runtime::FileStoreManager& fileMgr, HECL::CVarManager& cvarMgr) -: m_cvarManager(cvarMgr), m_fontCache(fileMgr), m_translator(RUDE::SystemLocaleOrEnglish()), +: m_fileStoreManager(fileMgr), m_cvarManager(cvarMgr), + m_fontCache(fileMgr), m_translator(RUDE::SystemLocaleOrEnglish()), m_setTo1(*this), m_setTo2(*this), m_split(*this), m_space1(*this, "Hello, World!\n\n", "Hello Button", &m_setTo1), @@ -52,6 +53,16 @@ ViewManager::ViewManager(HECL::Runtime::FileStoreManager& fileMgr, HECL::CVarMan ViewManager::~ViewManager() {} +void ViewManager::pushRecentProject(const HECL::SystemString& path) +{ + m_recentProjects.push_back(path); +} + +void ViewManager::pushRecentFile(const HECL::SystemString& path) +{ + m_recentFiles.push_back(path); +} + void ViewManager::init(boo::IApplication* app) { m_mainWindow = std::unique_ptr(app->newWindow(_S("RUDE"))); diff --git a/Editor/ViewManager.hpp b/Editor/ViewManager.hpp index 3eda04f33..feaef171c 100644 --- a/Editor/ViewManager.hpp +++ b/Editor/ViewManager.hpp @@ -11,6 +11,7 @@ class SplashScreen; class ViewManager : public Specter::IViewManager { + HECL::Runtime::FileStoreManager& m_fileStoreManager; HECL::CVarManager& m_cvarManager; ProjectManager m_projManager; Specter::FontCache m_fontCache; @@ -22,6 +23,9 @@ class ViewManager : public Specter::IViewManager HECL::CVar* m_cvPixelFactor; + std::vector m_recentProjects; + std::vector m_recentFiles; + bool m_updatePf = false; float m_reqPf; @@ -77,6 +81,12 @@ public: ProjectManager& projectManager() {return m_projManager;} const Specter::Translator* getTranslator() const {return &m_translator;} + const std::vector* recentProjects() const {return &m_recentProjects;} + void pushRecentProject(const HECL::SystemString& path); + + const std::vector* recentFiles() const {return &m_recentFiles;} + void pushRecentFile(const HECL::SystemString& path); + void init(boo::IApplication* app); bool proc(); void stop(); diff --git a/hecl b/hecl index 6e7283d60..ddb3e9c65 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit 6e7283d60737211a44bd87234b67a9d51801597e +Subproject commit ddb3e9c655ffc6528fee8ebb08b296b3d1cf9df3 diff --git a/libSpecter b/libSpecter index 190de88c2..d53f0060f 160000 --- a/libSpecter +++ b/libSpecter @@ -1 +1 @@ -Subproject commit 190de88c239b5c2863b5b6fd34b98d417738b518 +Subproject commit d53f0060f593e2a234e5ab84a2a32a27d4476a9d