Advertisement
michalmonday

C_cursor.h (classFile.h)

Dec 13th, 2015
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. /*
  2. Relevant parts:
  3.  
  4.  
  5.  
  6. Externing objectArray:
  7. ////////////////////
  8. extern Cursor playerElement[MAX_PLAYER_ELEMENTS];
  9. ////////////////////
  10.  
  11.  
  12.  
  13.  
  14. */
  15.  
  16. ifndef C_CURSOR_H
  17. #define C_CURSOR_H
  18.  
  19. #define MAX_CURSOR_ELEMENTS 300 //pretty random
  20. #define MAX_MENU_ELEMENTS 20
  21. #define MAX_PLAYER_ELEMENTS 49
  22.  
  23. #define INVALID_ELEMENT 2000
  24.  
  25. //main menu
  26. #define MENU_BUTTON_FACETAG 0
  27. #define MENU_BUTTON_STREAMED 1
  28. #define MENU_BUTTON_LIST 2
  29. #define MENU_BUTTON_NAMES 3
  30. #define MENU_BUTTON_POSITION 4
  31.  
  32. //position
  33. #define MENU_BUTTON_HORIZONTALOFFSET 0
  34. #define MENU_BUTTON_HEIGHT 1
  35. #define MENU_BUTTON_WIDTH 2
  36. #define MENU_BUTTON_UPPERTHRESHOLD 3
  37. #define MENU_BUTTON_LOWERTHRESHOLD 4
  38. #define MENU_BUTTON_RADARMIDDLE 5
  39. using namespace std;
  40.  
  41.  
  42.  
  43. struct XY_XY
  44. {
  45. float l;//left
  46. float t;//top
  47. float r;//right
  48. float b;//bottom
  49. };
  50.  
  51. class Cursor{
  52. public:
  53. Cursor();
  54.  
  55. void UpdateElement();
  56. bool IsCursorOverElement();
  57. float SetAdjusterValue(float maxVal);
  58. void DrawFrame();
  59.  
  60. void SetPlayerElement(float , float , float , float , int , int ele);
  61. int GetID();
  62.  
  63.  
  64. float arrowPosX;
  65. XY_XY pos;
  66. int id;
  67. private:
  68.  
  69. bool listed;//is anything assigned to the element
  70. int type; //personalized texture/any others(?)
  71. int state; // clicked/notclicked/cursor_over/normal
  72. int allignTo;//right/left/center
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80. friend void ManageCursorElements();
  81. };
  82.  
  83.  
  84. extern Cursor playerElement[MAX_PLAYER_ELEMENTS];
  85.  
  86.  
  87. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement