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/key.h | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'src/ui/key.h') diff --git a/src/ui/key.h b/src/ui/key.h index 314f39b..db7d856 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,39 @@ #pragma once +#include +#include -#include "ui/control.h" +#include +#include +#include +#include -class CD3DEngine; - +#include 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 ea6269c4110282a3e7c05bec9c7f17ffd1bd5191 Mon Sep 17 00:00:00 2001 From: erihel Date: Fri, 17 Aug 2012 23:03:52 +0200 Subject: * ui/key.cpp compiles * csoundinterface to ccontrol --- src/ui/key.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui/key.h') diff --git a/src/ui/key.h b/src/ui/key.h index db7d856..5ca71b0 100644 --- a/src/ui/key.h +++ b/src/ui/key.h @@ -27,9 +27,11 @@ #include #include #include +#include #include +namespace Ui { class CKey : public CControl { @@ -55,3 +57,5 @@ class CKey : public CControl }; +} + -- cgit v1.2.3-1-g7c22