mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-03 07:17:59 +03:00
Changed indentation of stats window class from 2 spaces and to 4 spaces.
This commit is contained in:
parent
4f296896e1
commit
7bfae798e8
1 changed files with 48 additions and 48 deletions
|
@ -177,68 +177,68 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class StatsWindow : public OEngine::GUI::Layout
|
class StatsWindow : public OEngine::GUI::Layout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::pair<std::string, int> Faction;
|
typedef std::pair<std::string, int> Faction;
|
||||||
typedef std::vector<Faction> FactionList;
|
typedef std::vector<Faction> FactionList;
|
||||||
|
|
||||||
typedef std::vector<int> SkillList;
|
typedef std::vector<int> SkillList;
|
||||||
|
|
||||||
StatsWindow (MWWorld::Environment& environment);
|
StatsWindow (MWWorld::Environment& environment);
|
||||||
|
|
||||||
void setBar(const std::string& name, const std::string& tname, int val, int max);
|
void setBar(const std::string& name, const std::string& tname, int val, int max);
|
||||||
void setPlayerName(const std::string& playerName);
|
void setPlayerName(const std::string& playerName);
|
||||||
|
|
||||||
/// Set value for the given ID.
|
/// Set value for the given ID.
|
||||||
void setValue (const std::string& id, const MWMechanics::Stat<int>& value);
|
void setValue (const std::string& id, const MWMechanics::Stat<int>& value);
|
||||||
void setValue (const std::string& id, const MWMechanics::DynamicStat<int>& value);
|
void setValue (const std::string& id, const MWMechanics::DynamicStat<int>& value);
|
||||||
void setValue (const std::string& id, const std::string& value);
|
void setValue (const std::string& id, const std::string& value);
|
||||||
void setValue (const std::string& id, int value);
|
void setValue (const std::string& id, int value);
|
||||||
|
|
||||||
void setValue (const std::string& id, const MWMechanics::Stat<float>& value);
|
void setValue (const std::string& id, const MWMechanics::Stat<float>& value);
|
||||||
|
|
||||||
void configureSkills (const SkillList& major, const SkillList& minor);
|
void configureSkills (const SkillList& major, const SkillList& minor);
|
||||||
void setFactions (const std::vector<Faction>& factions);
|
void setFactions (const std::vector<Faction>& factions);
|
||||||
void setBirthSign (const std::string &signId);
|
void setBirthSign (const std::string &signId);
|
||||||
void setReputation (int reputation) { this->reputation = reputation; }
|
void setReputation (int reputation) { this->reputation = reputation; }
|
||||||
void setBounty (int bounty) { this->bounty = bounty; }
|
void setBounty (int bounty) { this->bounty = bounty; }
|
||||||
void updateSkillArea();
|
void updateSkillArea();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum ColorStyle
|
enum ColorStyle
|
||||||
{
|
{
|
||||||
CS_Sub,
|
CS_Sub,
|
||||||
CS_Normal,
|
CS_Normal,
|
||||||
CS_Super
|
CS_Super
|
||||||
};
|
};
|
||||||
void setStyledText(MyGUI::WidgetPtr widget, ColorStyle style, const std::string &value);
|
void setStyledText(MyGUI::WidgetPtr widget, ColorStyle style, const std::string &value);
|
||||||
void addSkills(const SkillList &skills, const std::string &titleId, const std::string &titleDefault, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
void addSkills(const SkillList &skills, const std::string &titleId, const std::string &titleDefault, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
||||||
void addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
void addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
||||||
void addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
void addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
||||||
MyGUI::WidgetPtr addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
MyGUI::WidgetPtr addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
||||||
void addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
void addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
||||||
void updateScroller();
|
void updateScroller();
|
||||||
|
|
||||||
void onScrollChangePosition(MyGUI::VScrollPtr scroller, size_t pos);
|
void onScrollChangePosition(MyGUI::VScrollPtr scroller, size_t pos);
|
||||||
void onWindowResize(MyGUI::WidgetPtr window);
|
void onWindowResize(MyGUI::WidgetPtr window);
|
||||||
|
|
||||||
static const int lineHeight;
|
static const int lineHeight;
|
||||||
|
|
||||||
MWWorld::Environment& environment;
|
MWWorld::Environment& environment;
|
||||||
MyGUI::WidgetPtr skillAreaWidget, skillClientWidget;
|
MyGUI::WidgetPtr skillAreaWidget, skillClientWidget;
|
||||||
MyGUI::VScrollPtr skillScrollerWidget;
|
MyGUI::VScrollPtr skillScrollerWidget;
|
||||||
int lastPos, clientHeight;
|
int lastPos, clientHeight;
|
||||||
|
|
||||||
SkillList majorSkills, minorSkills, miscSkills;
|
SkillList majorSkills, minorSkills, miscSkills;
|
||||||
std::map<int, MWMechanics::Stat<float> > skillValues;
|
std::map<int, MWMechanics::Stat<float> > skillValues;
|
||||||
std::map<int, MyGUI::WidgetPtr> skillWidgetMap;
|
std::map<int, MyGUI::WidgetPtr> skillWidgetMap;
|
||||||
std::map<std::string, MyGUI::WidgetPtr> factionWidgetMap;
|
std::map<std::string, MyGUI::WidgetPtr> factionWidgetMap;
|
||||||
FactionList factions; ///< Stores a list of factions and the current rank
|
FactionList factions; ///< Stores a list of factions and the current rank
|
||||||
std::string birthSignId;
|
std::string birthSignId;
|
||||||
int reputation, bounty;
|
int reputation, bounty;
|
||||||
std::vector<MyGUI::WidgetPtr> skillWidgets; //< Skills and other information
|
std::vector<MyGUI::WidgetPtr> skillWidgets; //< Skills and other information
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
class InventoryWindow : public OEngine::GUI::Layout
|
class InventoryWindow : public OEngine::GUI::Layout
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue