summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/skillinfo.cpp21
-rw-r--r--src/gui/widgets/skillinfo.h3
-rw-r--r--src/gui/widgets/statuswindowattrs.h12
3 files changed, 9 insertions, 27 deletions
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp
index d16994bae..0778b6c12 100644
--- a/src/gui/widgets/skillinfo.cpp
+++ b/src/gui/widgets/skillinfo.cpp
@@ -37,12 +37,9 @@
SkillInfo::SkillInfo() :
skillLevel(),
- skillExp(),
skillEffect(),
useButton(),
errorText(),
- progress(0.0F),
- color(),
dataMap(),
model(nullptr),
data(nullptr),
@@ -76,9 +73,7 @@ SkillInfo::~SkillInfo()
void SkillInfo::update()
{
const int baseLevel = PlayerInfo::getSkillLevel(id);
- const std::pair<int, int> exp = PlayerInfo::getStatExperience(id);
-
- if (modifiable == Modifiable_false && baseLevel == 0 && exp.second == 0)
+ if (modifiable == Modifiable_false && baseLevel == 0)
{
if (visible == Visible_true)
{
@@ -160,20 +155,6 @@ void SkillInfo::update()
level = baseLevel;
skillLevelWidth = -1;
- if (exp.second)
- {
- skillExp = strprintf("%d / %d", exp.first, exp.second);
- progress = static_cast<float>(exp.first)
- / static_cast<float>(exp.second);
- }
- else
- {
- skillExp.clear();
- progress = 0.0F;
- }
-
- color = Theme::getProgressColor(Theme::PROG_EXP, progress);
-
if (updateVisibility && model)
model->updateVisibilities();
diff --git a/src/gui/widgets/skillinfo.h b/src/gui/widgets/skillinfo.h
index e2679713d..038fc2a01 100644
--- a/src/gui/widgets/skillinfo.h
+++ b/src/gui/widgets/skillinfo.h
@@ -48,12 +48,9 @@ typedef SkillDataMap::const_iterator SkillDataMapCIter;
struct SkillInfo final
{
std::string skillLevel;
- std::string skillExp;
std::string skillEffect;
std::string useButton;
std::string errorText;
- float progress;
- Color color;
SkillDataMap dataMap;
SkillModel *model;
SkillData *data;
diff --git a/src/gui/widgets/statuswindowattrs.h b/src/gui/widgets/statuswindowattrs.h
index ee336c616..7359a1a86 100644
--- a/src/gui/widgets/statuswindowattrs.h
+++ b/src/gui/widgets/statuswindowattrs.h
@@ -23,6 +23,8 @@
#ifndef GUI_WIDGETS_STATUSWINDOWATTRS_H
#define GUI_WIDGETS_STATUSWINDOWATTRS_H
+#include "enums/being/attributes.h"
+
#include "gui/widgets/container.h"
#include "gui/widgets/label.h"
@@ -66,11 +68,11 @@ class AttrDisplay notfinal : public Container
protected:
AttrDisplay(const Widget2 *const widget,
- const int id,
+ const AttributesT id,
const std::string &restrict name,
const std::string &restrict shortName);
- const int mId;
+ const AttributesT mId;
const std::string mName;
const std::string mShortName;
@@ -83,7 +85,8 @@ class DerDisplay final : public AttrDisplay
{
public:
DerDisplay(const Widget2 *const widget,
- const int id, const std::string &restrict name,
+ const AttributesT id,
+ const std::string &restrict name,
const std::string &restrict shortName);
A_DELETE_COPY(DerDisplay)
@@ -97,7 +100,8 @@ class ChangeDisplay final : public AttrDisplay,
{
public:
ChangeDisplay(const Widget2 *const widget,
- const int id, const std::string &restrict name,
+ const AttributesT id,
+ const std::string &restrict name,
const std::string &restrict shortName);
A_DELETE_COPY(ChangeDisplay)