the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 60 lines 1.7 kB view raw
1#pragma once 2 3#include "UIScene.h" 4 5class UIScene_MessageBox : public UIScene 6{ 7private: 8 enum EControls 9 { 10 eControl_Button0, 11 eControl_Button1, 12 eControl_Button2, 13 eControl_Button3, 14 15 eControl_COUNT 16 }; 17 18 int( *m_Func)(LPVOID,int,const C4JStorage::EMessageResult); 19 LPVOID m_lpParam; 20 int m_buttonCount; 21 22 UIControl_Button m_buttonButtons[eControl_COUNT]; 23 UIControl_Label m_labelTitle, m_labelContent; 24 IggyName m_funcInit, m_funcAutoResize; 25 UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) 26 UI_MAP_ELEMENT( m_buttonButtons[eControl_Button0], "Button0") 27 UI_MAP_ELEMENT( m_buttonButtons[eControl_Button1], "Button1") 28 UI_MAP_ELEMENT( m_buttonButtons[eControl_Button2], "Button2") 29 UI_MAP_ELEMENT( m_buttonButtons[eControl_Button3], "Button3") 30 31 UI_MAP_ELEMENT( m_labelTitle, "Title") 32 UI_MAP_ELEMENT( m_labelContent, "Content") 33 34 UI_MAP_NAME( m_funcInit, L"Init") 35 UI_MAP_NAME( m_funcAutoResize, L"AutoResize") 36 UI_END_MAP_ELEMENTS_AND_NAMES() 37public: 38 UIScene_MessageBox(int iPad, void *initData, UILayer *parentLayer); 39 ~UIScene_MessageBox(); 40 41 virtual EUIScene getSceneType() { return eUIScene_MessageBox;} 42 43 // Returns true if lower scenes in this scenes layer, or in any layer below this scenes layers should be hidden 44 virtual bool hidesLowerScenes() { return false; } 45 virtual bool blocksInput() { return true; } 46 47protected: 48 // TODO: This should be pure virtual in this class 49 virtual wstring getMoviePath(); 50 51 virtual void updateTooltips(); 52 53public: 54 virtual void handleReload(); 55 virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); 56 virtual bool hasFocus(int iPad); 57 58protected: 59 void handlePress(F64 controlId, F64 childId); 60};