#pragma once #include "UIScene.h" #include "UIControl_MultiList.h" class UIScene_InGameHostOptionsMenu : public UIScene { private: enum EControls { eControl_MultiList = 0, eControl_FireSpreads, eControl_TNT, eControl_DoDaylightCycle, eControl_KeepInventory, eControl_DoMobSpawning, eControl_MobGriefing, eControl_SetDay, eControl_SetNight, eControl_Difficulty, eControl_GameMode, eControl_SetWorldSpawn, eControl_Weather, eControl_DoWeatherCycle, eControl_DoMobLoot, eControl_DoTileDrops, eControl_NaturalRegeneration, eControl_TeleportToPlayer, eControl_TeleportToMe, eControl_Count, }; UIControl_MultiList m_multiList; bool m_bNeedsMultiListPopulate; bool m_bInitialPopulateDone; bool m_bPendingSliderUpdate; int m_iPendingSliderId; int m_iPendingSliderValue; int m_iPendingTeleport; bool m_bChecked[eControl_Count]; int m_iDifficulty; int m_iGameType; int m_iWeather; int m_iStartDifficulty; int m_iStartGameType; int m_iStartWeather; bool m_bHasWeather; UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) UI_END_MAP_ELEMENTS_AND_NAMES() public: UIScene_InGameHostOptionsMenu(int iPad, void *initData, UILayer *parentLayer); virtual EUIScene getSceneType() { return eUIScene_InGameHostOptionsMenu;} virtual void tick(); virtual void updateTooltips(); virtual void handleReload(); protected: virtual wstring getMoviePath(); public: virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); virtual void handlePress(F64 controlId, F64 childId); virtual void handleSliderMove(F64 sliderId, F64 currentValue); virtual void handleCheckboxToggled(F64 controlId, bool selected); virtual void handleGainFocus(bool navBack); private: void populateList(); void applyAndClose(); void sendCommand(shared_ptr packet); bool cheatsEnabled(); bool canTeleport(); wstring difficultyLabel(int value); wstring gameModeLabel(int value); wstring weatherLabel(int value); };