the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2#include "..\Media\xuiscene_text_entry.h"
3#include "XUI_Ctrl_4JEdit.h"
4
5
6class CScene_TextEntry : public CXuiSceneImpl
7{
8public:
9 typedef struct _XuiTextInputParams
10 {
11 int iPad;
12 WCHAR wch;
13 }
14 XuiTextInputParams;
15
16 typedef struct _CommamndParams
17 {
18 WCHAR wchCommand[40];
19 WCHAR wchFormat[40];
20 }
21 CommandParams;
22
23 enum
24 {
25 eCommand_Teleport=0,
26 eCommand_Give,
27 eCommand_MAX
28 }
29 eCommands;
30
31protected:
32 CXuiCtrl4JEdit m_EditText;
33
34
35 XUI_BEGIN_MSG_MAP()
36 XUI_ON_XM_INIT( OnInit )
37 XUI_ON_XM_NOTIFY_VALUE_CHANGED(OnNotifyValueChanged)
38 XUI_ON_XM_KEYDOWN(OnKeyDown)
39
40 XUI_END_MSG_MAP()
41
42 BEGIN_CONTROL_MAP()
43 MAP_CONTROL(IDC_XuiEditText, m_EditText)
44 END_CONTROL_MAP()
45
46
47 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled );
48 HRESULT OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyValueChanged* pValueChangedData, BOOL& rfHandled);
49 HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled);
50
51 HRESULT InterpretString(wstring &wsText);
52 HRESULT Init_Commands();
53public:
54
55 // Define the class. The class name must match the ClassOverride property
56 // set for the scene in the UI Authoring tool.
57 XUI_IMPLEMENT_CLASS( CScene_TextEntry, L"CScene_TextEntry", XUI_CLASS_SCENE )
58
59private:
60 int m_iPad;
61 WCHAR m_wchInitialChar;
62 static CommandParams CommandA[eCommand_MAX];
63 unordered_map<wstring, int> m_CommandSet;
64};