diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-20 14:33:09 +1000 |
commit | 6352e8e3196f78388b6c771073f9e03eaa612673 (patch) | |
tree | e23772f79a7fbc41bc9108951e9e136857484bf4 /source/frontend/StarOptionsMenu.hpp | |
parent | 6741a057e5639280d85d0f88ba26f000baa58f61 (diff) |
everything everywhere
all at once
Diffstat (limited to 'source/frontend/StarOptionsMenu.hpp')
-rw-r--r-- | source/frontend/StarOptionsMenu.hpp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/source/frontend/StarOptionsMenu.hpp b/source/frontend/StarOptionsMenu.hpp new file mode 100644 index 0000000..14158be --- /dev/null +++ b/source/frontend/StarOptionsMenu.hpp @@ -0,0 +1,68 @@ +#ifndef STAR_OPTIONS_MENU_HPP +#define STAR_OPTIONS_MENU_HPP + +#include "StarPane.hpp" +#include "StarConfiguration.hpp" +#include "StarMainInterfaceTypes.hpp" + +namespace Star { + +STAR_CLASS(SliderBarWidget); +STAR_CLASS(ButtonWidget); +STAR_CLASS(LabelWidget); +STAR_CLASS(KeybindingsMenu); +STAR_CLASS(GraphicsMenu); + +STAR_CLASS(OptionsMenu); + +class OptionsMenu : public Pane { +public: + OptionsMenu(PaneManager* manager); + + virtual void show() override; + + void toggleFullscreen(); + +private: + static StringList const ConfigKeys; + + void initConfig(); + + void updateSFXVol(); + void updateMusicVol(); + void updateTutorialMessages(); + void updateClientIPJoinable(); + void updateClientP2PJoinable(); + void updateAllowAssetsMismatch(); + + void syncGuiToConf(); + + void displayControls(); + void displayGraphics(); + + SliderBarWidgetPtr m_sfxSlider; + SliderBarWidgetPtr m_musicSlider; + ButtonWidgetPtr m_tutorialMessagesButton; + ButtonWidgetPtr m_interactiveHighlightButton; + ButtonWidgetPtr m_clientIPJoinableButton; + ButtonWidgetPtr m_clientP2PJoinableButton; + ButtonWidgetPtr m_allowAssetsMismatchButton; + + LabelWidgetPtr m_sfxLabel; + LabelWidgetPtr m_musicLabel; + LabelWidgetPtr m_p2pJoinableLabel; + + Vec2I m_sfxRange; + Vec2I m_musicRange; + + JsonObject m_origConfig; + JsonObject m_localChanges; + + KeybindingsMenuPtr m_keybindingsMenu; + GraphicsMenuPtr m_graphicsMenu; + PaneManager* m_paneManager; +}; + +} + +#endif |