the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 93 lines 1.8 kB view raw
1#pragma once 2 3// This class for any name object in the flash scene 4class UIControl 5{ 6 7public: 8 enum eUIControlType 9 { 10 eNoControl, 11 eButton, 12 eButtonList, 13 eCheckBox, 14 eCursor, 15 eDLCList, 16 eDynamicLabel, 17 eEnchantmentBook, 18 eEnchantmentButton, 19 eHTMLLabel, 20 eLabel, 21 eLeaderboardList, 22 eMinecraftPlayer, 23 eMinecraftHorse, 24 ePlayerList, 25 ePlayerSkinPreview, 26 eProgress, 27 eSaveList, 28 eSlider, 29 eSlotList, 30 eTextInput, 31 eTexturePackList, 32 eBitmapIcon, 33 eTouchControl, 34 }; 35protected: 36 eUIControlType m_eControlType; 37 int m_id; 38 bool m_bHidden; // set by the Remove call 39 40public: 41 42 void setControlType(eUIControlType eType) {m_eControlType=eType;} 43 eUIControlType getControlType() {return m_eControlType;} 44 void setId(int iID) { m_id=iID; } 45 int getId() { return m_id; } 46 UIScene * getParentScene() {return m_parentScene;} 47 48protected: 49 IggyValuePath m_iggyPath; 50 UIScene *m_parentScene; 51 string m_controlName; 52 53 IggyName m_nameXPos, m_nameYPos, m_nameWidth, m_nameHeight; 54 IggyName m_funcSetAlpha, m_nameVisible; 55 56 S32 m_x,m_y,m_width,m_height; 57 float m_lastOpacity; 58 bool m_isVisible; 59 60public: 61 UIControl(); 62 63 virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName); 64#ifdef __PSVITA__ 65 void UpdateControl(); 66 void setHidden(bool bHidden) {m_bHidden=bHidden;} 67 bool getHidden(void) {return m_bHidden;} 68#endif 69 70 IggyValuePath *getIggyValuePath(); 71 72 string getControlName() { return m_controlName; } 73 74 virtual void tick() {} 75 virtual void ReInit(); 76 77 virtual void setFocus(bool focus) {} 78 79 S32 getXPos(); 80 S32 getYPos(); 81 S32 getWidth(); 82 S32 getHeight(); 83 84 void setOpacity(float percent); 85 void setVisible(bool visible); 86 bool getVisible(); 87 bool isVisible() { return m_isVisible; } 88 89 virtual bool hasFocus() { return false; } 90 91protected: 92 IggyName registerFastName(const wstring &name); 93};