the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 52 lines 2.1 kB view raw
1#pragma once 2 3#include "../media/xuiscene_settings_control.h" 4#include "XUI_Ctrl_SliderWrapper.h" 5#include "XUI_CustomMessages.h" 6 7#define SLIDER_SETTINGS_SENSITIVITY_INGAME 0 8#define SLIDER_SETTINGS_SENSITIVITY_INMENU 1 9 10#define SLIDER_SETTINGS_CONTROL_MAX SLIDER_SETTINGS_SENSITIVITY_INMENU + 1 11class CScene_SettingsControl : public CXuiSceneImpl 12{ 13protected: 14 CXuiCtrlSliderWrapper m_SliderA[SLIDER_SETTINGS_CONTROL_MAX]; 15 16 CXuiControl m_ButtonOptions; 17 18 // Message map. Here we tie messages to message handlers. 19 XUI_BEGIN_MSG_MAP() 20 XUI_ON_XM_INIT( OnInit ) 21 XUI_ON_XM_KEYDOWN( OnKeyDown ) 22 XUI_ON_XM_NOTIFY_PRESS_EX(OnNotifyPressEx) 23 XUI_ON_XM_NOTIFY_VALUE_CHANGED( OnNotifyValueChanged ) 24 XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate ) 25 XUI_ON_XM_TRANSITION_START(OnTransitionStart) 26 XUI_ON_XM_NAV_RETURN(OnNavReturn) 27 XUI_ON_XM_SPLITSCREENPLAYER_MESSAGE(OnCustomMessage_Splitscreenplayer) 28 XUI_END_MSG_MAP() 29 30 BEGIN_CONTROL_MAP() 31 MAP_CONTROL(IDC_XuiSliderSensitivityInGame, m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INGAME]) 32 MAP_CONTROL(IDC_XuiSliderSensitivityInMenu, m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INMENU]) 33 END_CONTROL_MAP() 34 35 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); 36 HRESULT OnKeyDown(XUIMessageInput *pInputData, BOOL& bHandled); 37 HRESULT OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData,BOOL& rfHandled); 38 HRESULT OnNotifyValueChanged( HXUIOBJ hObjSource, XUINotifyValueChanged* pNotifyValueChanged, BOOL& bHandled ); 39 HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled); 40 HRESULT OnTransitionStart( XUIMessageTransition *pTransition, BOOL& bHandled ); 41 HRESULT OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled); 42 HRESULT OnNavReturn(HXUIOBJ hObj,BOOL& rfHandled); 43 44 int m_iPad; 45 D3DXVECTOR3 m_OriginalPosition; 46 47public: 48 49 // Define the class. The class name must match the ClassOverride property 50 // set for the scene in the UI Authoring tool. 51 XUI_IMPLEMENT_CLASS( CScene_SettingsControl, L"CScene_SettingsControl", XUI_CLASS_SCENE ) 52};