summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game.cpp16
-rw-r--r--src/gui/window.cpp2
2 files changed, 14 insertions, 4 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 11712f6b..fc9d89eb 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -219,10 +219,18 @@ void createGuiWindows()
//buddyWindow->setPosition(10, minimap->getHeight() + 30);
// Set initial window visibility
- chatWindow->setVisible(true);
- miniStatusWindow->setVisible(true);
- menuWindow->setVisible(true);
- itemShortcutWindow->setVisible(true);
+ chatWindow->setVisible((bool) config.getValue(
+ chatWindow->getWindowName() + "Visible", true));
+ miniStatusWindow->setVisible((bool) config.getValue(
+ miniStatusWindow->getWindowName() + "Visible",
+ true));
+ buyDialog->setVisible(false);
+ sellDialog->setVisible(false);
+ tradeWindow->setVisible(false);
+ menuWindow->setVisible((bool) config.getValue(
+ menuWindow->getWindowName() + "Visible", true));
+ itemShortcutWindow->setVisible((bool) config.getValue(
+ itemShortcutWindow->getWindowName() + "Visible", true));
if (config.getValue("logToChat", 0))
{
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index c40f8a25..582e4a67 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -135,6 +135,7 @@ Window::~Window()
// Saving X, Y and Width and Height for resizables in the config
config.setValue(name + "WinX", getX());
config.setValue(name + "WinY", getY());
+ config.setValue(name + "Visible", isVisible());
if (mGrip)
{
@@ -473,6 +474,7 @@ void Window::loadWindowState()
setPosition((int) config.getValue(name + "WinX", mDefaultX),
(int) config.getValue(name + "WinY", mDefaultY));
+ setVisible((bool) config.getValue(name + "Visible", false));
if (mGrip)
{