From 10b2c562fb7635f9850f1441f08ba8b1a71e31e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Wed, 15 Aug 2012 01:48:49 +0200 Subject: First approach to port 2D UI Interface - changes in src/ui ; be CAREFUL, not every file is changed in a proper way -> bugs - necessary changes in object/robotmain.h and common/misc.h/.cpp in order to compile --- src/ui/button.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ui/button.h') diff --git a/src/ui/button.h b/src/ui/button.h index 0a05b11..38b2dab 100644 --- a/src/ui/button.h +++ b/src/ui/button.h @@ -22,7 +22,7 @@ #include "ui/control.h" -class CD3DEngine; +//class CD3DEngine; @@ -32,17 +32,17 @@ public: CButton(CInstanceManager* iMan); virtual ~CButton(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); bool EventProcess(const Event &event); void Draw(); void SetImmediat(bool bRepeat); - bool RetImmediat(); + bool GetImmediat(); void SetRepeat(bool bRepeat); - bool RetRepeat(); + bool GetRepeat(); protected: -- cgit v1.2.3-1-g7c22 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/button.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/button.h') diff --git a/src/ui/button.h b/src/ui/button.h index 38b2dab..4f1740d 100644 --- a/src/ui/button.h +++ b/src/ui/button.h @@ -29,7 +29,7 @@ class CButton : public CControl { public: - CButton(CInstanceManager* iMan); + CButton(); virtual ~CButton(); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); -- cgit v1.2.3-1-g7c22 From 574c07e388dfd902b6565bc4a5ac9b915c73074e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Konopacki?= Date: Sat, 18 Aug 2012 22:56:42 +0200 Subject: Further improvements in UI porting --- src/ui/button.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/ui/button.h') diff --git a/src/ui/button.h b/src/ui/button.h index 38b2dab..d70b3d6 100644 --- a/src/ui/button.h +++ b/src/ui/button.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 @@ -21,16 +22,16 @@ #include "ui/control.h" +namespace Gfx{ +class CEngine; +} -//class CD3DEngine; - - - +namespace Ui { class CButton : public CControl { public: - CButton(CInstanceManager* iMan); - virtual ~CButton(); + CButton (); + virtual ~CButton (); bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); @@ -53,4 +54,4 @@ protected: float m_repeat; }; - +} -- cgit v1.2.3-1-g7c22 From 6ba0f42f22a170625f15879e01b4653a4ac153a1 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 31 Aug 2012 22:28:07 +0200 Subject: latest changes; few more classes should compile now --- src/ui/button.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ui/button.h') diff --git a/src/ui/button.h b/src/ui/button.h index 924a4d8..789b51c 100644 --- a/src/ui/button.h +++ b/src/ui/button.h @@ -20,13 +20,17 @@ #pragma once -#include "ui/control.h" +#include + +#include + +#include +#include +#include -namespace Gfx{ -class CEngine; -} namespace Ui { + class CButton : public CControl { public: -- cgit v1.2.3-1-g7c22 From 01cc0fbc49696a19a56dfdd8359d4bb77e868925 Mon Sep 17 00:00:00 2001 From: erihel Date: Tue, 11 Sep 2012 12:49:41 +0200 Subject: * latest changes * all files except studio, map and maindialog should compile * did some code cleanup --- src/ui/button.h | 49 +++++++++++++++++++++---------------------------- 1 file changed, 21 insertions(+), 28 deletions(-) (limited to 'src/ui/button.h') diff --git a/src/ui/button.h b/src/ui/button.h index 789b51c..ffaf220 100644 --- a/src/ui/button.h +++ b/src/ui/button.h @@ -19,43 +19,36 @@ #pragma once - -#include - -#include - -#include -#include -#include - +#include "control.h" namespace Ui { -class CButton : public CControl -{ -public: - CButton(); - virtual ~CButton(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); + class CButton : public CControl + { + public: + CButton(); + virtual ~CButton(); + + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventType); - bool EventProcess(const Event &event); + bool EventProcess(const Event &event); - void Draw(); + void Draw(); - void SetImmediat(bool bRepeat); - bool GetImmediat(); + void SetImmediat(bool bRepeat); + bool GetImmediat(); - void SetRepeat(bool bRepeat); - bool GetRepeat(); + void SetRepeat(bool bRepeat); + bool GetRepeat(); -protected: + protected: -protected: - bool m_bCapture; - bool m_bImmediat; - bool m_bRepeat; - float m_repeat; -}; + protected: + bool m_bCapture; + bool m_bImmediat; + bool m_bRepeat; + float m_repeat; + }; } -- cgit v1.2.3-1-g7c22