From 479a67a731be5a5e8035ea7acce0344c7c605814 Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Mon, 10 Sep 2012 23:29:38 +0200 Subject: Merge with changes from Zaba999 fork. --- src/ui/key.h | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'src/ui/key.h') diff --git a/src/ui/key.h b/src/ui/key.h index 314f39b..5ca71b0 100644 --- a/src/ui/key.h +++ b/src/ui/key.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 @@ -18,35 +19,43 @@ #pragma once +#include +#include -#include "ui/control.h" +#include +#include +#include +#include +#include -class CD3DEngine; - +#include +namespace Ui { class CKey : public CControl { -public: - CKey(CInstanceManager* iMan); - virtual ~CKey(); + public: + CKey(); + virtual ~CKey(); - bool Create(Math::Point pos, Math::Point dim, int icon, EventMsg eventMsg); + bool Create(Math::Point pos, Math::Point dim, int icon, EventType eventMsg); + bool EventProcess(const Event &event); - bool EventProcess(const Event &event); + void Draw(); - void Draw(); + void SetKey(int option, int key); + int GetKey(int option); - void SetKey(int option, int key); - int RetKey(int option); + protected: + bool TestKey(int key); -protected: - bool TestKey(int key); + int m_key[2]; + bool m_bCatch; -protected: - int m_key[2]; - bool m_bCatch; + CApplication *m_app; }; +} + -- cgit v1.2.3-1-g7c22 From 4a639cf543c15d45a37674d7eadaf09c23c2203d Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Wed, 19 Sep 2012 00:04:21 +0200 Subject: Fixed includes in ui. --- src/ui/key.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ui/key.h') diff --git a/src/ui/key.h b/src/ui/key.h index 5ca71b0..be28b6e 100644 --- a/src/ui/key.h +++ b/src/ui/key.h @@ -22,14 +22,14 @@ #include #include -#include +#include "ui/control.h" -#include -#include -#include -#include +#include "common/iman.h" +#include "common/event.h" +#include "common/restext.h" +#include "common/key.h" -#include +#include "app/app.h" namespace Ui { -- cgit v1.2.3-1-g7c22