summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-24 00:20:24 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-24 00:20:24 +0300
commit5a5de75f298bea6f2b861dc1fb9aaf1f3d35d07c (patch)
tree0d184c893ccedf2d0f422556e57c91c05879a495 /src
parent937518a2587c2c63649c2e011c33338b7eafe87c (diff)
downloadmv-5a5de75f298bea6f2b861dc1fb9aaf1f3d35d07c.tar.gz
mv-5a5de75f298bea6f2b861dc1fb9aaf1f3d35d07c.tar.bz2
mv-5a5de75f298bea6f2b861dc1fb9aaf1f3d35d07c.tar.xz
mv-5a5de75f298bea6f2b861dc1fb9aaf1f3d35d07c.zip
Use window as base class for ministatuswindow.
Diffstat (limited to 'src')
-rw-r--r--src/gui/windows/ministatuswindow.cpp12
-rw-r--r--src/gui/windows/ministatuswindow.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 216d33f42..d8f28535f 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -52,7 +52,7 @@ extern volatile int tick_time;
typedef std::vector <ProgressBar*>::const_iterator ProgressBarVectorCIter;
MiniStatusWindow::MiniStatusWindow() :
- Popup("MiniStatus", "ministatus.xml"),
+ Window("MiniStatus", false, nullptr, "ministatus.xml"),
InventoryListener(),
mBars(),
mBarNames(),
@@ -134,7 +134,7 @@ MiniStatusWindow::MiniStatusWindow() :
loadBars();
updateBars();
- setVisible(config.getValueBool(getPopupName() + "Visible", true));
+ setVisible(true);
addMouseListener(this);
Inventory *const inv = PlayerInfo::getInventory();
if (inv)
@@ -194,7 +194,7 @@ void MiniStatusWindow::updateBars()
int x = 0;
const ProgressBar *lastBar = nullptr;
FOR_EACH (ProgressBarVectorCIter, it, mBars)
- safeRemove(*it);
+ remove(*it);
FOR_EACH (ProgressBarVectorCIter, it, mBars)
{
@@ -296,7 +296,7 @@ void MiniStatusWindow::updateStatus()
void MiniStatusWindow::logic()
{
BLOCK_START("MiniStatusWindow::logic")
- Popup::logic();
+ Window::logic();
for (size_t i = 0, sz = mIcons.size(); i < sz; i++)
{
@@ -316,7 +316,7 @@ void MiniStatusWindow::draw(Graphics *graphics)
void MiniStatusWindow::mouseMoved(MouseEvent &event)
{
- Popup::mouseMoved(event);
+ Window::mouseMoved(event);
const int x = event.getX();
const int y = event.getY();
@@ -454,7 +454,7 @@ void MiniStatusWindow::mousePressed(MouseEvent &event)
void MiniStatusWindow::mouseExited(MouseEvent &event)
{
- Popup::mouseExited(event);
+ Window::mouseExited(event);
mTextPopup->hide();
mStatusPopup->hide();
diff --git a/src/gui/windows/ministatuswindow.h b/src/gui/windows/ministatuswindow.h
index feabb82d0..6939f8f54 100644
--- a/src/gui/windows/ministatuswindow.h
+++ b/src/gui/windows/ministatuswindow.h
@@ -27,7 +27,7 @@
#include "listeners/depricatedlistener.h"
-#include "gui/widgets/popup.h"
+#include "gui/widgets/window.h"
#include <vector>
@@ -42,7 +42,7 @@ class TextPopup;
*
* \ingroup Interface
*/
-class MiniStatusWindow final : public Popup,
+class MiniStatusWindow final : public Window,
public InventoryListener,
public DepricatedListener
{