summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-10-04 12:54:38 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-10-04 12:54:38 +0000
commit342c0fae5ec4fd4f653618008ef90eec14200d00 (patch)
tree13146318d951e161fe9f3426a55536248ef5b1d6
parent87a5d0f5076cd00f6f9f2e9479c760489f54d5a1 (diff)
downloadmana-client-342c0fae5ec4fd4f653618008ef90eec14200d00.tar.gz
mana-client-342c0fae5ec4fd4f653618008ef90eec14200d00.tar.bz2
mana-client-342c0fae5ec4fd4f653618008ef90eec14200d00.tar.xz
mana-client-342c0fae5ec4fd4f653618008ef90eec14200d00.zip
Move to top the requested windows. Also corrected the default win pos for inventory and equipment.
-rw-r--r--ChangeLog9
-rw-r--r--src/game.cpp9
-rw-r--r--src/gui/equipmentwindow.cpp2
-rw-r--r--src/gui/inventorywindow.cpp2
-rw-r--r--src/gui/menuwindow.cpp5
5 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ac8eae9b..a2ff2470 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,15 @@
+2005-10-04 Yohann Ferreira <bertram@cegetel.net>
+
+ * src/game.cpp, src/gui/menuwindow.cpp, src/gui/inventorywindow.cpp,
+ src/gui/equipmentwindow.cpp: Move to top the requested window with
+ shortcuts or with menu button, also corrected the default position
+ of equipment and inventory windows.
+
2005-10-02 Bjørn Lindeijer <bjorn@lindeijer.nl>
* configure.ac, src/Makefile.am: Added check for pthread library and
removed manual -lpthread and -lguichan linker flags.
- * src/map.cpp: A small start on supporting tile height than the
+ * src/map.cpp: A small start on supporting other tile height than the
default (map) tile height.
* src/gui/window.cpp, src/gui/window.h, src/resources/buddylist.cpp,
src/resources/buddylist.h: Some cleanups (void argument list was
diff --git a/src/game.cpp b/src/game.cpp
index 2ed80da5..c1b9ceef 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -475,6 +475,7 @@ void do_input()
helpWindow->setVisible(false);
} else {
helpWindow->loadHelp("index");
+ if (helpWindow->isVisible()) helpWindow->requestMoveToTop();
}
used = true;
break;
@@ -578,6 +579,7 @@ void do_input()
"Quit", "Are you sure you want to quit?",
(gcn::ActionListener*)&exitListener);
}
+ exitConfirm->requestMoveToTop();
break;
default:
@@ -594,12 +596,14 @@ void do_input()
case SDLK_i:
inventoryWindow->setVisible(
!inventoryWindow->isVisible());
+ if (inventoryWindow->isVisible()) inventoryWindow->requestMoveToTop();
used = true;
break;
// Statistics window
case SDLK_s:
statusWindow->setVisible(!statusWindow->isVisible());
+ if (statusWindow->isVisible()) statusWindow->requestMoveToTop();
used = true;
break;
@@ -607,6 +611,7 @@ void do_input()
// New skills window
case SDLK_n:
newSkillWindow->setVisible(!newSkillWindow->isVisible());
+ if (newSkillWindow->isVisible()) newSkillWindow->requestMoveToTop();
used = true;
break;
*/
@@ -625,12 +630,14 @@ void do_input()
// Skill window
case SDLK_k:
skillDialog->setVisible(!skillDialog->isVisible());
+ if (skillDialog->isVisible()) skillDialog->requestMoveToTop();
used = true;
break;
// Setup window
case SDLK_c:
setupWindow->setVisible(true);
+ setupWindow->requestMoveToTop();
used = true;
break;
@@ -638,6 +645,7 @@ void do_input()
case SDLK_e:
equipmentWindow->setVisible(
!equipmentWindow->isVisible());
+ if (equipmentWindow->isVisible()) equipmentWindow->requestMoveToTop();
used = true;
break;
@@ -645,6 +653,7 @@ void do_input()
// Buddy window
case SDLK_b:
buddyWindow->setVisible(!buddyWindow->isVisible());
+ if (buddyWindow->isVisible()) buddyWindow->requestMoveToTop();
used = true;
break;
*/
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index 1aa5a05f..ba29a1e5 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -40,7 +40,7 @@ EquipmentWindow::EquipmentWindow():
Window("Equipment")
{
setWindowName("Equipment");
- setDefaultSize(5, 160, 200, 90);
+ setDefaultSize(5, 230, 200, 90);
loadWindowState();
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index 3c373165..2fca3e3c 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -49,7 +49,7 @@ InventoryWindow::InventoryWindow():
setResizable(true);
setMinWidth(240);
setMinHeight(172);
- setDefaultSize(105, 25, 322, 172);
+ setDefaultSize(115, 25, 322, 172);
useButton = new Button("Use");
dropButton = new Button("Drop");
diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp
index 1308599f..1e190102 100644
--- a/src/gui/menuwindow.cpp
+++ b/src/gui/menuwindow.cpp
@@ -101,21 +101,26 @@ void MenuWindow::action(const std::string& eventId)
if (eventId == "Status")
{
statusWindow->setVisible(!statusWindow->isVisible());
+ if (statusWindow->isVisible()) statusWindow->requestMoveToTop();
}
if (eventId == "Equipment")
{
equipmentWindow->setVisible(!equipmentWindow->isVisible());
+ if (equipmentWindow->isVisible()) equipmentWindow->requestMoveToTop();
}
if (eventId == "Inventory")
{
inventoryWindow->setVisible(!inventoryWindow->isVisible());
+ if (inventoryWindow->isVisible()) inventoryWindow->requestMoveToTop();
}
if (eventId == "Skills")
{
skillDialog->setVisible(!skillDialog->isVisible());
+ if (skillDialog->isVisible()) skillDialog->requestMoveToTop();
}
if (eventId == "Setup")
{
setupWindow->setVisible(!setupWindow->isVisible());
+ if (setupWindow->isVisible()) setupWindow->requestMoveToTop();
}
}