diff options
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 6066ae592..653ad2e34 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -1,11 +1,11 @@ /* - * The ManaPlus Client + * The ManaVerse Client * Copyright (C) 2004-2009 The Mana World Development Team * Copyright (C) 2009-2010 The Mana Developers * Copyright (C) 2011-2020 The ManaPlus Developers - * Copyright (C) 2020-2023 The ManaVerse Developers + * Copyright (C) 2020-2025 The ManaVerse Developers * - * This file is part of The ManaPlus Client. + * This file is part of The ManaVerse Client. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -239,7 +239,8 @@ StatusWindow::~StatusWindow() void StatusWindow::addTabs() { // TRANSLATORS: status window tab name - addTabBasic(_("Basic")); + mTabs->addTab(_("Basic"), mBasicStatsPage); + const STD_VECTOR<std::string> &pages = StatDb::getPages(); FOR_EACH(STD_VECTOR<std::string>::const_iterator, it, pages) { @@ -251,17 +252,10 @@ void StatusWindow::addTabs() void StatusWindow::addTab(const std::string &name) { StatsPage *const page = new StatsPage(this, name); - mTabs->addTab(name, - page); + mTabs->addTab(name, page); mPages.push_back(page); } -void StatusWindow::addTabBasic(const std::string &name) -{ - mTabs->addTab(name, - mBasicStatsPage); -} - void StatusWindow::updateLevelLabel() { if (localPlayer == nullptr) @@ -525,8 +519,8 @@ void StatusWindow::updateWeightBar(ProgressBar *const bar) } else { - const int totalWeight = PlayerInfo::getAttribute( - Attributes::TOTAL_WEIGHT); + const int totalWeight + = PlayerInfo::getAttribute(Attributes::TOTAL_WEIGHT); const int maxWeight = PlayerInfo::getAttribute(Attributes::MAX_WEIGHT); float progress = 1.0F; if (maxWeight != 0) |