From a03175439e5abaae8603a85be0db173daa543f6b Mon Sep 17 00:00:00 2001 From: Mateusz Kaduk Date: Sun, 13 Mar 2005 08:35:35 +0000 Subject: Chat widgets on the top of Window, so it's movable and nicer --- autogen.sh | 4 ++-- src/engine.cpp | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/autogen.sh b/autogen.sh index 8f047c99..21ae79e8 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,9 +4,9 @@ echo "Generating build information using aclocal, autoheader, automake and autoc echo # Regerate configuration files -aclocal +aclocal-1.7 autoheader -automake --gnu --add-missing --copy +automake-1.7 --gnu --add-missing --copy autoconf echo 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 -- cgit v1.2.3-70-g09d2