summaryrefslogtreecommitdiff
path: root/src
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 /src
parent87a5d0f5076cd00f6f9f2e9479c760489f54d5a1 (diff)
downloadmana-342c0fae5ec4fd4f653618008ef90eec14200d00.tar.gz
mana-342c0fae5ec4fd4f653618008ef90eec14200d00.tar.bz2
mana-342c0fae5ec4fd4f653618008ef90eec14200d00.tar.xz
mana-342c0fae5ec4fd4f653618008ef90eec14200d00.zip
Move to top the requested windows. Also corrected the default win pos for inventory and equipment.
Diffstat (limited to 'src')
-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
4 files changed, 16 insertions, 2 deletions
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();
}
}