Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. #ifndef HAPTICCONTROLBOX_H
  3. #define HAPTICCONTROLBOX_H
  4. #include <vgui_controls/Controls.h>
  5. #include <vgui_controls/Panel.h>
  6. #include "cvarslider.h"
  7. class ControlBoxVisual : public vgui::Panel
  8. {
  9. DECLARE_CLASS_SIMPLE(ControlBoxVisual,vgui::Panel);
  10. public:
  11. ControlBoxVisual(vgui::Panel *parent, const char *panelName, CCvarSlider *near, CCvarSlider *right, CCvarSlider *up, CCvarSlider *far, CCvarSlider *left, CCvarSlider *down);
  12. virtual void Paint();
  13. MESSAGE_FUNC_PARAMS(OnSlideEnter, "CursorEnteredSlider", data);
  14. MESSAGE_FUNC_PARAMS(OnSlideExit, "CursorExitedSlider", data);
  15. protected:
  16. void DrawCube(float Near=-1, float Right=-1, float Up=-1, float Far=1, float Left=1, float Down=1, int specialside=-1);
  17. enum eBoxID
  18. {
  19. HUI_BOX_UP =0,
  20. HUI_BOX_RIGHT,
  21. HUI_BOX_NEAR,
  22. HUI_BOX_DOWN,
  23. HUI_BOX_LEFT,
  24. HUI_BOX_FAR,
  25. HUI_BOX_SLIDERCOUNT,
  26. };
  27. struct CCvarSliderCube
  28. {
  29. CCvarSliderCube(CCvarSlider *n,CCvarSlider *r,CCvarSlider *u,CCvarSlider *f,CCvarSlider *l,CCvarSlider *d)
  30. {
  31. Near = n;
  32. Right = r;
  33. Up = u;
  34. Far = f;
  35. Left = l;
  36. Down = d;
  37. };
  38. CCvarSlider *Near;
  39. CCvarSlider *Right;
  40. CCvarSlider *Up;
  41. CCvarSlider *Far;
  42. CCvarSlider *Left;
  43. CCvarSlider *Down;
  44. };
  45. CCvarSliderCube *SlideValues;// up right near down left far and spingk
  46. int m_iMouseOver;
  47. float m_flTime;
  48. };
  49. #endif