diff options
author | Michał Konopacki <konopacki.m@gmail.com> | 2012-08-20 15:12:26 +0200 |
---|---|---|
committer | Michał Konopacki <konopacki.m@gmail.com> | 2012-08-20 15:12:26 +0200 |
commit | 7a4ec2adc4e40a6236ecd76ed5d6492d6ceac15a (patch) | |
tree | e1df82b6fcf9ce34c01b1b06674516747578ef3e /src/ui/key.h | |
parent | 8666d35f7c3129c101029eae1cd0a5124f35b7de (diff) | |
parent | 8d4a3ed57915af2acf8b3dcd9a8aec5a75806ca6 (diff) | |
download | colobot-7a4ec2adc4e40a6236ecd76ed5d6492d6ceac15a.tar.gz colobot-7a4ec2adc4e40a6236ecd76ed5d6492d6ceac15a.tar.bz2 colobot-7a4ec2adc4e40a6236ecd76ed5d6492d6ceac15a.zip |
Merge remote-tracking branch 'erihel/dev-ui' into dev-ui
Conflicts:
src/ui/button.h
src/ui/color.h
src/ui/compass.h
src/ui/control.h
src/ui/displayinfo.h
src/ui/displaytext.h
src/ui/edit.h
src/ui/editvalue.h
src/ui/gauge.h
src/ui/group.h
src/ui/image.h
src/ui/slider.h
Diffstat (limited to 'src/ui/key.h')
-rw-r--r-- | src/ui/key.h | 41 |
1 files changed, 25 insertions, 16 deletions
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 <cctype> +#include <string> -#include "ui/control.h" +#include <ui/control.h> +#include <common/iman.h> +#include <common/event.h> +#include <common/restext.h> +#include <common/key.h> -class CD3DEngine; - +#include <app/app.h> +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; }; +} + |