forked from mirror/openmw-tes3mp
Added faction, birth sign, reputation and bounty to stat screen. All values are currently hardcoded.
This commit is contained in:
parent
46e828dbd9
commit
9683a7094d
2 changed files with 37 additions and 0 deletions
|
@ -61,6 +61,19 @@ void StatsWindow::addValueItem(const std::string text, const std::string &value,
|
||||||
coord2.top += lineHeight;
|
coord2.top += lineHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StatsWindow::addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
|
||||||
|
{
|
||||||
|
MyGUI::StaticTextPtr skillNameWidget;
|
||||||
|
|
||||||
|
skillNameWidget = skillAreaWidget->createWidget<MyGUI::StaticText>("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default);
|
||||||
|
skillNameWidget->setCaption(text);
|
||||||
|
|
||||||
|
skillWidgets.push_back(skillNameWidget);
|
||||||
|
|
||||||
|
coord1.top += lineHeight;
|
||||||
|
coord2.top += lineHeight;
|
||||||
|
}
|
||||||
|
|
||||||
void StatsWindow::addSkills(const std::set<int> &skills, const std::string &titleId, const std::string &titleDefault, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
|
void StatsWindow::addSkills(const std::set<int> &skills, const std::string &titleId, const std::string &titleDefault, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
|
||||||
{
|
{
|
||||||
// Get player and stats
|
// Get player and stats
|
||||||
|
@ -122,4 +135,27 @@ void StatsWindow::updateSkillArea()
|
||||||
|
|
||||||
if (!miscSkills.empty())
|
if (!miscSkills.empty())
|
||||||
addSkills(miscSkills, "sSkillClassMisc", "Misc Skills", coord1, coord2);
|
addSkills(miscSkills, "sSkillClassMisc", "Misc Skills", coord1, coord2);
|
||||||
|
|
||||||
|
WindowManager *wm = environment.mWindowManager;
|
||||||
|
|
||||||
|
// Add a line separator if there are items above
|
||||||
|
if (!skillWidgets.empty())
|
||||||
|
addSeparator(coord1, coord2);
|
||||||
|
|
||||||
|
addGroup(wm->getGameSettingString("sFaction", "Faction"), coord1, coord2);
|
||||||
|
addItem("Temple", coord1, coord2);
|
||||||
|
|
||||||
|
// Add a line separator if there are items above
|
||||||
|
if (!skillWidgets.empty())
|
||||||
|
addSeparator(coord1, coord2);
|
||||||
|
|
||||||
|
addGroup(wm->getGameSettingString("sSign", "Sign"), coord1, coord2);
|
||||||
|
addItem("The Mage", coord1, coord2);
|
||||||
|
|
||||||
|
// Add a line separator if there are items above
|
||||||
|
if (!skillWidgets.empty())
|
||||||
|
addSeparator(coord1, coord2);
|
||||||
|
|
||||||
|
addValueItem(wm->getGameSettingString("sReputation", "Reputation"), boost::lexical_cast<std::string>(static_cast<int>(0)), CS_Normal, coord1, coord2);
|
||||||
|
addValueItem(wm->getGameSettingString("sBounty", "Bounty"), boost::lexical_cast<std::string>(static_cast<int>(0)), CS_Normal, coord1, coord2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,6 +307,7 @@ namespace MWGui
|
||||||
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);
|
||||||
void addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
|
void 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);
|
||||||
|
|
||||||
static const int lineHeight;
|
static const int lineHeight;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue