summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-16 13:30:46 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-16 13:44:58 +0300
commit9e3f92a3914e28ce01331d7df7d03c31244a843b (patch)
treef1e8618bb1f649e10f78f4d2d53d6861474930f5 /src/gui/windows
parent9ca8495acdebb975a7b0777e11d7c599e61c0185 (diff)
downloadplus-9e3f92a3914e28ce01331d7df7d03c31244a843b.tar.gz
plus-9e3f92a3914e28ce01331d7df7d03c31244a843b.tar.bz2
plus-9e3f92a3914e28ce01331d7df7d03c31244a843b.tar.xz
plus-9e3f92a3914e28ce01331d7df7d03c31244a843b.zip
move keyevent into events directory.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/charcreatedialog.cpp5
-rw-r--r--src/gui/windows/charcreatedialog.h2
-rw-r--r--src/gui/windows/charselectdialog.cpp5
-rw-r--r--src/gui/windows/charselectdialog.h2
-rw-r--r--src/gui/windows/chatwindow.cpp5
-rw-r--r--src/gui/windows/chatwindow.h2
-rw-r--r--src/gui/windows/editserverdialog.cpp5
-rw-r--r--src/gui/windows/editserverdialog.h2
-rw-r--r--src/gui/windows/inventorywindow.cpp7
-rw-r--r--src/gui/windows/inventorywindow.h4
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
-rw-r--r--src/gui/windows/itemamountwindow.h2
-rw-r--r--src/gui/windows/logindialog.cpp5
-rw-r--r--src/gui/windows/logindialog.h2
-rw-r--r--src/gui/windows/quitdialog.cpp5
-rw-r--r--src/gui/windows/quitdialog.h2
-rw-r--r--src/gui/windows/registerdialog.cpp5
-rw-r--r--src/gui/windows/registerdialog.h2
-rw-r--r--src/gui/windows/serverdialog.cpp5
-rw-r--r--src/gui/windows/serverdialog.h2
-rw-r--r--src/gui/windows/updaterwindow.cpp5
-rw-r--r--src/gui/windows/updaterwindow.h2
-rw-r--r--src/gui/windows/worldselectdialog.cpp5
-rw-r--r--src/gui/windows/worldselectdialog.h2
24 files changed, 48 insertions, 37 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 23be4eacf..0d324439b 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -24,8 +24,9 @@
#include "main.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/windows/okdialog.h"
@@ -664,7 +665,7 @@ void CharCreateDialog::updatePlayer()
}
}
-void CharCreateDialog::keyPressed(gcn::KeyEvent &keyEvent)
+void CharCreateDialog::keyPressed(KeyEvent &keyEvent)
{
const int actionId = static_cast<KeyEvent*>(&keyEvent)->getActionId();
switch (actionId)
diff --git a/src/gui/windows/charcreatedialog.h b/src/gui/windows/charcreatedialog.h
index d98860566..123d826f2 100644
--- a/src/gui/windows/charcreatedialog.h
+++ b/src/gui/windows/charcreatedialog.h
@@ -76,7 +76,7 @@ class CharCreateDialog final : public Window,
void updatePlayer();
- void keyPressed(gcn::KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &keyEvent) override final;
private:
int getDistributedPoints() const A_WARN_UNUSED;
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index 793315067..b18e6df5b 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -26,8 +26,9 @@
#include "configuration.h"
#include "units.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/windows/charcreatedialog.h"
#include "gui/windows/confirmdialog.h"
@@ -315,7 +316,7 @@ void CharSelectDialog::use(const int selected)
}
}
-void CharSelectDialog::keyPressed(gcn::KeyEvent &keyEvent)
+void CharSelectDialog::keyPressed(KeyEvent &keyEvent)
{
const int actionId = static_cast<KeyEvent*>(&keyEvent)->getActionId();
switch (actionId)
diff --git a/src/gui/windows/charselectdialog.h b/src/gui/windows/charselectdialog.h
index e2b9c1ba8..348811ee3 100644
--- a/src/gui/windows/charselectdialog.h
+++ b/src/gui/windows/charselectdialog.h
@@ -63,7 +63,7 @@ class CharSelectDialog final : public Window,
void action(const ActionEvent &event) override final;
- void keyPressed(gcn::KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &keyEvent) override final;
enum SelectAction
{
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 40b4b9400..11551b5cb 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -35,8 +35,9 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
+#include "events/keyevent.h"
+
#include "input/inputmanager.h"
-#include "input/keyevent.h"
#include "gui/sdlfont.h"
#include "gui/sdlinput.h"
@@ -836,7 +837,7 @@ void ChatWindow::mouseDragged(gcn::MouseEvent &event)
temp = str; \
break
-void ChatWindow::keyPressed(gcn::KeyEvent &event)
+void ChatWindow::keyPressed(KeyEvent &event)
{
const int key = event.getKey().getValue();
const int actionId = static_cast<KeyEvent*>(&event)->getActionId();
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index f8458bd32..e664e63ce 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -169,7 +169,7 @@ class ChatWindow final : public Window,
void localChatInput(const std::string &msg) const;
/** Called when key is pressed */
- void keyPressed(gcn::KeyEvent &event) override final;
+ void keyPressed(KeyEvent &event) override final;
/** Set the chat input as the given text. */
void setInputText(const std::string &text);
diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp
index d8301f5ce..82c255863 100644
--- a/src/gui/windows/editserverdialog.cpp
+++ b/src/gui/windows/editserverdialog.cpp
@@ -21,8 +21,9 @@
#include "gui/windows/editserverdialog.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/windows/okdialog.h"
#include "gui/windows/serverdialog.h"
@@ -284,7 +285,7 @@ void EditServerDialog::action(const ActionEvent &event)
}
}
-void EditServerDialog::keyPressed(gcn::KeyEvent &keyEvent)
+void EditServerDialog::keyPressed(KeyEvent &keyEvent)
{
if (keyEvent.isConsumed())
return;
diff --git a/src/gui/windows/editserverdialog.h b/src/gui/windows/editserverdialog.h
index 55c200934..8907a2846 100644
--- a/src/gui/windows/editserverdialog.h
+++ b/src/gui/windows/editserverdialog.h
@@ -94,7 +94,7 @@ class EditServerDialog final : public Window,
*/
void action(const ActionEvent &event) override final;
- void keyPressed(gcn::KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &keyEvent) override final;
private:
TextField *mServerAddressField;
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 2412b524b..24b5cdab3 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -28,8 +28,9 @@
#include "being/playerinfo.h"
+#include "events/keyevent.h"
+
#include "input/inputmanager.h"
-#include "input/keyevent.h"
#include "gui/viewport.h"
@@ -612,7 +613,7 @@ void InventoryWindow::mouseExited(gcn::MouseEvent &event A_UNUSED)
mTextPopup->hide();
}
-void InventoryWindow::keyPressed(gcn::KeyEvent &event)
+void InventoryWindow::keyPressed(KeyEvent &event)
{
if (static_cast<KeyEvent*>(&event)->getActionId()
== static_cast<int>(Input::KEY_GUI_MOD))
@@ -621,7 +622,7 @@ void InventoryWindow::keyPressed(gcn::KeyEvent &event)
}
}
-void InventoryWindow::keyReleased(gcn::KeyEvent &event)
+void InventoryWindow::keyReleased(KeyEvent &event)
{
if (static_cast<KeyEvent*>(&event)->getActionId()
== static_cast<int>(Input::KEY_GUI_MOD))
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index cd5172c03..03f64b562 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -102,12 +102,12 @@ class InventoryWindow final : public Window,
/**
* Handles the key presses.
*/
- void keyPressed(gcn::KeyEvent &event) override final;
+ void keyPressed(KeyEvent &event) override final;
/**
* Handles the key releases.
*/
- void keyReleased(gcn::KeyEvent &event) override final;
+ void keyReleased(KeyEvent &event) override final;
/**
* Updates labels to currently selected item.
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 40ca481b0..2158c4dd9 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -435,7 +435,7 @@ void ItemAmountWindow::close()
scheduleDelete();
}
-void ItemAmountWindow::keyReleased(gcn::KeyEvent &keyEvent A_UNUSED)
+void ItemAmountWindow::keyReleased(KeyEvent &keyEvent A_UNUSED)
{
mItemAmountSlide->setValue2(mItemAmountTextField->getValue());
}
diff --git a/src/gui/windows/itemamountwindow.h b/src/gui/windows/itemamountwindow.h
index 46e20353e..76d53eeeb 100644
--- a/src/gui/windows/itemamountwindow.h
+++ b/src/gui/windows/itemamountwindow.h
@@ -82,7 +82,7 @@ class ItemAmountWindow final : public Window,
*/
void close();
- void keyReleased(gcn::KeyEvent &keyEvent) override final;
+ void keyReleased(KeyEvent &keyEvent) override final;
/**
* Creates the dialog, or bypass it if there aren't enough items.
diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp
index 44a19346f..f9988a0c3 100644
--- a/src/gui/windows/logindialog.cpp
+++ b/src/gui/windows/logindialog.cpp
@@ -25,8 +25,9 @@
#include "client.h"
#include "configuration.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/windows/confirmdialog.h"
@@ -318,7 +319,7 @@ void LoginDialog::action(const ActionEvent &event)
}
}
-void LoginDialog::keyPressed(gcn::KeyEvent &keyEvent)
+void LoginDialog::keyPressed(KeyEvent &keyEvent)
{
if (keyEvent.isConsumed())
{
diff --git a/src/gui/windows/logindialog.h b/src/gui/windows/logindialog.h
index fee21f307..7150b62c1 100644
--- a/src/gui/windows/logindialog.h
+++ b/src/gui/windows/logindialog.h
@@ -71,7 +71,7 @@ class LoginDialog final : public Window,
/**
* Called when a key is pressed in one of the text fields.
*/
- void keyPressed(gcn::KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &keyEvent) override final;
void close() override final;
diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp
index 2c264f232..c47fb1f0e 100644
--- a/src/gui/windows/quitdialog.cpp
+++ b/src/gui/windows/quitdialog.cpp
@@ -28,8 +28,9 @@
#include "soundconsts.h"
#include "soundmanager.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/viewport.h"
@@ -202,7 +203,7 @@ void QuitDialog::action(const ActionEvent &event)
scheduleDelete();
}
-void QuitDialog::keyPressed(gcn::KeyEvent &keyEvent)
+void QuitDialog::keyPressed(KeyEvent &keyEvent)
{
const int actionId = static_cast<KeyEvent*>(&keyEvent)->getActionId();
int dir = 0;
diff --git a/src/gui/windows/quitdialog.h b/src/gui/windows/quitdialog.h
index 5f0824ff4..8ce60d06c 100644
--- a/src/gui/windows/quitdialog.h
+++ b/src/gui/windows/quitdialog.h
@@ -64,7 +64,7 @@ class QuitDialog final : public Window,
*/
void action(const ActionEvent &event) override final;
- void keyPressed(gcn::KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &keyEvent) override final;
private:
void placeOption(ContainerPlacer &placer,
diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp
index a89b09d5b..530a33758 100644
--- a/src/gui/windows/registerdialog.cpp
+++ b/src/gui/windows/registerdialog.cpp
@@ -24,8 +24,9 @@
#include "client.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/windows/okdialog.h"
@@ -281,7 +282,7 @@ void RegisterDialog::action(const ActionEvent &event)
}
}
-void RegisterDialog::keyPressed(gcn::KeyEvent &keyEvent)
+void RegisterDialog::keyPressed(KeyEvent &keyEvent)
{
if (keyEvent.isConsumed())
{
diff --git a/src/gui/windows/registerdialog.h b/src/gui/windows/registerdialog.h
index 766f4b6b1..1d5b5e48b 100644
--- a/src/gui/windows/registerdialog.h
+++ b/src/gui/windows/registerdialog.h
@@ -87,7 +87,7 @@ class RegisterDialog final : public Window,
/**
* Called when a key is pressed in one of the text fields.
*/
- void keyPressed(gcn::KeyEvent &keyEvent) override;
+ void keyPressed(KeyEvent &keyEvent) override;
void close() override;
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index 8d42d83e9..6d61b3eb2 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -27,8 +27,9 @@
#include "configuration.h"
#include "main.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/sdlfont.h"
@@ -444,7 +445,7 @@ void ServerDialog::action(const ActionEvent &event)
}
}
-void ServerDialog::keyPressed(gcn::KeyEvent &keyEvent)
+void ServerDialog::keyPressed(KeyEvent &keyEvent)
{
switch (static_cast<KeyEvent*>(&keyEvent)->getActionId())
{
diff --git a/src/gui/windows/serverdialog.h b/src/gui/windows/serverdialog.h
index 4e711d732..d14360b88 100644
--- a/src/gui/windows/serverdialog.h
+++ b/src/gui/windows/serverdialog.h
@@ -118,7 +118,7 @@ class ServerDialog final : public Window,
*/
void action(const ActionEvent &event) override final;
- void keyPressed(gcn::KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &keyEvent) override final;
/**
* Called when the selected value changed in the servers list box.
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index 9df4fdc57..12a5cb0c4 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -25,8 +25,9 @@
#include "client.h"
#include "configuration.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/widgets/browserbox.h"
#include "gui/widgets/button.h"
@@ -290,7 +291,7 @@ void UpdaterWindow::action(const ActionEvent &event)
}
}
-void UpdaterWindow::keyPressed(gcn::KeyEvent &keyEvent)
+void UpdaterWindow::keyPressed(KeyEvent &keyEvent)
{
const int actionId = static_cast<KeyEvent*>(&keyEvent)->getActionId();
if (actionId == static_cast<int>(Input::KEY_GUI_CANCEL))
diff --git a/src/gui/windows/updaterwindow.h b/src/gui/windows/updaterwindow.h
index 879a9eac3..ffd5b3103 100644
--- a/src/gui/windows/updaterwindow.h
+++ b/src/gui/windows/updaterwindow.h
@@ -121,7 +121,7 @@ class UpdaterWindow final : public Window,
void action(const ActionEvent &event) override final;
- void keyPressed(gcn::KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &keyEvent) override final;
void logic() override final;
diff --git a/src/gui/windows/worldselectdialog.cpp b/src/gui/windows/worldselectdialog.cpp
index 5d81e249e..03545bcc4 100644
--- a/src/gui/windows/worldselectdialog.cpp
+++ b/src/gui/windows/worldselectdialog.cpp
@@ -24,8 +24,9 @@
#include "client.h"
+#include "events/keyevent.h"
+
#include "input/keydata.h"
-#include "input/keyevent.h"
#include "gui/widgets/button.h"
#include "gui/widgets/layout.h"
@@ -153,7 +154,7 @@ void WorldSelectDialog::action(const ActionEvent &event)
}
}
-void WorldSelectDialog::keyPressed(gcn::KeyEvent &keyEvent)
+void WorldSelectDialog::keyPressed(KeyEvent &keyEvent)
{
const int actionId = static_cast<KeyEvent*>(
&keyEvent)->getActionId();
diff --git a/src/gui/windows/worldselectdialog.h b/src/gui/windows/worldselectdialog.h
index 9315317bf..9d06ac25e 100644
--- a/src/gui/windows/worldselectdialog.h
+++ b/src/gui/windows/worldselectdialog.h
@@ -65,7 +65,7 @@ class WorldSelectDialog final : public Window,
*/
void action(const ActionEvent &event) override final;
- void keyPressed(gcn::KeyEvent &keyEvent) override final;
+ void keyPressed(KeyEvent &keyEvent) override final;
private:
WorldListModel *mWorldListModel;