the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 49 lines 1.4 kB view raw
1#pragma once 2#include "../media/xuiscene_signentry.h" 3#include "XUI_Ctrl_4JEdit.h" 4#include "XUI_CustomMessages.h" 5 6#define SIGN_ENTRY_ROWS_MAX 4 7 8class SignTileEntity; 9 10class CScene_SignEntry : public CXuiSceneImpl 11{ 12 protected: 13 // Control and Element wrapper objects. 14 CXuiCtrl4JEdit m_signRows[4]; 15 CXuiControl m_ButtonDone; 16 CXuiControl m_labelEditSign; 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_NOTIFY_PRESS_EX(OnNotifyPressEx) 22 XUI_ON_XM_KEYDOWN(OnKeyDown) 23 XUI_END_MSG_MAP() 24 25 // Control mapping to objects 26 BEGIN_CONTROL_MAP() 27 MAP_CONTROL(IDC_EditSignMessage, m_labelEditSign) 28 MAP_CONTROL(IDC_ButtonDone, m_ButtonDone) 29 MAP_CONTROL(IDC_EditLineOne, m_signRows[0]) 30 MAP_CONTROL(IDC_EditLineTwo, m_signRows[1]) 31 MAP_CONTROL(IDC_EditLineThree, m_signRows[2]) 32 MAP_CONTROL(IDC_EditLineFour, m_signRows[3]) 33 END_CONTROL_MAP() 34 35 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); 36 HRESULT OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData, BOOL& rfHandled); 37 HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled); 38 39public: 40 41 // Define the class. The class name must match the ClassOverride property 42 // set for the scene in the UI Authoring tool. 43 XUI_IMPLEMENT_CLASS( CScene_SignEntry, L"CScene_SignEntry", XUI_CLASS_SCENE ) 44 45private: 46 shared_ptr<SignTileEntity> m_sign; 47 D3DXVECTOR3 m_OriginalPosition; 48 49};