replaced all the StaticImage and StaticText in code

actorid
scrawl 13 years ago
parent 99461765da
commit 64212c0ee6

@ -188,7 +188,7 @@ void BirthDialog::updateSpells()
{
if (!categories[category].spells.empty())
{
MyGUI::StaticTextPtr label = spellArea->createWidget<MyGUI::StaticText>("SandBrightText", coord, MyGUI::Align::Default, std::string("Label"));
MyGUI::TextBox* label = spellArea->createWidget<MyGUI::TextBox>("SandBrightText", coord, MyGUI::Align::Default, std::string("Label"));
label->setCaption(mWindowManager.getGameSettingString(categories[category].label, ""));
spellItems.push_back(label);
coord.top += lineHeight;

@ -51,7 +51,7 @@ namespace MWGui
MyGUI::ListPtr birthList;
MyGUI::WidgetPtr spellArea;
MyGUI::StaticImagePtr birthImage;
MyGUI::ImageBox* birthImage;
std::vector<MyGUI::WidgetPtr> spellItems;
std::string currentBirthId;

@ -248,7 +248,7 @@ void PickClassDialog::updateStats()
/* InfoBoxDialog */
void InfoBoxDialog::fitToText(MyGUI::StaticTextPtr widget)
void InfoBoxDialog::fitToText(MyGUI::TextBox* widget)
{
MyGUI::IntCoord inner = widget->getTextRegion();
MyGUI::IntCoord outer = widget->getCoord();

@ -43,11 +43,11 @@ namespace MWGui
private:
void fitToText(MyGUI::StaticTextPtr widget);
void fitToText(MyGUI::TextBox* widget);
void layoutVertically(MyGUI::WidgetPtr widget, int margin);
int currentButton;
MyGUI::WidgetPtr textBox;
MyGUI::StaticTextPtr text;
MyGUI::TextBox* text;
MyGUI::WidgetPtr buttonBar;
std::vector<MyGUI::ButtonPtr> buttons;
};
@ -90,8 +90,8 @@ namespace MWGui
void onBackClicked(MyGUI::Widget* _sender);
private:
MyGUI::StaticImagePtr classImage;
MyGUI::StaticTextPtr className;
MyGUI::ImageBox* classImage;
MyGUI::TextBox* className;
std::string currentClassId;
};
@ -125,9 +125,9 @@ namespace MWGui
void updateClasses();
void updateStats();
MyGUI::StaticImagePtr classImage;
MyGUI::ImageBox* classImage;
MyGUI::ListPtr classList;
MyGUI::StaticTextPtr specializationName;
MyGUI::TextBox* specializationName;
Widgets::MWAttributePtr favoriteAttribute[2];
Widgets::MWSkillPtr majorSkill[5];
Widgets::MWSkillPtr minorSkill[5];
@ -160,7 +160,7 @@ namespace MWGui
void onCancelClicked(MyGUI::Widget* _sender);
private:
MyGUI::StaticTextPtr specialization0, specialization1, specialization2;
MyGUI::TextBox *specialization0, *specialization1, *specialization2;
ESM::Class::Specialization specializationId;
};
@ -287,7 +287,7 @@ namespace MWGui
private:
MyGUI::EditPtr editName;
MyGUI::StaticTextPtr specializationName;
MyGUI::TextBox* specializationName;
Widgets::MWAttributePtr favoriteAttribute0, favoriteAttribute1;
Widgets::MWSkillPtr majorSkill[5];
Widgets::MWSkillPtr minorSkill[5];

@ -45,18 +45,18 @@ namespace MWGui
void setBatchCount(size_t count);
MyGUI::ProgressPtr health, magicka, stamina;
MyGUI::StaticImagePtr weapImage, spellImage;
MyGUI::ImageBox *weapImage, *spellImage;
MyGUI::ProgressPtr weapStatus, spellStatus;
MyGUI::WidgetPtr effectBox;
MyGUI::StaticImagePtr effect1;
MyGUI::StaticImagePtr minimap;
MyGUI::StaticImagePtr compass;
MyGUI::StaticImagePtr crosshair;
MyGUI::ImageBox* effect1;
MyGUI::ImageBox* minimap;
MyGUI::ImageBox* compass;
MyGUI::ImageBox* crosshair;
MyGUI::WidgetPtr fpsbox;
MyGUI::StaticTextPtr fpscounter;
MyGUI::StaticTextPtr trianglecounter;
MyGUI::StaticTextPtr batchcounter;
MyGUI::TextBox* fpscounter;
MyGUI::TextBox* trianglecounter;
MyGUI::TextBox* batchcounter;
};
class MapWindow : public OEngine::GUI::Layout
@ -127,7 +127,7 @@ namespace MWGui
getWidget(avatar, "Avatar");
// Adjust armor rating text to bottom of avatar widget
MyGUI::StaticTextPtr armor_rating;
MyGUI::TextBox* armor_rating;
getWidget(armor_rating, "ArmorRating");
armor_rating->setCaption("Armor: 11");
MyGUI::IntCoord coord = armor_rating->getCoord();

