OpenMW
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
MWGui::StatsWindow Class Reference

#include <statswindow.hpp>

List of all members.

Public Types

typedef std::map< std::string,
int > 
FactionList
typedef std::vector< int > SkillList

Public Member Functions

 StatsWindow ()
void onFrame ()
 automatically updates all the data in the stats window, but only if it has changed.
void setBar (const std::string &name, const std::string &tname, int val, int max)
void setPlayerName (const std::string &playerName)
void setValue (const std::string &id, const MWMechanics::Stat< int > &value)
 Set value for the given ID.
void setValue (const std::string &id, const MWMechanics::DynamicStat< float > &value)
void setValue (const std::string &id, const std::string &value)
void setValue (const std::string &id, int value)
void setValue (const ESM::Skill::SkillEnum parSkill, const MWMechanics::Stat< float > &value)
void configureSkills (const SkillList &major, const SkillList &minor)
void setReputation (int reputation)
void setBounty (int bounty)
void updateSkillArea ()
virtual void open ()

Protected Member Functions

virtual void onPinToggled ()

Private Member Functions

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 addGroup (const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
MyGUI::TextBox * addValueItem (const std::string &text, const std::string &value, const std::string &state, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
MyGUI::Widget * addItem (const std::string &text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
void setFactions (const FactionList &factions)
void setExpelled (const std::set< std::string > &expelled)
void setBirthSign (const std::string &signId)
void onWindowResize (MyGUI::Window *window)
void onMouseWheel (MyGUI::Widget *_sender, int _rel)

Private Attributes

MyGUI::Widget * mLeftPane
MyGUI::Widget * mRightPane
MyGUI::ScrollView * mSkillView
SkillList mMajorSkills
SkillList mMinorSkills
SkillList mMiscSkills
std::map< int,
MWMechanics::Stat< float > > 
mSkillValues
std::map< int, MyGUI::TextBox * > mSkillWidgetMap
std::map< std::string,
MyGUI::Widget * > 
mFactionWidgetMap
FactionList mFactions
 Stores a list of factions and the current rank.
std::string mBirthSignId
int mReputation
int mBounty
std::vector< MyGUI::Widget * > mSkillWidgets
std::set< std::string > mExpelled
bool mChanged

Static Private Attributes

static const int sLineHeight = 18

Member Typedef Documentation

typedef std::map<std::string, int> MWGui::StatsWindow::FactionList
typedef std::vector<int> MWGui::StatsWindow::SkillList

Constructor & Destructor Documentation


Member Function Documentation

void MWGui::StatsWindow::addGroup ( const std::string &  label,
MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
) [private]
MyGUI::Widget * MWGui::StatsWindow::addItem ( const std::string &  text,
MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
) [private]
void MWGui::StatsWindow::addSeparator ( MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
) [private]
void MWGui::StatsWindow::addSkills ( const SkillList skills,
const std::string &  titleId,
const std::string &  titleDefault,
MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
) [private]
MyGUI::TextBox * MWGui::StatsWindow::addValueItem ( const std::string &  text,
const std::string &  value,
const std::string &  state,
MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
) [private]
void MWGui::StatsWindow::configureSkills ( const SkillList major,
const SkillList minor 
)

automatically updates all the data in the stats window, but only if it has changed.

void MWGui::StatsWindow::onMouseWheel ( MyGUI::Widget *  _sender,
int  _rel 
) [private]
void MWGui::StatsWindow::onPinToggled ( ) [protected, virtual]
void MWGui::StatsWindow::onWindowResize ( MyGUI::Window *  window) [private]
virtual void MWGui::StatsWindow::open ( ) [inline, virtual]

Reimplemented from MWGui::WindowBase.

void MWGui::StatsWindow::setBar ( const std::string &  name,
const std::string &  tname,
int  val,
int  max 
)
void MWGui::StatsWindow::setBirthSign ( const std::string &  signId) [private]
void MWGui::StatsWindow::setBounty ( int  bounty) [inline]
void MWGui::StatsWindow::setExpelled ( const std::set< std::string > &  expelled) [private]
void MWGui::StatsWindow::setFactions ( const FactionList factions) [private]
void MWGui::StatsWindow::setPlayerName ( const std::string &  playerName)
void MWGui::StatsWindow::setReputation ( int  reputation) [inline]
void MWGui::StatsWindow::setValue ( const std::string &  id,
const MWMechanics::Stat< int > &  value 
)

Set value for the given ID.

void MWGui::StatsWindow::setValue ( const std::string &  id,
const MWMechanics::DynamicStat< float > &  value 
)
void MWGui::StatsWindow::setValue ( const std::string &  id,
const std::string &  value 
)
void MWGui::StatsWindow::setValue ( const std::string &  id,
int  value 
)
void MWGui::StatsWindow::setValue ( const ESM::Skill::SkillEnum  parSkill,
const MWMechanics::Stat< float > &  value 
)

Member Data Documentation

std::string MWGui::StatsWindow::mBirthSignId [private]
std::set<std::string> MWGui::StatsWindow::mExpelled [private]

Stores a list of factions and the current rank.

std::map<std::string, MyGUI::Widget*> MWGui::StatsWindow::mFactionWidgetMap [private]
MyGUI::Widget* MWGui::StatsWindow::mLeftPane [private]
MyGUI::Widget* MWGui::StatsWindow::mRightPane [private]
std::map<int, MWMechanics::Stat<float> > MWGui::StatsWindow::mSkillValues [private]
MyGUI::ScrollView* MWGui::StatsWindow::mSkillView [private]
std::map<int, MyGUI::TextBox*> MWGui::StatsWindow::mSkillWidgetMap [private]
std::vector<MyGUI::Widget*> MWGui::StatsWindow::mSkillWidgets [private]
const int MWGui::StatsWindow::sLineHeight = 18 [static, private]

The documentation for this class was generated from the following files: