the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2using namespace std;
3
4#include "..\Media\xuiscene_enchant.h"
5
6#include "..\..\BookModel.h"
7
8#include "XUI_Ctrl_SlotList.h"
9#include "XUI_Ctrl_EnchantmentBook.h"
10#include "XUI_Scene_AbstractContainer.h"
11#include "..\UI\IUIScene_EnchantingMenu.h"
12#include "XUI_CustomMessages.h"
13
14#include "XUI_Scene_Enchant.h"
15
16#include "..\..\..\Minecraft.World\AbstractContainerMenu.h"
17#include "..\..\..\Minecraft.World\SimpleContainer.h"
18
19class Level;
20class CXuiCtrlEnchantmentButton;
21class EnchantmentMenu;
22
23//--------------------------------------------------------------------------------------
24// Scene implementation class.
25//--------------------------------------------------------------------------------------
26class CXuiSceneEnchant : public CXuiSceneAbstractContainer, public IUIScene_EnchantingMenu
27{
28 friend class CXuiCtrlEnchantmentButtonText;
29public:
30 // Define the class. The class name must match the ClassOverride property
31 // set for the scene in the UI Authoring tool.
32 XUI_IMPLEMENT_CLASS( CXuiSceneEnchant, L"CXuiSceneEnchant", XUI_CLASS_SCENE )
33
34protected:
35 CXuiCtrlEnchantmentButton *m_enchant1;
36 CXuiCtrlEnchantmentButton *m_enchant2;
37 CXuiCtrlEnchantmentButton *m_enchant3;
38 CXuiControl m_sceneGroup;
39 CXuiCtrlSlotList* m_ingredientControl;
40 CXuiControl m_EnchantText;
41
42 XUI_BEGIN_MSG_MAP()
43 XUI_ON_XM_INIT( OnInit )
44 XUI_ON_XM_KEYDOWN( OnKeyDown )
45 XUI_ON_XM_DESTROY( OnDestroy )
46 XUI_ON_XM_TIMER( OnTimer ) // Poll stick input on a timer.
47 XUI_ON_XM_SPLITSCREENPLAYER_MESSAGE(OnCustomMessage_Splitscreenplayer)
48 XUI_ON_XM_TRANSITION_START(OnTransitionStart)
49 XUI_END_MSG_MAP()
50
51 // Control mapping to objects
52 BEGIN_CONTROL_MAP()
53 MAP_CONTROL(IDC_Group, m_sceneGroup)
54 BEGIN_MAP_CHILD_CONTROLS( m_sceneGroup )
55 // Common to all abstract container scenes
56 MAP_OVERRIDE(IDC_Inventory, m_inventoryControl)
57 MAP_OVERRIDE(IDC_UseRow, m_useRowControl)
58 MAP_OVERRIDE(IDC_Pointer, m_pointerControl)
59 MAP_CONTROL(IDC_InventoryText,m_InventoryText)
60
61 MAP_OVERRIDE(IDC_Ingredient, m_ingredientControl)
62 MAP_OVERRIDE(IDC_EnchantButton1, m_enchant1)
63 MAP_OVERRIDE(IDC_EnchantButton2, m_enchant2)
64 MAP_OVERRIDE(IDC_EnchantButton3, m_enchant3)
65 MAP_CONTROL(IDC_EnchantText,m_EnchantText)
66 END_MAP_CHILD_CONTROLS()
67 END_CONTROL_MAP()
68
69 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled );
70 HRESULT OnDestroy();
71
72 virtual void InitDataAssociations(int iPad, AbstractContainerMenu *menu, int startIndex = 0);
73
74private:
75
76 virtual CXuiControl* GetSectionControl( ESceneSection eSection );
77 virtual CXuiCtrlSlotList* GetSectionSlotList( ESceneSection eSection );
78};