Advertisement
keybode

css v34 CheatGui.h

Oct 17th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.95 KB | None | 0 0
  1. #ifndef CHEATGUI_H
  2. #define CHEATGUI_H
  3.  
  4. #include "SDK.h"
  5.  
  6. struct key_t
  7. {
  8.     char    m_def[16];
  9.     char    m_alt[16];
  10.     int     m_code;
  11. };
  12.  
  13. class Control
  14. {
  15. public:
  16.                                 Control ();
  17.  
  18.     virtual                     ~Control ();
  19.  
  20.     virtual void                Enable ();
  21.    
  22.     virtual void                Disable ();
  23.  
  24. public:
  25.     Control*                    m_parent;
  26.     bool                        m_enabled;
  27.     Vector2                     m_position;
  28.     Vector2                     m_size;
  29. };
  30.  
  31. class CheckBox : public Control
  32. {
  33. public:
  34.                                 CheckBox ( int x, int y, bool* var, const std::string& name, Control* parent );
  35.  
  36.     virtual void                Frame ();
  37.  
  38. public:
  39.     std::string                 m_name;
  40.     bool*                       m_var;
  41. };
  42.  
  43. class Button : public Control
  44. {
  45. public:
  46.                                 typedef void (*ButtonCallbackFn)();
  47.  
  48.                                 Button ( int x, int y, const std::string& name, ButtonCallbackFn function, Control* parent );
  49.  
  50.     virtual void                Frame ();
  51.  
  52. public:
  53.     std::string                 m_name;
  54.     ButtonCallbackFn            m_function;
  55. };
  56.  
  57. class InputBox : public Control
  58. {
  59. public:
  60.                                 InputBox ( int x, int y, const std::string& name, Control* parent );
  61.  
  62.     virtual void                Frame ();
  63.  
  64.     virtual void                KeyEvent ( int keynum );
  65.  
  66. public:
  67.     std::string                 m_name;
  68.     std::string                 m_text;
  69.     bool                        m_active;
  70. };
  71.  
  72. class ComboBox : public Control
  73. {
  74. public:
  75.                                 ComboBox ( int x, int y, const std::string& name, Control* parent );
  76.  
  77.     virtual void                Frame ();
  78.  
  79.     virtual void                Add ( const std::string& name );
  80.  
  81.     virtual int                 GetCurrentIndex ();
  82.  
  83.     virtual const std::string&  GetCurrentItem ();
  84.  
  85. public:
  86.     std::string                 m_name;
  87.     bool                        m_active;
  88.     int                         m_selected;
  89.     std::vector<std::string>    m_itemArray;
  90. };
  91.  
  92. class SliderH : public Control
  93. {
  94. public:
  95.                                 SliderH ( int x, int y, int w, float* var, float min, float max, const std::string& name, Control* parent );
  96.  
  97.     virtual void                Frame ();
  98.  
  99. public:
  100.     float                       m_sizeW;
  101.     float                       m_min;
  102.     float                       m_max;
  103.     float*                      m_var;
  104.     std::string                 m_name;
  105.     bool                        m_active;
  106. };
  107.  
  108. class TabControl : public Control
  109. {
  110. public:
  111.                                 TabControl ( int index, bool active, const std::string& name, Control* parent );
  112.  
  113.     virtual void                Frame ();
  114.  
  115.     virtual CheckBox*           AddCheckBox ( int x, int y, bool* var, const std::string& name );
  116.  
  117.     virtual Button*             AddButton ( int x, int y, const std::string& name, Button::ButtonCallbackFn function );
  118.  
  119.     virtual InputBox*           AddInputBox ( int x, int y, const std::string& name );
  120.  
  121.     virtual ComboBox*           AddComboBox ( int x, int y, const std::string& name );
  122.  
  123.     virtual SliderH*            AddSliderH ( int x, int y, int w, float* var, float min, float max, const std::string& name );
  124.  
  125. private:
  126.     std::string                 m_name;
  127.     int                         m_index;
  128.     bool                        m_active;
  129.     std::vector<Control*>       m_controlArray;
  130. };
  131.  
  132. class Window : public TabControl
  133. {
  134. public:
  135.                                 Window ( int x, int y, int w, int h, const std::string& name );
  136.  
  137.     virtual TabControl*         AddTabControl ( int index, bool active, const std::string& name );
  138. };
  139.  
  140. class CCheatGui
  141. {
  142. public:
  143.  
  144. };
  145.  
  146. #endif // CHEATGUI_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement