the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3#include "UIControl.h"
4
5class UIControl_BeaconEffectButton : public UIControl
6{
7private:
8 static const int BUTTON_DISABLED = 0;
9 static const int BUTTON_ENABLED_UNSELECTED = 1;
10 static const int BUTTON_ENABLED_SELECTED = 2;
11 static const int BUTTON_PRESSED = 3;
12
13 enum EState
14 {
15 eState_Disabled,
16 eState_Enabled_Unselected,
17 eState_Enabled_Selected,
18 eState_Pressed
19 };
20 EState m_lastState;
21
22 int m_data;
23 int m_icon;
24 bool m_selected;
25 bool m_active;
26 bool m_focus;
27
28 IggyName m_funcChangeState, m_funcSetIcon;
29
30public:
31 UIControl_BeaconEffectButton();
32
33 virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName);
34
35 void SetData(int data, int icon, bool active, bool selected);
36 int GetData();
37
38 void SetButtonSelected(bool selected);
39 bool IsButtonSelected();
40
41 void SetButtonActive(bool active);
42
43 virtual void setFocus(bool focus);
44
45 void SetIcon(int icon);
46
47private:
48 void UpdateButtonState();
49};