OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MWGui::StatsWindow Class Reference

#include <statswindow.hpp>

Inheritance diagram for MWGui::StatsWindow:
Collaboration diagram for MWGui::StatsWindow:

Public Types

typedef std::map< std::string,
int
FactionList
 
typedef std::vector< intSkillList
 
- Public Types inherited from MWGui::WindowBase
typedef
MyGUI::delegates::CMultiDelegate1
< WindowBase * > 
EventHandle_WindowBase
 

Public Member Functions

 StatsWindow (DragAndDrop *drag)
 
void onFrame (float dt)
 automatically updates all the data in the stats window, but only if it has changed. More...
 
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::AttributeValue &value)
 Set value for the given ID. More...
 
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::SkillValue &value)
 
void configureSkills (const SkillList &major, const SkillList &minor)
 
void setReputation (int reputation)
 
void setBounty (int bounty)
 
void updateSkillArea ()
 
virtual void open ()
 Notify that window has been made visible. More...
 
- Public Member Functions inherited from MWGui::WindowPinnableBase
 WindowPinnableBase (const std::string &parLayout)
 
bool pinned ()
 
void setPinned (bool pinned)
 
void setPinButtonVisible (bool visible)
 
- Public Member Functions inherited from MWGui::WindowBase
 WindowBase (const std::string &parLayout)
 
virtual void close ()
 Notify that window has been hidden. More...
 
virtual void exit ()
 Gracefully exits the window. More...
 
virtual void setVisible (bool visible)
 Sets the visibility of the window. More...
 
bool isVisible ()
 Returns the visibility state of the window. More...
 
void center ()
 
- Public Member Functions inherited from MWGui::Layout
 Layout (const std::string &_layout, MyGUI::Widget *_parent=nullptr)
 
virtual ~Layout ()
 
MyGUI::Widget * getWidget (const std::string &_name)
 
template<typename T >
void getWidget (T *&_widget, const std::string &_name)
 
void setCoord (int x, int y, int w, int h)
 
void setText (const std::string &name, const std::string &caption)
 
void setTitle (const std::string &title)
 
- Public Member Functions inherited from MWGui::NoDrop
 NoDrop (DragAndDrop *drag, MyGUI::Widget *widget)
 
void onFrame (float dt)
 
virtual void setAlpha (float alpha)
 

Protected Member Functions

virtual void onPinToggled ()
 
virtual void onTitleDoubleClicked ()
 

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::SkillValue
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. More...
 
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
 

Additional Inherited Members

- Public Attributes inherited from MWGui::Layout
MyGUI::Widget * mMainWidget
 
- Protected Attributes inherited from MWGui::WindowPinnableBase
MyGUI::Widget * mPinButton
 
bool mPinned
 
- Protected Attributes inherited from MWGui::Layout
std::string mPrefix
 
std::string mLayoutName
 
MyGUI::VectorWidgetPtr mListWindowRoot
 

Member Typedef Documentation

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

Constructor & Destructor Documentation

MWGui::StatsWindow::StatsWindow ( DragAndDrop drag)

Here is the call graph for this function:

Member Function Documentation

void MWGui::StatsWindow::addGroup ( const std::string &  label,
MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

MyGUI::Widget * MWGui::StatsWindow::addItem ( const std::string &  text,
MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::StatsWindow::addSeparator ( MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::StatsWindow::addSkills ( const SkillList skills,
const std::string &  titleId,
const std::string &  titleDefault,
MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

MyGUI::TextBox * MWGui::StatsWindow::addValueItem ( const std::string &  text,
const std::string &  value,
const std::string &  state,
MyGUI::IntCoord &  coord1,
MyGUI::IntCoord &  coord2 
)
private

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::StatsWindow::configureSkills ( const SkillList major,
const SkillList minor 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::StatsWindow::onFrame ( float  dt)

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

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::StatsWindow::onMouseWheel ( MyGUI::Widget *  _sender,
int  _rel 
)
private

Here is the caller graph for this function:

void MWGui::StatsWindow::onPinToggled ( )
protectedvirtual

Implements MWGui::WindowPinnableBase.

Here is the call graph for this function:

void MWGui::StatsWindow::onTitleDoubleClicked ( )
protectedvirtual

Implements MWGui::WindowPinnableBase.

Here is the call graph for this function:

void MWGui::StatsWindow::onWindowResize ( MyGUI::Window *  window)
private

Here is the caller graph for this function:

virtual void MWGui::StatsWindow::open ( )
inlinevirtual

Notify that window has been made visible.

Reimplemented from MWGui::WindowBase.

Here is the call graph for this function:

void MWGui::StatsWindow::setBar ( const std::string &  name,
const std::string &  tname,
int  val,
int  max 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::StatsWindow::setBirthSign ( const std::string &  signId)
private

Here is the caller graph for this function:

void MWGui::StatsWindow::setBounty ( int  bounty)
inline

Here is the caller graph for this function:

void MWGui::StatsWindow::setExpelled ( const std::set< std::string > &  expelled)
private

Here is the caller graph for this function:

void MWGui::StatsWindow::setFactions ( const FactionList factions)
private

Here is the caller graph for this function:

void MWGui::StatsWindow::setPlayerName ( const std::string &  playerName)

Here is the caller graph for this function:

void MWGui::StatsWindow::setReputation ( int  reputation)
inline

Here is the caller graph for this function:

void MWGui::StatsWindow::setValue ( const std::string &  id,
const MWMechanics::AttributeValue value 
)

Set value for the given ID.

Here is the call graph for this function:

Here is the caller graph for this function:

void MWGui::StatsWindow::setValue ( const std::string &  id,
const MWMechanics::DynamicStat< float > &  value 
)

Here is the call graph for this function:

void MWGui::StatsWindow::setValue ( const std::string &  id,
const std::string &  value 
)

Here is the call graph for this function:

void MWGui::StatsWindow::setValue ( const std::string &  id,
int  value 
)

Here is the call graph for this function:

void MWGui::StatsWindow::setValue ( const ESM::Skill::SkillEnum  parSkill,
const MWMechanics::SkillValue value 
)

Here is the call graph for this function:

void MWGui::StatsWindow::updateSkillArea ( )

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::string MWGui::StatsWindow::mBirthSignId
private
int MWGui::StatsWindow::mBounty
private
bool MWGui::StatsWindow::mChanged
private
std::set<std::string> MWGui::StatsWindow::mExpelled
private
FactionList MWGui::StatsWindow::mFactions
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
SkillList MWGui::StatsWindow::mMajorSkills
private
SkillList MWGui::StatsWindow::mMinorSkills
private
SkillList MWGui::StatsWindow::mMiscSkills
private
int MWGui::StatsWindow::mReputation
private
MyGUI::Widget* MWGui::StatsWindow::mRightPane
private
std::map<int, MWMechanics::SkillValue > 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
staticprivate

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