blob: 549068ae5a413fbf54bae5054eb26cff09860b9a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
|