diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/tf/vgui/vgui_rotation_slider.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/tf/vgui/vgui_rotation_slider.h')
| -rw-r--r-- | game/client/tf/vgui/vgui_rotation_slider.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/game/client/tf/vgui/vgui_rotation_slider.h b/game/client/tf/vgui/vgui_rotation_slider.h new file mode 100644 index 0000000..549068a --- /dev/null +++ b/game/client/tf/vgui/vgui_rotation_slider.h @@ -0,0 +1,43 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef VGUI_ROTATION_SLIDER_H +#define VGUI_ROTATION_SLIDER_H +#ifdef _WIN32 +#pragma once +#endif + + +#include <vgui_controls/Slider.h> +#include "c_baseobject.h" + + +//----------------------------------------------------------------------------- +// +// Slider for object control +// +//----------------------------------------------------------------------------- +class CRotationSlider : public vgui::Slider +{ + DECLARE_CLASS_SIMPLE( CRotationSlider, vgui::Slider ); + +public: + CRotationSlider( vgui::Panel *pParent, const char *pName ); + void SetControlledObject( C_BaseObject *pObject ); + + virtual void OnMousePressed( vgui::MouseCode code ); + virtual void OnMouseReleased( vgui::MouseCode code ); + MESSAGE_FUNC_INT( OnSliderMoved, "SliderMoved", position ); + +private: + CHandle<C_BaseObject> m_hObject; + float m_flInitialYaw; + float m_flYaw; +}; + + +#endif // VGUI_ROTATION_SLIDER_H |