diff options
Diffstat (limited to '')
-rw-r--r-- | gui/pages.cpp | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/gui/pages.cpp b/gui/pages.cpp index 13f3bd7b5..4a65c69e4 100644 --- a/gui/pages.cpp +++ b/gui/pages.cpp @@ -1098,6 +1098,11 @@ int PageSet::IsCurrentPage(Page* page) return ((mCurrentPage && mCurrentPage == page) ? 1 : 0); } +std::string PageSet::GetCurrentPage() const +{ + return mCurrentPage ? mCurrentPage->GetName() : ""; +} + int PageSet::Render(void) { int ret; @@ -1544,6 +1549,11 @@ int PageManager::ChangePage(std::string name) return ret; } +std::string PageManager::GetCurrentPage() +{ + return mCurrentSet ? mCurrentSet->GetCurrentPage() : ""; +} + int PageManager::ChangeOverlay(std::string name) { if (name.empty()) @@ -1560,24 +1570,6 @@ const ResourceManager* PageManager::GetResources() return (mCurrentSet ? mCurrentSet->GetResources() : NULL); } -int PageManager::SwitchToConsole(void) -{ - PageSet* console = new PageSet(NULL); - - mCurrentSet = console; - return 0; -} - -int PageManager::EndConsole(void) -{ - if (mCurrentSet && mBaseSet) { - delete mCurrentSet; - mCurrentSet = mBaseSet; - return 0; - } - return -1; -} - int PageManager::IsCurrentPage(Page* page) { return (mCurrentSet ? mCurrentSet->IsCurrentPage(page) : 0); |