the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 44 lines 1.2 kB view raw
1#pragma once 2 3#include <XuiApp.h> 4 5#define XUI_4JEDIT_MAX_CHARS 61 6 7class CXuiCtrl4JEdit : public CXuiControlImpl 8{ 9public: 10 XUI_IMPLEMENT_CLASS(CXuiCtrl4JEdit, L"CXuiCtrl4JEdit", XUI_CLASS_EDIT) 11 12protected: 13 14 15 XUI_BEGIN_MSG_MAP() 16 XUI_ON_XM_INIT(OnInit) 17 XUI_ON_XM_CHAR(OnChar) 18 XUI_ON_XM_KEYDOWN(OnKeyDown) 19 XUI_END_MSG_MAP() 20 21 HRESULT OnInit(XUIMessageInit* pInitData, BOOL& rfHandled); 22 HRESULT OnChar(XUIMessageChar* pInputData, BOOL& rfHandled); 23 HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled); 24public: 25 HRESULT SetReadOnly(bool bReadOnly); 26// HRESULT SetIPMode(bool bIPMode); 27// HRESULT SetExtendedMode(bool bExtendedMode); 28 HRESULT SetKeyboardType(C_4JInput::EKeyboardMode eKeyboardMode); 29 HRESULT SetTextLimit(int iLimit); 30 HRESULT SetCaretPosition(int iPos); 31 HRESULT SetTitleAndText(unsigned int uiTitle, unsigned int uiText); 32 33 void RequestKeyboard(int iPad); 34protected: 35 bool m_bReadOnly; 36 C_4JInput::EKeyboardMode m_eKeyboardMode; 37 unsigned int m_uiTitle,m_uiText; 38 39private: 40 static int KeyboardReturned(void *pParam,bool bSet); 41 HRESULT SendNotifyValueChanged(int); 42 WCHAR wchText[XUI_4JEDIT_MAX_CHARS]; 43 unsigned int m_uTextLimit; 44};