#pragma once #include "UIScene.h" #include "UIControl_MultiList.h" class UIScene_InGamePlayerOptionsMenu : public UIScene { private: enum EControls { eControl_MultiList = 0, eControl_BuildAndMine, eControl_UseDoorsAndSwitches, eControl_UseContainers, eControl_AttackPlayers, eControl_AttackAnimals, eControl_Op, eControl_HostInvisible, eControl_HostFly, eControl_HostHunger, eControl_CheatTeleport, eControl_GameMode, eControl_SetSpawn, eControl_Kick, eControl_Count, }; bool m_bShouldNavBack; bool m_editingSelf; BYTE m_networkSmallId; unsigned int m_playerPrivileges; UIControl_MultiList m_multiList; bool m_bNeedsMultiListPopulate; bool m_bInitialPopulateDone; bool m_bPendingSliderUpdate; int m_iPendingSliderValue; bool m_bPendingCheatRefresh; bool m_bChecked[eControl_Count]; bool m_bPresent[eControl_Count]; int m_iGameType; int m_iStartGameType; UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) UI_END_MAP_ELEMENTS_AND_NAMES() public: UIScene_InGamePlayerOptionsMenu(int iPad, void *initData, UILayer *parentLayer); virtual EUIScene getSceneType() { return eUIScene_InGamePlayerOptionsMenu;} virtual void updateTooltips(); virtual void handleReload(); protected: virtual wstring getMoviePath(); virtual void handleCheckboxToggled(F64 controlId, bool selected); virtual void handleSliderMove(F64 sliderId, F64 currentValue); public: virtual void tick(); virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); virtual void handleDestroy(); virtual void handlePress(F64 controlId, F64 childId); virtual void handleGainFocus(bool navBack); static int KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); static void OnPlayerChanged(void *callbackParam, INetworkPlayer *pPlayer, bool leaving); private: void populateList(); void addCheckbox(int id, int stringId, bool enabled = true); void resetCheatCheckboxes(); void applyAndClose(); void sendPacket(shared_ptr packet); bool privilege(int priv); bool isCreative(); wstring gameModeLabel(int value); };