diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/gui/chat.cpp | 1 | ||||
-rw-r--r-- | src/gui/equipmentwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/help.cpp | 1 | ||||
-rw-r--r-- | src/gui/inventorywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/minimap.cpp | 1 | ||||
-rw-r--r-- | src/gui/ministatus.cpp | 8 | ||||
-rw-r--r-- | src/gui/skill.cpp | 2 | ||||
-rw-r--r-- | src/gui/status.cpp | 1 | ||||
-rw-r--r-- | src/gui/window.cpp | 11 | ||||
-rw-r--r-- | src/gui/window.h | 12 |
11 files changed, 39 insertions, 7 deletions
@@ -1,8 +1,12 @@ -2005-09-26 Yohann Ferreira <bertram@cegetel.net> +2005-09-28 Yohann Ferreira <bertram@cegetel.net> * src/gui/updaterwindow.cpp: Fixed the scroll bug in the update window. * src/gui/ministatus.h, src/gui/ministatus.cpp: Added HP, MP Display in mini-status window. + * src/gui/window.h, src/gui/window.cpp, src/gui/skill.cpp, + src/gui/status.cpp, src/gui/equipmentwindow.cpp, src/gui/help.cpp, + src/gui/inventorywindow.cpp, src/gui/minimap.cpp, src/gui/chat.cpp: + Added window internal name to later get X, Y, height and width be saved. 2005-09-28 Björn Steinbrink <B.Steinbrink@gmx.de> diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index be06a14a..0b31c8d6 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -41,6 +41,7 @@ ChatWindow::ChatWindow(const std::string &logfile): Window("") { + setName("Chat"); chatlog_file.open(logfile.c_str(), std::ios::out | std::ios::app); items = 0; items_keep = 20; diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index eeaa13da..93104c24 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -41,6 +41,7 @@ EquipmentWindow::EquipmentWindow(): { setContentSize(200, 90); setPosition(40, 40); + setName("Equipment"); ResourceManager *resman = ResourceManager::getInstance(); Image *itemImg = resman->getImage("graphics/sprites/items.png"); diff --git a/src/gui/help.cpp b/src/gui/help.cpp index 29a2d24b..ac6d8c61 100644 --- a/src/gui/help.cpp +++ b/src/gui/help.cpp @@ -36,6 +36,7 @@ HelpWindow::HelpWindow(): Window("Help") { setContentSize(455, 350); + setName("Help"); browserBox = new BrowserBox(); browserBox->setOpaque(false); diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index b65979db..bb4e8a4e 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -46,6 +46,8 @@ InventoryWindow::InventoryWindow(): Window("Inventory") { setContentSize(322, 172); + setName("Inventory"); + useButton = new Button("Use"); dropButton = new Button("Drop"); diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index a6d1ef6c..dedebcea 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -34,6 +34,7 @@ Minimap::Minimap(): Window("Map"), mMapImage(NULL) { + setName("MiniMap"); setContentSize(100, 100); setPosition(20, 20); } diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp index 8814a5fd..fe6db718 100644 --- a/src/gui/ministatus.cpp +++ b/src/gui/ministatus.cpp @@ -45,12 +45,8 @@ MiniStatusWindow::MiniStatusWindow(): hpBar->getX() + hpBar->getWidth() + 3, hpBar->getY(), 100, 20, 26, 102, 230); - hpLabel = new gcn::Label("/"); - mpLabel = new gcn::Label("/"); - hpLabel->setPosition(hpBar->getX() + int((hpBar->getWidth() / 2) - (hpLabel->getWidth() / 2)), - hpBar->getY() + int((hpBar->getHeight() / 2) - (hpLabel->getHeight() / 2))); - mpLabel->setPosition(mpBar->getX() + int((mpBar->getWidth() / 2) - (mpLabel->getWidth() / 2)), - mpBar->getY() + int((mpBar->getHeight() / 2) - (mpLabel->getHeight() / 2))); + hpLabel = new gcn::Label(""); + mpLabel = new gcn::Label(""); add(hpBar); add(mpBar); diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp index 72e89d55..6b33bf36 100644 --- a/src/gui/skill.cpp +++ b/src/gui/skill.cpp @@ -64,6 +64,8 @@ SkillDialog::SkillDialog(): Window("Skills"), skillPoints(0) { + setName("Skills"); + skillListBox = new ListBox(this); skillScrollArea = new ScrollArea(skillListBox); pointsLabel = new gcn::Label("Skill Points:"); diff --git a/src/gui/status.cpp b/src/gui/status.cpp index aea72995..8b27146a 100644 --- a/src/gui/status.cpp +++ b/src/gui/status.cpp @@ -37,6 +37,7 @@ StatusWindow::StatusWindow(): Window(player_info->name) { + setName("Status"); setResizable(true); setContentSize(365, 255); diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 642b891f..706780be 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -68,6 +68,7 @@ class WindowConfigListener : public ConfigListener Window::Window(const std::string& caption, bool modal, Window *parent): gcn::Window(caption), parent(parent), + mWindowName("window"), snapSize(8), title(true), modal(modal), @@ -405,3 +406,13 @@ gcn::Rectangle Window::getGripDimension () return gcn::Rectangle(getWidth() - resizeGrip->getWidth(), getHeight() - resizeGrip->getHeight(), getWidth(), getHeight()); } + +void Window::setWindowName(std::string name) +{ + mWindowName = name; +} + +std::string Window::getWindowName() +{ + return mWindowName; +} diff --git a/src/gui/window.h b/src/gui/window.h index df692d08..057981ef 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -159,9 +159,21 @@ class Window : public gcn::Window */ gcn::Rectangle getGripDimension(); + /** + * set Window internal name + */ + void setWindowName(std::string name); + + /** + * Get window internal name + */ + std::string getWindowName(); + + protected: gcn::Container *chrome; /**< Contained container */ Window *parent; /**< The parent window */ + std::string mWindowName; /**< Window internal name */ int snapSize; /**< Snap distance to window edge */ bool title; /**< Window has a title bar */ bool modal; /**< Window is modal */ |