[PauseMenuState|SettingsMenuState] Small name tweaks.

This commit is contained in:
Quentin Bazin 2018-06-29 20:56:45 +02:00
parent 5435ad309a
commit fb46ab479c
2 changed files with 7 additions and 6 deletions

View File

@ -32,8 +32,8 @@ PauseMenuState::PauseMenuState(ApplicationState *parent) : ApplicationState(pare
m_background.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
m_menuWidget.setScale(GUI_SCALE, GUI_SCALE, 1);
m_menuWidget.addButton(0, 0, "Resume", [this] { Mouse::setCursorGrabbed(true); Mouse::setCursorVisible(false); m_stateStack->pop(); });
m_menuWidget.addButton(0, 1, "Settings", [this] { m_stateStack->push<SettingsMenuState>(m_parent); });
m_menuWidget.addButton(0, 0, "Back to Game", [this] { Mouse::setCursorGrabbed(true); Mouse::setCursorVisible(false); m_stateStack->pop(); });
m_menuWidget.addButton(0, 1, "Options...", [this] { m_stateStack->push<SettingsMenuState>(m_parent); });
m_menuWidget.addButton(0, 2, "Exit", [this] { while(!m_stateStack->empty()) m_stateStack->pop(); });
}

View File

@ -16,6 +16,7 @@
#include "Keyboard.hpp"
#include "Mouse.hpp"
#include "SettingsMenuState.hpp"
#include "World.hpp"
SettingsMenuState::SettingsMenuState(ApplicationState *parent) : ApplicationState(parent) {
m_shader.createProgram();
@ -27,12 +28,12 @@ SettingsMenuState::SettingsMenuState(ApplicationState *parent) : ApplicationStat
m_background.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
m_menuWidget.setScale(GUI_SCALE, GUI_SCALE, 1);
m_menuWidget.addButton(0, 7, "Back to menu", [this] { m_stateStack->pop(); });
m_menuWidget.addButton(0, 7, "Done", [this] { m_stateStack->pop(); });
m_menuWidget.addButton(0, 0, "VSync: OFF", [] {}).setEnabled(false);
m_menuWidget.addButton(0, 1, "GUI scale: " + std::to_string(GUI_SCALE), [] {}).setEnabled(false);
m_menuWidget.addButton(0, 0, "Render distance: " + std::to_string(World::renderDistance), [] {}).setEnabled(false);
m_menuWidget.addButton(0, 1, "GUI Scale: " + std::to_string(GUI_SCALE), [] {}).setEnabled(false);
m_menuWidget.addButton(0, 2, "Fullscreen: OFF", [] {}).setEnabled(false);
m_menuWidget.addButton(0, 3, "Render distance: 0", [] {}).setEnabled(false);
m_menuWidget.addButton(0, 3, "Use VSync: OFF", [] {}).setEnabled(false);
}
void SettingsMenuState::onEvent(const SDL_Event &event) {