Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/CSlider.h
Show All 13 Lines | |||||
* You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_CSLIDER | #ifndef INCLUDED_CSLIDER | ||||
#define INCLUDED_CSLIDER | #define INCLUDED_CSLIDER | ||||
#include "gui/IGUIObject.h" | #include "gui/IGUIObject.h" | ||||
#include "gui/CGUISprite.h" | |||||
class CSlider : public IGUIObject | class CSlider : public IGUIObject | ||||
{ | { | ||||
GUI_OBJECT(CSlider) | GUI_OBJECT(CSlider) | ||||
public: | public: | ||||
CSlider(CGUI& pGUI); | CSlider(CGUI& pGUI); | ||||
virtual ~CSlider(); | virtual ~CSlider(); | ||||
Show All 16 Lines | protected: | ||||
/** | /** | ||||
* @return ratio between the value of the slider and its actual size in the GUI | * @return ratio between the value of the slider and its actual size in the GUI | ||||
*/ | */ | ||||
float GetSliderRatio() const; | float GetSliderRatio() const; | ||||
void IncrementallyChangeValue(const float value); | void IncrementallyChangeValue(const float value); | ||||
float m_MinValue, m_MaxValue, m_Value; | // Settings | ||||
float m_ButtonSide; | |||||
i32 m_CellID; | |||||
float m_MinValue; | |||||
float m_MaxValue; | |||||
CGUISpriteInstance m_Sprite; | |||||
CGUISpriteInstance m_SpriteBar; | |||||
float m_Value; | |||||
private: | private: | ||||
bool m_IsPressed; | bool m_IsPressed; | ||||
CPos m_Mouse; | CPos m_Mouse; | ||||
float m_ButtonSide; | |||||
}; | }; | ||||
#endif // INCLUDED_CSLIDER | #endif // INCLUDED_CSLIDER |
Wildfire Games · Phabricator