summaryrefslogtreecommitdiffstats
path: root/src/ui/scroll.h
diff options
context:
space:
mode:
authorZaba999 <zaba.marcin@gmail.com>2012-09-10 23:29:38 +0200
committerZaba999 <zaba.marcin@gmail.com>2012-09-10 23:29:38 +0200
commit479a67a731be5a5e8035ea7acce0344c7c605814 (patch)
treefc0448b4095ce03aeca2a1be98418aae78751d84 /src/ui/scroll.h
parentcf2295d08d0b2d0ba63e316f5e5e3615c5c978ac (diff)
downloadcolobot-479a67a731be5a5e8035ea7acce0344c7c605814.tar.gz
colobot-479a67a731be5a5e8035ea7acce0344c7c605814.tar.bz2
colobot-479a67a731be5a5e8035ea7acce0344c7c605814.zip
Merge with changes from Zaba999 fork.
Diffstat (limited to 'src/ui/scroll.h')
-rw-r--r--src/ui/scroll.h73
1 files changed, 38 insertions, 35 deletions
diff --git a/src/ui/scroll.h b/src/ui/scroll.h
index 6854e61..9dbd8a4 100644
--- a/src/ui/scroll.h
+++ b/src/ui/scroll.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
@@ -19,12 +20,13 @@
#pragma once
-#include "ui/control.h"
+#include <ui/control.h>
+#include <common/event.h>
-class CD3DEngine;
-class CButton;
+namespace Ui {
+class CButton;
const float SCROLL_WIDTH = (15.0f/640.0f);
@@ -32,50 +34,51 @@ const float SCROLL_WIDTH = (15.0f/640.0f);
class CScroll : public CControl
{
-public:
- CScroll(CInstanceManager* iMan);
- ~CScroll();
+ public:
+ CScroll();
+ ~CScroll();
- 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 SetVisibleValue(float value);
- float RetVisibleValue();
+ void SetVisibleValue(float value);
+ float GetVisibleValue();
- void SetVisibleRatio(float value);
- float RetVisibleRatio();
+ void SetVisibleRatio(float value);
+ float GetVisibleRatio();
- void SetArrowStep(float step);
- float RetArrowStep();
+ void SetArrowStep(float step);
+ float GetArrowStep();
-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_buttonUp;
- CButton* m_buttonDown;
+ protected:
+ CButton* m_buttonUp;
+ CButton* m_buttonDown;
- float m_visibleValue;
- float m_visibleRatio;
- float m_step;
+ float m_visibleValue;
+ float m_visibleRatio;
+ float m_step;
- 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;
};
+}