summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorMateusz Kaduk <mateusz.kaduk@gmail.com>2005-03-13 08:35:35 +0000
committerMateusz Kaduk <mateusz.kaduk@gmail.com>2005-03-13 08:35:35 +0000
commita03175439e5abaae8603a85be0db173daa543f6b (patch)
tree64fb8872de532122a1bf4b493d5a4153bb031a46 /src/engine.cpp
parentab9debf3fa91f3b36c6739f4affbdc187e78113d (diff)
downloadmana-client-a03175439e5abaae8603a85be0db173daa543f6b.tar.gz
mana-client-a03175439e5abaae8603a85be0db173daa543f6b.tar.bz2
mana-client-a03175439e5abaae8603a85be0db173daa543f6b.tar.xz
mana-client-a03175439e5abaae8603a85be0db173daa543f6b.zip
Chat widgets on the top of Window, so it's movable and nicer
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 36e6c212..f19ccd05 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -45,6 +45,7 @@ char npc_button[10] = "Close";
gcn::TextField *chatInput;
gcn::Label *debugInfo;
+Window *chatWindow;
ChatBox *chatBox;
StatusWindow *statusWindow;
BuyDialog *buyDialog;
@@ -134,10 +135,16 @@ int get_y_offset(Being *being) {
Engine::Engine()
{
// Initializes GUI
+ chatWindow = new Window("Chat");
+ chatWindow->setSize(600, 100);
+
chatInput = new TextField();
+ //chatInput->setPosition(chatInput->getBorderSize(),
+ // screen->h - chatInput->getHeight() -
+ // chatInput->getBorderSize());
chatInput->setPosition(chatInput->getBorderSize(),
- screen->h - chatInput->getHeight() -
- chatInput->getBorderSize());
+ chatWindow->getY() + 85);
+
chatInput->setWidth(592 - 2 * chatInput->getBorderSize());
ChatListener *chatListener = new ChatListener();
@@ -150,10 +157,13 @@ Engine::Engine()
chatBox->setSize(592, 100);
chatBox->setPosition(0, chatInput->getY() - 1 - chatBox->getHeight());
- guiTop->add(chatBox);
- guiTop->add(debugInfo);
- guiTop->add(chatInput);
-
+ chatWindow->add(chatBox);
+ //chatWindow->add(debugInfo);
+ chatWindow->add(chatInput);
+
+ chatWindow->setPosition(0, screen->h-12 - chatInput->getHeight() - chatBox->getHeight());
+
+ guiTop->add(chatWindow);
// Create dialogs