aboutsummaryrefslogtreecommitdiffstats
path: root/src/pausescreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pausescreen.cpp')
-rw-r--r--src/pausescreen.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/pausescreen.cpp b/src/pausescreen.cpp
index 17a82d5..4bb6f4a 100644
--- a/src/pausescreen.cpp
+++ b/src/pausescreen.cpp
@@ -53,8 +53,8 @@ PauseScreen::PauseScreen() :
int menuX = (sw / 2) - (menuWidth / 2);
int menuY = (sh / 2) - (menuHeight / 2);
- m_menuWindow = std::make_shared<Boxii::TextWindow>(menuX, menuY / 2, menuWidth, menuHeight, false);
- addWindow("main", m_menuWindow);
+ m_menuWindow = Boxii::makeWindow<Boxii::TextWindow>(menuX, menuY / 2, menuWidth, menuHeight);
+ Boxii::remove(m_menuWindow);
printSelections(m_menuWindow, m_selection);
}
@@ -65,6 +65,18 @@ PauseScreen::~PauseScreen()
}
void
+PauseScreen::activate()
+{
+ Boxii::pushToFront(m_menuWindow);
+}
+
+void
+PauseScreen::deactivate()
+{
+ Boxii::remove(m_menuWindow);
+}
+
+void
PauseScreen::update()
{
int c = Boxii::Input::getch(true);