@ -81,7 +81,7 @@ ReviewDialog::ReviewDialog(WindowManager& parWindowManager)
for (int i = 0; i < ESM::Skill::Length; ++i)
{
skillValues.insert(std::make_pair(i, MWMechanics::Stat<float>()));
skillWidgetMap.insert(std::make_pair(i, static_cast<MyGUI::StaticText*> (0)));
skillWidgetMap.insert(std::make_pair(i, static_cast<MyGUI::TextBox*> (0)));
}
static_cast<MyGUI::WindowPtr>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &ReviewDialog::onWindowResize);
@ -176,7 +176,7 @@ void ReviewDialog::setAttribute(ESM::Attribute::AttributeID attributeId, const M
void ReviewDialog::setSkillValue(ESM::Skill::SkillEnum skillId, const MWMechanics::Stat<float>& value)
{
skillValues[skillId] = value;
MyGUI::StaticTextPtr widget = skillWidgetMap[skillId];
MyGUI::TextBox* widget = skillWidgetMap[skillId];
if (widget)
{
float modified = value.getModified(), base = value.getBase();
@ -210,7 +210,7 @@ void ReviewDialog::configureSkills(const std::vector<int>& major, const std::vec
}
}
void ReviewDialog::setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value)
void ReviewDialog::setStyledText(MyGUI::TextBox* widget, ColorStyle style, const std::string &value)
{
widget->setCaption(value);
if (style == CS_Super)
@ -223,7 +223,7 @@ void ReviewDialog::setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style,
void ReviewDialog::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::StaticImagePtr separator = skillClientWidget->createWidget<MyGUI::StaticImage>("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default);
MyGUI::ImageBox* separator = skillClientWidget->createWidget<MyGUI::ImageBox>("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default);
skillWidgets.push_back(separator);
coord1.top += separator->getHeight();
@ -232,7 +232,7 @@ void ReviewDialog::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2
void ReviewDialog::addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::StaticTextPtr groupWidget = skillClientWidget->createWidget<MyGUI::StaticText>("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default);
MyGUI::TextBox* groupWidget = skillClientWidget->createWidget<MyGUI::TextBox>("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default);
groupWidget->setCaption(label);
skillWidgets.push_back(groupWidget);
@ -240,14 +240,15 @@ void ReviewDialog::addGroup(const std::string &label, MyGUI::IntCoord &coord1, M
coord2.top += lineHeight;
}
MyGUI::StaticTextPtr ReviewDialog::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
MyGUI::TextBox* ReviewDialog::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::StaticTextPtr skillNameWidget, skillValueWidget;
MyGUI::TextBox* skillNameWidget;
MyGUI::TextBox* skillValueWidget;
skillNameWidget = skillClientWidget->createWidget<MyGUI::StaticText>("SandText", coord1, MyGUI::Align::Default);
skillNameWidget = skillClientWidget->createWidget<MyGUI::TextBox>("SandText", coord1, MyGUI::Align::Default);
skillNameWidget->setCaption(text);
skillValueWidget = skillClientWidget->createWidget<MyGUI::StaticText>("SandTextRight", coord2, MyGUI::Align::Default);
skillValueWidget = skillClientWidget->createWidget<MyGUI::TextBox>("SandTextRight", coord2, MyGUI::Align::Default);
setStyledText(skillValueWidget, style, value);
skillWidgets.push_back(skillNameWidget);
@ -261,9 +262,9 @@ MyGUI::StaticTextPtr ReviewDialog::addValueItem(const std::string text, const st
void ReviewDialog::addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::StaticTextPtr skillNameWidget;
MyGUI::TextBox* skillNameWidget;
skillNameWidget = skillClientWidget->createWidget<MyGUI::StaticText>("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default);
skillNameWidget = skillClientWidget->createWidget<MyGUI::TextBox>("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default);
skillNameWidget->setCaption(text);
skillWidgets.push_back(skillNameWidget);
@ -299,7 +300,7 @@ void ReviewDialog::addSkills(const SkillList &skills, const std::string &titleId
style = CS_Super;
else if (modified < base)
style = CS_Sub;
MyGUI::StaticTextPtr widget = addValueItem(mWindowManager.getGameSettingString(skillNameId, skillNameId), boost::lexical_cast<std::string>(static_cast<int>(modified)), style, coord1, coord2);
MyGUI::TextBox* widget = addValueItem(mWindowManager.getGameSettingString(skillNameId, skillNameId), boost::lexical_cast<std::string>(static_cast<int>(modified)), style, coord1, coord2);
skillWidgetMap[skillId] = widget;
}
}

@ -75,11 +75,11 @@ namespace MWGui
CS_Normal,
CS_Super
};
void setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value);
void setStyledText(MyGUI::TextBox* 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 addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
void addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
MyGUI::StaticTextPtr addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
MyGUI::TextBox* 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 updateScroller();
void updateSkillArea();
@ -89,7 +89,7 @@ namespace MWGui
static const int lineHeight;
MyGUI::StaticTextPtr nameWidget, raceWidget, classWidget, birthSignWidget;
MyGUI::TextBox *nameWidget, *raceWidget, *classWidget, *birthSignWidget;
MyGUI::WidgetPtr skillAreaWidget, skillClientWidget;
MyGUI::VScrollPtr skillScrollerWidget;
int lastPos, clientHeight;
@ -100,7 +100,7 @@ namespace MWGui
SkillList majorSkills, minorSkills, miscSkills;
std::map<int, MWMechanics::Stat<float> > skillValues;
std::map<int, MyGUI::StaticTextPtr> skillWidgetMap;
std::map<int, MyGUI::TextBox*> skillWidgetMap;
std::string name, raceId, birthSignId;
ESM::Class klass;
std::vector<MyGUI::WidgetPtr> skillWidgets; //< Skills and other information

@ -54,7 +54,7 @@ StatsWindow::StatsWindow (WindowManager& parWindowManager)
for (int i = 0; i < ESM::Skill::Length; ++i)
{
skillValues.insert(std::pair<int, MWMechanics::Stat<float> >(i, MWMechanics::Stat<float>()));
skillWidgetMap.insert(std::pair<int, MyGUI::StaticTextPtr>(i, nullptr));
skillWidgetMap.insert(std::pair<int, MyGUI::TextBox*>(i, nullptr));
}
MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(mMainWidget);
@ -98,7 +98,7 @@ void StatsWindow::setPlayerName(const std::string& playerName)
static_cast<MyGUI::Window*>(mMainWidget)->setCaption(playerName);
}
void StatsWindow::setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value)
void StatsWindow::setStyledText(MyGUI::TextBox* widget, ColorStyle style, const std::string &value)
{
widget->setCaption(value);
if (style == CS_Super)
@ -175,7 +175,7 @@ void StatsWindow::setValue (const std::string& id, int value)
void StatsWindow::setValue(const ESM::Skill::SkillEnum parSkill, const MWMechanics::Stat<float>& value)
{
skillValues[parSkill] = value;
MyGUI::StaticTextPtr widget = skillWidgetMap[(int)parSkill];
MyGUI::TextBox* widget = skillWidgetMap[(int)parSkill];
if (widget)
{
float modified = value.getModified(), base = value.getBase();
@ -221,7 +221,7 @@ void StatsWindow::setBirthSign (const std::string& signId)
void StatsWindow::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::StaticImagePtr separator = skillClientWidget->createWidget<MyGUI::StaticImage>("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default);
MyGUI::ImageBox* separator = skillClientWidget->createWidget<MyGUI::ImageBox>("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default);
skillWidgets.push_back(separator);
coord1.top += separator->getHeight();
@ -230,7 +230,7 @@ void StatsWindow::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
void StatsWindow::addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::StaticTextPtr groupWidget = skillClientWidget->createWidget<MyGUI::StaticText>("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default);
MyGUI::TextBox* groupWidget = skillClientWidget->createWidget<MyGUI::TextBox>("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default);
groupWidget->setCaption(label);
skillWidgets.push_back(groupWidget);
@ -238,14 +238,14 @@ void StatsWindow::addGroup(const std::string &label, MyGUI::IntCoord &coord1, My
coord2.top += lineHeight;
}
MyGUI::StaticTextPtr StatsWindow::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
MyGUI::TextBox* StatsWindow::addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::StaticTextPtr skillNameWidget, skillValueWidget;
MyGUI::TextBox *skillNameWidget, *skillValueWidget;
skillNameWidget = skillClientWidget->createWidget<MyGUI::StaticText>("SandText", coord1, MyGUI::Align::Default);
skillNameWidget = skillClientWidget->createWidget<MyGUI::TextBox>("SandText", coord1, MyGUI::Align::Default);
skillNameWidget->setCaption(text);
skillValueWidget = skillClientWidget->createWidget<MyGUI::StaticText>("SandTextRight", coord2, MyGUI::Align::Default);
skillValueWidget = skillClientWidget->createWidget<MyGUI::TextBox>("SandTextRight", coord2, MyGUI::Align::Default);
setStyledText(skillValueWidget, style, value);
skillWidgets.push_back(skillNameWidget);
@ -259,9 +259,9 @@ MyGUI::StaticTextPtr StatsWindow::addValueItem(const std::string text, const std
void StatsWindow::addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::StaticTextPtr skillNameWidget;
MyGUI::TextBox* skillNameWidget;
skillNameWidget = skillClientWidget->createWidget<MyGUI::StaticText>("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default);
skillNameWidget = skillClientWidget->createWidget<MyGUI::TextBox>("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default);
skillNameWidget->setCaption(text);
skillWidgets.push_back(skillNameWidget);
@ -297,7 +297,7 @@ void StatsWindow::addSkills(const SkillList &skills, const std::string &titleId,
style = CS_Super;
else if (modified < base)
style = CS_Sub;
MyGUI::StaticTextPtr widget = addValueItem(mWindowManager.getGameSettingString(skillNameId, skillNameId), boost::lexical_cast<std::string>(static_cast<int>(modified)), style, coord1, coord2);
MyGUI::TextBox* widget = addValueItem(mWindowManager.getGameSettingString(skillNameId, skillNameId), boost::lexical_cast<std::string>(static_cast<int>(modified)), style, coord1, coord2);
skillWidgetMap[skillId] = widget;
}
}

@ -49,11 +49,11 @@ namespace MWGui
CS_Normal,
CS_Super
};
void setStyledText(MyGUI::StaticTextPtr widget, ColorStyle style, const std::string &value);
void setStyledText(MyGUI::TextBox* 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 addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
void addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
MyGUI::StaticTextPtr addValueItem(const std::string text, const std::string &value, ColorStyle style, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
MyGUI::TextBox* 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 updateScroller();
@ -68,7 +68,7 @@ namespace MWGui
SkillList majorSkills, minorSkills, miscSkills;
std::map<int, MWMechanics::Stat<float> > skillValues;
std::map<int, MyGUI::StaticTextPtr> skillWidgetMap;
std::map<int, MyGUI::TextBox*> skillWidgetMap;
std::map<std::string, MyGUI::WidgetPtr> factionWidgetMap;
FactionList factions; ///< Stores a list of factions and the current rank
std::string birthSignId;

@ -130,7 +130,7 @@ namespace MWGui
WindowManager* mWindowManager;
std::string id;
MyGUI::StaticTextPtr spellNameWidget;
MyGUI::TextBox* spellNameWidget;
};
typedef MWSpell* MWSpellPtr;
@ -158,8 +158,8 @@ namespace MWGui
WindowManager* mWindowManager;
SpellEffectValue effect;
MyGUI::StaticImagePtr imageWidget;
MyGUI::StaticTextPtr textWidget;
MyGUI::ImageBox* imageWidget;
MyGUI::TextBox* textWidget;
};
typedef MWSpellEffect* MWSpellEffectPtr;
@ -183,9 +183,9 @@ namespace MWGui
private:
int value, max;
MyGUI::StaticTextPtr textWidget;
MyGUI::TextBox* textWidget;
MyGUI::ProgressPtr barWidget;
MyGUI::StaticTextPtr barTextWidget;
MyGUI::TextBox* barTextWidget;
};
typedef MWDynamicStat* MWDynamicStatPtr;

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Skin">
<Skin name = "StaticText" size = "16 16">
<Skin name = "TextBox" size = "16 16">
<Property key="FontName" value = "MyGUI_CoreFont.18" />
<Property key="FontHeight" value = "18" />
<Property key="AlignText" value = "ALIGN_DEFAULT" />

@ -13,16 +13,16 @@
<!-- Specialization -->
<Widget type="Widget" skin="" position="15 152 484 178" align="ALIGN_LEFT ALIGN_TOP">
<Widget type="StaticText" skin="HeaderText" position="0 0 162 18" name="SpecializationT" align="ALIGN_LEFT ALIGN_TOP">
<Widget type="TextBox" skin="HeaderText" position="0 0 162 18" name="SpecializationT" align="ALIGN_LEFT ALIGN_TOP">
<Property key="Widget_Caption" value="Specialization:"/>
<Property key="Widget_AlignText" value="ALIGN_LEFT ALIGN_TOP"/>
</Widget>
<Widget type="StaticText" skin="SandText" position="0 18 162 18" name="SpecializationName" align="ALIGN_LEFT ALIGN_TOP">
<Widget type="TextBox" skin="SandText" position="0 18 162 18" name="SpecializationName" align="ALIGN_LEFT ALIGN_TOP">
<Property key="Widget_AlignText" value="ALIGN_LEFT ALIGN_TOP"/>
</Widget>
<!-- Favorite Attributes -->
<Widget type="StaticText" skin="HeaderText" position="0 41 162 18" name="FavoriteAttributesT" align="ALIGN_LEFT ALIGN_TOP">
<Widget type="TextBox" skin="HeaderText" position="0 41 162 18" name="FavoriteAttributesT" align="ALIGN_LEFT ALIGN_TOP">
<Property key="Widget_Caption" value="Favorite Attributes:"/>
<Property key="Widget_AlignText" value="ALIGN_LEFT ALIGN_TOP"/>
</Widget>
@ -30,7 +30,7 @@
<Widget type="MWAttribute" skin="MW_StatName" position="0 77 162 18" name="FavoriteAttribute1" align="ALIGN_LEFT ALIGN_TOP" />
<!-- Major Skills -->
<Widget type="StaticText" skin="HeaderText" position="162 0 162 18" name="MajorSkillT" align="ALIGN_LEFT ALIGN_TOP">
<Widget type="TextBox" skin="HeaderText" position="162 0 162 18" name="MajorSkillT" align="ALIGN_LEFT ALIGN_TOP">
<Property key="Widget_Caption" value="Major Skills:"/>
<Property key="Widget_AlignText" value="ALIGN_LEFT ALIGN_TOP"/>
</Widget>
@ -41,7 +41,7 @@
<Widget type="MWSkill" skin="MW_StatName" position="162 90 162 18" name="MajorSkill4" align="ALIGN_LEFT ALIGN_TOP" />
<!-- Minor Skills -->
<Widget type="StaticText" skin="HeaderText" position="325 0 162 18" name="MinorSkillT" align="ALIGN_LEFT ALIGN_TOP">
<Widget type="TextBox" skin="HeaderText" position="325 0 162 18" name="MinorSkillT" align="ALIGN_LEFT ALIGN_TOP">
<Property key="Widget_Caption" value="Minor Skills:"/>
<Property key="Widget_AlignText" value="ALIGN_LEFT ALIGN_TOP"/>
</Widget>

@ -8,11 +8,11 @@
</Widget>
<!-- Class text -->
<Widget type="StaticText" skin="SandText" position="32 152 265 18" name="ReflectT" align="ALIGN_LEFT ALIGN_TOP">
<Widget type="TextBox" skin="SandText" position="32 152 265 18" name="ReflectT" align="ALIGN_LEFT ALIGN_TOP">
<Property key="Widget_Caption" value="Your personality and past reflect a:"/>
<Property key="Widget_AlignText" value="ALIGN_TOP ALIGN_HCENTER"/>
</Widget>
<Widget type="StaticText" skin="SandText" position="32 170 265 18" name="ClassName" align="ALIGN_LEFT ALIGN_TOP">
<Widget type="TextBox" skin="SandText" position="32 170 265 18" name="ClassName" align="ALIGN_LEFT ALIGN_TOP">
<Property key="Widget_Caption" value="[Class]"/>
<Property key="Widget_AlignText" value="ALIGN_TOP ALIGN_HCENTER"/>
</Widget>

@ -53,7 +53,7 @@
<Widget type="Widget" skin="HUD_Box" position="12 12 28 21" align="Left Top"
name="FPSBox">
<Property key="Widget_Visible" value="false"/>
<Widget type="StaticText" skin="NumFPS" position="3 3 21 17" name="FPSCounter"/>
<Widget type="TextBox" skin="NumFPS" position="3 3 21 17" name="FPSCounter"/>
</Widget>
<!-- Advanced FPSCounter box -->
@ -61,20 +61,20 @@
name="FPSBoxAdv">
<Property key="Widget_Visible" value="false"/>
<Widget type="StaticText" skin="NumFPS" position="3 3 71 17">
<Widget type="TextBox" skin="NumFPS" position="3 3 71 17">
<Property key="Widget_Caption" value="FPS: "/>
</Widget>
<Widget type="StaticText" skin="NumFPS" position="53 3 71 17" name="FPSCounterAdv"/>
<Widget type="TextBox" skin="NumFPS" position="53 3 71 17" name="FPSCounterAdv"/>
<Widget type="StaticText" skin="NumFPS" position="3 3 71 32">
<Widget type="TextBox" skin="NumFPS" position="3 3 71 32">
<Property key="Widget_Caption" value="Tri Count: "/>
</Widget>
<Widget type="StaticText" skin="NumFPS" position="53 3 71 32" name="TriangleCounter"/>
<Widget type="TextBox" skin="NumFPS" position="53 3 71 32" name="TriangleCounter"/>
<Widget type="StaticText" skin="NumFPS" position="3 3 71 47">
<Widget type="TextBox" skin="NumFPS" position="3 3 71 47">
<Property key="Widget_Caption" value="Batch Count: "/>
</Widget>
<Widget type="StaticText" skin="NumFPS" position="53 3 71 47" name="BatchCounter"/>
<Widget type="TextBox" skin="NumFPS" position="53 3 71 47" name="BatchCounter"/>
</Widget>
</Widget>

@ -5,7 +5,7 @@
<!-- Edit box -->
<Widget type="Widget" skin="MW_Box" position="14 14 516 70" name="TextBox" align="ALIGN_TOP ALIGN_HCENTER">
<Widget type="StaticText" skin="SandText" position="4 4 508 62" name="Text" align="ALIGN_TOP ALIGN_HCENTER">
<Widget type="TextBox" skin="SandText" position="4 4 508 62" name="Text" align="ALIGN_TOP ALIGN_HCENTER">
<Property key="Edit_WordWrap" value="1" />
</Widget>
</Widget>

@ -14,8 +14,8 @@
<Widget type="Button" skin="Prev_btn" position="80 220 128 32" name="PrevPageBTN">
</Widget>
<Widget type="Edit" skin="MW_BookPage" position_real="0.15 0.1 0.3 0.8" name = "LeftText"/>
<Widget type="Edit" skin="MW_BookPage" position_real="0.55 0.1 0.3 0.8" name = "RightText"/>
<Widget type="EditBox" skin="MW_BookPage" position_real="0.15 0.1 0.3 0.8" name = "LeftText"/>
<Widget type="EditBox" skin="MW_BookPage" position_real="0.55 0.1 0.3 0.8" name = "RightText"/>
</Widget>
</Widget>

@ -2,8 +2,8 @@
<MyGUI type="Layout">
<Widget type="Window" skin="MW_Window" layer="Windows" position="0 0 300 300" name="_Main">
<Widget type="StaticImage" skin="StaticImage" position="0 0 284 264" align="ALIGN_STRETCH" name="Map"/>
<Widget type="StaticImage" skin="StaticImage" position="126 116 32 32" align="Center" name="Compass"/>
<Widget type="ImageBox" skin="ImageBox" position="0 0 284 264" align="ALIGN_STRETCH" name="Map"/>
<Widget type="ImageBox" skin="ImageBox" position="126 116 32 32" align="Center" name="Compass"/>
<Widget type="Button" skin="MW_Button" position="213 233 61 22" align="ALIGN_BOTTOM ALIGN_RIGHT" name="WorldButton"/>
</Widget>
</MyGUI>

@ -5,51 +5,51 @@
<!-- Player health stats -->
<Widget type="Widget" skin="MW_Box" position="8 8 212 62">
<Widget type="StaticText" skin="NormalText" position="4 4 70 18" name="Health_str"/>
<Widget type="StaticText" skin="NormalText" position="4 22 70 18" name="Magicka_str"/>
<Widget type="StaticText" skin="NormalText" position="4 40 70 18" name="Fatigue_str"/>
<Widget type="TextBox" skin="NormalText" position="4 4 70 18" name="Health_str"/>
<Widget type="TextBox" skin="NormalText" position="4 22 70 18" name="Magicka_str"/>
<Widget type="TextBox" skin="NormalText" position="4 40 70 18" name="Fatigue_str"/>
<Widget type="Progress" skin="MW_Progress_Red" position="78 4 130 18" name="HBar"/>
<Widget type="Progress" skin="MW_Progress_Blue" position="78 22 130 18" name="MBar"/>
<Widget type="Progress" skin="MW_Progress_Green" position="78 40 130 18" name="FBar"/>
<Widget type="StaticText" skin="ProgressText" position="78 4 130 18" align="Center" name="HBarT"/>
<Widget type="StaticText" skin="ProgressText" position="78 22 130 18" align="Center" name="MBarT"/>
<Widget type="StaticText" skin="ProgressText" position="78 40 130 18" align="Center" name="FBarT"/>
<Widget type="TextBox" skin="ProgressText" position="78 4 130 18" align="Center" name="HBarT"/>
<Widget type="TextBox" skin="ProgressText" position="78 22 130 18" align="Center" name="MBarT"/>
<Widget type="TextBox" skin="ProgressText" position="78 40 130 18" align="Center" name="FBarT"/>
</Widget>
<!-- Player level, race and class -->
<Widget type="Widget" skin="MW_Box" position="8 78 212 62">
<Widget type="StaticText" skin="NormalText" position="4 4 100 18" name="Level_str"/>
<Widget type="StaticText" skin="NormalText" position="4 22 100 18" name="Race_str"/>
<Widget type="StaticText" skin="NormalText" position="4 40 100 18" name="Class_str"/>
<Widget type="StaticText" skin="SandTextRight" position="104 4 104 18" name="LevelText"/>
<Widget type="StaticText" skin="SandTextRight" position="104 22 104 18" name="RaceText"/>
<Widget type="StaticText" skin="SandTextRight" position="104 40 104 18" name="ClassText"/>
<Widget type="TextBox" skin="NormalText" position="4 4 100 18" name="Level_str"/>
<Widget type="TextBox" skin="NormalText" position="4 22 100 18" name="Race_str"/>
<Widget type="TextBox" skin="NormalText" position="4 40 100 18" name="Class_str"/>
<Widget type="TextBox" skin="SandTextRight" position="104 4 104 18" name="LevelText"/>
<Widget type="TextBox" skin="SandTextRight" position="104 22 104 18" name="RaceText"/>
<Widget type="TextBox" skin="SandTextRight" position="104 40 104 18" name="ClassText"/>
</Widget>
<Widget type="Widget" skin="MW_Box" position="8 148 212 152">
<Widget type="StaticText" skin="SandText" position="4 4 100 18" name="Attrib1"/>
<Widget type="StaticText" skin="SandTextRight" position="104 4 104 18" name="AttribVal1"/>
<Widget type="TextBox" skin="SandText" position="4 4 100 18" name="Attrib1"/>
<Widget type="TextBox" skin="SandTextRight" position="104 4 104 18" name="AttribVal1"/>
<Widget type="StaticText" skin="SandText" position="4 22 100 18" name="Attrib2"/>
<Widget type="StaticText" skin="SandTextRight" position="104 22 104 18" name="AttribVal2"/>
<Widget type="TextBox" skin="SandText" position="4 22 100 18" name="Attrib2"/>
<Widget type="TextBox" skin="SandTextRight" position="104 22 104 18" name="AttribVal2"/>
<Widget type="StaticText" skin="SandText" position="4 40 100 18" name="Attrib3"/>
<Widget type="StaticText" skin="SandTextRight" position="104 40 104 18" name="AttribVal3"/>
<Widget type="TextBox" skin="SandText" position="4 40 100 18" name="Attrib3"/>
<Widget type="TextBox" skin="SandTextRight" position="104 40 104 18" name="AttribVal3"/>
<Widget type="StaticText" skin="SandText" position="4 58 100 18" name="Attrib4"/>
<Widget type="StaticText" skin="SandTextRight" position="104 58 104 18" name="AttribVal4"/>
<Widget type="TextBox" skin="SandText" position="4 58 100 18" name="Attrib4"/>
<Widget type="TextBox" skin="SandTextRight" position="104 58 104 18" name="AttribVal4"/>
<Widget type="StaticText" skin="SandText" position="4 76 100 18" name="Attrib5"/>
<Widget type="StaticText" skin="SandTextRight" position="104 76 104 18" name="AttribVal5"/>
<Widget type="TextBox" skin="SandText" position="4 76 100 18" name="Attrib5"/>
<Widget type="TextBox" skin="SandTextRight" position="104 76 104 18" name="AttribVal5"/>
<Widget type="StaticText" skin="SandText" position="4 94 100 18" name="Attrib6"/>
<Widget type="StaticText" skin="SandTextRight" position="104 94 104 18" name="AttribVal6"/>
<Widget type="TextBox" skin="SandText" position="4 94 100 18" name="Attrib6"/>
<Widget type="TextBox" skin="SandTextRight" position="104 94 104 18" name="AttribVal6"/>
<Widget type="StaticText" skin="SandText" position="4 112 100 18" name="Attrib7"/>
<Widget type="StaticText" skin="SandTextRight" position="104 112 104 18" name="AttribVal7"/>
<Widget type="TextBox" skin="SandText" position="4 112 100 18" name="Attrib7"/>
<Widget type="TextBox" skin="SandTextRight" position="104 112 104 18" name="AttribVal7"/>
<Widget type="StaticText" skin="SandText" position="4 130 100 18" name="Attrib8"/>
<Widget type="StaticText" skin="SandTextRight" position="104 130 104 18" name="AttribVal8"/>
<Widget type="TextBox" skin="SandText" position="4 130 100 18" name="Attrib8"/>
<Widget type="TextBox" skin="SandTextRight" position="104 130 104 18" name="AttribVal8"/>
</Widget>
<!-- Player skills, factions, birthsign and reputation -->

@ -70,16 +70,16 @@
</Skin>
<Skin name = "MW_StatName" size = "200 18">
<Child type="StaticText" skin="SandText" offset = "0 0 200 18" align = "ALIGN_LEFT ALIGN_HSTRETCH" name = "StatName" />
<Child type="TextBox" skin="SandText" offset = "0 0 200 18" align = "ALIGN_LEFT ALIGN_HSTRETCH" name = "StatName" />
</Skin>
<Skin name = "MW_StatNameC" size = "200 18">
<Child type="StaticTextC" skin="SandText" offset = "0 0 200 18" align = "LEFT HSTRETCH" name = "StatName" />
<Child type="TextBoxC" skin="SandText" offset = "0 0 200 18" align = "LEFT HSTRETCH" name = "StatName" />
</Skin>
<Skin name = "MW_StatNameValue" size = "200 18">
<Child type="StaticText" skin="SandText" offset = "0 0 160 18" align = "ALIGN_LEFT ALIGN_HSTRETCH" name = "StatName" />
<Child type="StaticText" skin="SandTextRight" offset = "160 0 40 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "StatValue" />
<Child type="TextBox" skin="SandText" offset = "0 0 160 18" align = "ALIGN_LEFT ALIGN_HSTRETCH" name = "StatName" />
<Child type="TextBox" skin="SandTextRight" offset = "160 0 40 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "StatValue" />
</Skin>
<Skin name = "MW_StatNameButtonC" size = "200 18">
@ -97,24 +97,24 @@
<Skin name = "MW_EffectImage" size = "200 24">
<Child type="ImageBox" skin="ImageBox" offset = "4 4 16 16" align = "ALIGN_LEFT ALIGN_TOP" name = "Image" />
<Child type="StaticText" skin="SandText" offset = "24 0 176 20" align = "ALIGN_VCENTRE ALIGN_HSTRETCH" name = "Text" />
<Child type="TextBox" skin="SandText" offset = "24 0 176 20" align = "ALIGN_VCENTRE ALIGN_HSTRETCH" name = "Text" />
</Skin>
<Skin name = "MW_DynamicStat_Red" size = "204 18">
<Child type="StaticText" skin="SandText" offset = "0 0 70 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
<Child type="TextBox" skin="SandText" offset = "0 0 70 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
<Child type="Progress" skin="MW_Progress_Red" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "Bar" />
<Child type="StaticText" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
<Child type="TextBox" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
</Skin>
<Skin name = "MW_DynamicStat_Blue" size = "204 18">
<Child type="StaticText" skin="SandText" offset = "0 0 70 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
<Child type="TextBox" skin="SandText" offset = "0 0 70 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
<Child type="Progress" skin="MW_Progress_Blue" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "Bar" />
<Child type="StaticText" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
<Child type="TextBox" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
</Skin>
<Skin name = "MW_DynamicStat_Green" size = "204 18">
<Child type="StaticText" skin="SandText" offset = "0 0 70 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
<Child type="TextBox" skin="SandText" offset = "0 0 70 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
<Child type="Progress" skin="MW_Progress_Green" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "Bar" />
<Child type="StaticText" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
<Child type="TextBox" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
</Skin>
</MyGUI>

@ -13,7 +13,7 @@ namespace GUI
class Layout
{
public:
Layout(const std::string & _layout, MyGUI::WidgetPtr _parent = nullptr)
Layout(const std::string & _layout, MyGUI::Widget* _parent = nullptr)
: mMainWidget(nullptr)
{ initialise(_layout, _parent); }
virtual ~Layout() { shutdown(); }
@ -25,7 +25,7 @@ namespace GUI
for (MyGUI::VectorWidgetPtr::iterator iter=mListWindowRoot.begin();
iter!=mListWindowRoot.end(); ++iter)
{
MyGUI::WidgetPtr find = (*iter)->findWidget(mPrefix + _name);
MyGUI::Widget* find = (*iter)->findWidget(mPrefix + _name);
if (nullptr != find)
{
T * cast = find->castType<T>(false);
@ -44,7 +44,7 @@ namespace GUI
}
void initialise(const std::string & _layout,
MyGUI::WidgetPtr _parent = nullptr)
MyGUI::Widget* _parent = nullptr)
{
const std::string MAIN_WINDOW = "_Main";
mLayoutName = _layout;
@ -87,30 +87,30 @@ namespace GUI
void setText(const std::string& name, const std::string& caption)
{
MyGUI::WidgetPtr pt;
MyGUI::Widget* pt;
getWidget(pt, name);
static_cast<MyGUI::TextBox*>(pt)->setCaption(caption);
}
void setTextColor(const std::string& name, float r, float g, float b)
{
MyGUI::WidgetPtr pt;
MyGUI::Widget* pt;
getWidget(pt, name);
MyGUI::StaticText *st = dynamic_cast<MyGUI::StaticText*>(pt);
MyGUI::TextBox *st = dynamic_cast<MyGUI::TextBox*>(pt);
if(st != NULL)
st->setTextColour(MyGUI::Colour(b,g,r));
}
void setImage(const std::string& name, const std::string& imgName)
{
MyGUI::StaticImagePtr pt;
MyGUI::ImageBox* pt;
getWidget(pt, name);
pt->setImageTexture(imgName);
}
protected:
MyGUI::WidgetPtr mMainWidget;
MyGUI::Widget* mMainWidget;
std::string mPrefix;
std::string mLayoutName;
MyGUI::VectorWidgetPtr mListWindowRoot;

Loading…
Cancel
Save