From c2464d4c71bbc0154287f0b0441aef05e27cf084 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 17 Aug 2012 22:43:07 +0200 Subject: * changes to ui classes --- src/ui/slider.h | 75 +++++++++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 39 deletions(-) (limited to 'src/ui/slider.h') diff --git a/src/ui/slider.h b/src/ui/slider.h index 1ec9ea5..e79b348 100644 --- a/src/ui/slider.h +++ b/src/ui/slider.h @@ -19,63 +19,60 @@ #pragma once -#include "ui/control.h" - - -class CD3DEngine; -class CButton; +#include +#include class CSlider : public CControl { -public: - CSlider(CInstanceManager* iMan); - ~CSlider(); + public: + CSlider(); + ~CSlider(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); - void SetPos(Math::Point pos); - void SetDim(Math::Point dim); + void SetPos(Math::Point pos); + void SetDim(Math::Point dim); - bool SetState(int state, bool bState); - bool SetState(int state); - bool ClearState(int state); + bool SetState(int state, bool bState); + bool SetState(int state); + bool ClearState(int state); - bool EventProcess(const Event &event); - void Draw(); + bool EventProcess(const Event &event); + void Draw(); - void SetLimit(float min, float max); + void SetLimit(float min, float max); - void SetVisibleValue(float value); - float RetVisibleValue(); + void SetVisibleValue(float value); + float RetVisibleValue(); - void SetArrowStep(float step); - float RetArrowStep(); + void SetArrowStep(float step); + float RetArrowStep(); -protected: - void MoveAdjust(); - void AdjustGlint(); - void DrawVertex(Math::Point pos, Math::Point dim, int icon); + protected: + void MoveAdjust(); + void AdjustGlint(); + void DrawVertex(Math::Point pos, Math::Point dim, int icon); -protected: - CButton* m_buttonLeft; - CButton* m_buttonRight; + protected: + CButton* m_buttonLeft; + CButton* m_buttonRight; - float m_min; - float m_max; - float m_visibleValue; - float m_step; + float m_min; + float m_max; + float m_visibleValue; + float m_step; - bool m_bHoriz; - float m_marginButton; + bool m_bHoriz; + float m_marginButton; - bool m_bCapture; - Math::Point m_pressPos; - float m_pressValue; + bool m_bCapture; + Math::Point m_pressPos; + float m_pressValue; - EventMsg m_eventUp; - EventMsg m_eventDown; + EventType m_eventUp; + EventType m_eventDown; }; -- cgit v1.2.3-1-g7c22 From 59ec83c409952337d5c5d14c8a7be16b4d37957e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Mon, 20 Aug 2012 21:35:11 +0200 Subject: added ui/slider.* --- src/ui/slider.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ui/slider.h') diff --git a/src/ui/slider.h b/src/ui/slider.h index e79b348..0de9b3c 100644 --- a/src/ui/slider.h +++ b/src/ui/slider.h @@ -1,5 +1,6 @@ // * This file is part of the COLOBOT source code // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) // * // * This program is free software: you can redistribute it and/or modify // * it under the terms of the GNU General Public License as published by @@ -23,6 +24,7 @@ #include +namespace Ui { class CSlider : public CControl { @@ -45,10 +47,10 @@ class CSlider : public CControl void SetLimit(float min, float max); void SetVisibleValue(float value); - float RetVisibleValue(); + float GetVisibleValue(); void SetArrowStep(float step); - float RetArrowStep(); + float GetArrowStep(); protected: void MoveAdjust(); @@ -76,3 +78,4 @@ class CSlider : public CControl }; +} -- cgit v1.2.3-1-g7c22