some unrelated gui cleanup

actorid
scrawl 13 years ago
parent 689cf7ce05
commit cb35f4d208

@ -102,7 +102,7 @@ MapWindow::MapWindow(WindowManager& parWindowManager) :
getWidget(mButton, "WorldButton");
mButton->eventMouseButtonClick += MyGUI::newDelegate(this, &MapWindow::onWorldButtonClicked);
mButton->setCaption(mWindowManager.getGameSettingString("sWorld", ""));
mButton->setCaptionWithReplacing("#{sWorld}");
int width = mButton->getTextSize().width + 24;
mButton->setCoord(mMainWidget->getSize().width - width - 22, mMainWidget->getSize().height - 64, width, 22);
@ -172,8 +172,8 @@ void MapWindow::onWorldButtonClicked(MyGUI::Widget* _sender)
mGlobalMap->setVisible(mGlobal);
mLocalMap->setVisible(!mGlobal);
mButton->setCaption( mGlobal ? mWindowManager.getGameSettingString("sWorld", "") :
mWindowManager.getGameSettingString("sLocal", ""));
mButton->setCaptionWithReplacing( mGlobal ? "#{sLocal}" :
"#{sWorld}");
int width = mButton->getTextSize().width + 24;
mButton->setCoord(mMainWidget->getSize().width - width - 22, mMainWidget->getSize().height - 64, width, 22);
}

@ -77,8 +77,6 @@ StatsWindow::StatsWindow (WindowManager& parWindowManager)
MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(mMainWidget);
t->eventWindowChangeCoord += MyGUI::newDelegate(this, &StatsWindow::onWindowResize);
setupToolTips();
}
void StatsWindow::onScrollChangePosition(MyGUI::ScrollBar* scroller, size_t pos)
@ -633,116 +631,3 @@ void StatsWindow::onPinToggled()
{
mWindowManager.setHMSVisibility(!mPinned);
}
void StatsWindow::setupToolTips()
{
const ESMS::ESMStore &store = mWindowManager.getStore();
MyGUI::Widget* widget;
/// \todo move this into the .layout file!
getWidget(widget, "Attrib1");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeStrength")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sStrDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_strength.dds");
getWidget(widget, "AttribVal1");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeStrength")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sStrDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_strength.dds");
getWidget(widget, "Attrib2");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeIntelligence")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sIntDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_int.dds");
getWidget(widget, "AttribVal2");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeIntelligence")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sIntDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_int.dds");
getWidget(widget, "Attrib3");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeWillpower")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sWilDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_wilpower.dds");
getWidget(widget, "AttribVal3");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeWillpower")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sWilDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_wilpower.dds");
getWidget(widget, "Attrib4");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeAgility")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sAgiDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_agility.dds");
getWidget(widget, "AttribVal4");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeAgility")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sAgiDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_agility.dds");
getWidget(widget, "Attrib5");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeSpeed")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sSpdDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_speed.dds");
getWidget(widget, "AttribVal5");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeSpeed")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sSpdDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_speed.dds");
getWidget(widget, "Attrib6");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeEndurance")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sEndDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_endurance.dds");
getWidget(widget, "AttribVal6");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeEndurance")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sEndDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_endurance.dds");
getWidget(widget, "Attrib7");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributePersonality")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sPerDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_personality.dds");
getWidget(widget, "AttribVal7");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributePersonality")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sPerDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_personality.dds");
getWidget(widget, "Attrib8");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeLuck")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sLucDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_luck.dds");
getWidget(widget, "AttribVal8");
widget->setUserString("ToolTipType", "Layout");
widget->setUserString("ToolTipLayout", "AttributeToolTip");
widget->setUserString("Caption_AttributeName", store.gameSettings.find ("sAttributeLuck")->str);
widget->setUserString("Caption_AttributeDescription", store.gameSettings.find ("sLucDesc")->str);
widget->setUserString("ImageTexture_AttributeImage", "icons\\k\\attribute_luck.dds");
}

@ -50,8 +50,6 @@ namespace MWGui
MyGUI::Widget* addItem(const std::string text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
void updateScroller();
void setupToolTips();
void setFactions (const FactionList& factions);
void setBirthSign (const std::string &signId);

@ -608,4 +608,6 @@ void WindowManager::onRetrieveTag(const MyGUI::UString& _tag, MyGUI::UString& _r
const ESM::GameSetting *setting = MWBase::Environment::get().getWorld()->getStore().gameSettings.search(_tag);
if (setting && setting->type == ESM::VT_String)
_result = setting->str;
else
_result = _tag;
}

@ -99,29 +99,117 @@
</Widget>
<Widget type="Widget" skin="MW_Box" position="8 148 212 152" align="Left Top Stretch">
<Widget type="TextBox" skin="SandText" position="4 4 160 18" name="Attrib1" align="Left Top HStretch"/>
<Widget type="TextBox" skin="SandTextRight" position="164 4 44 18" name="AttribVal1" align="Right Top"/>
<Widget type="Button" skin="" position="4 4 204 18" name="Attrib1Box" align="Left Top HStretch">
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="AttributeToolTip"/>
<UserString key="Caption_AttributeName" value="#{sAttributeStrength}"/>
<UserString key="Caption_AttributeDescription" value="#{sStrDesc}"/>
<UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_strength.dds"/>
<Widget type="TextBox" skin="SandText" position="0 0 160 18" name="Attrib1" align="Left Top HStretch">
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="TextBox" skin="SandTextRight" position="160 0 44 18" name="AttribVal1" align="Right Top">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="4 22 160 18" name="Attrib2" align="Left Top HStretch"/>
<Widget type="TextBox" skin="SandTextRight" position="164 22 44 18" name="AttribVal2" align="Right Top"/>
<Widget type="Button" skin="" position="4 22 204 18" name="Attrib2Box" align="Left Top HStretch">
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="AttributeToolTip"/>
<UserString key="Caption_AttributeName" value="#{sAttributeIntelligence}"/>
<UserString key="Caption_AttributeDescription" value="#{sIntDesc}"/>
<UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_int.dds"/>
<Widget type="TextBox" skin="SandText" position="0 0 160 18" name="Attrib2" align="Left Top HStretch">
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="TextBox" skin="SandTextRight" position="160 0 44 18" name="AttribVal2" align="Right Top">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="4 40 160 18" name="Attrib3" align="Left Top HStretch"/>
<Widget type="TextBox" skin="SandTextRight" position="164 40 44 18" name="AttribVal3" align="Right Top"/>
<Widget type="Button" skin="" position="4 40 204 18" name="Attrib3Box" align="Left Top HStretch">
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="AttributeToolTip"/>
<UserString key="Caption_AttributeName" value="#{sAttributeWillpower}"/>
<UserString key="Caption_AttributeDescription" value="#{sWilDesc}"/>
<UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_wilpower.dds"/>
<Widget type="TextBox" skin="SandText" position="0 0 160 18" name="Attrib3" align="Left Top HStretch">
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="TextBox" skin="SandTextRight" position="160 0 44 18" name="AttribVal3" align="Right Top">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="4 58 160 18" name="Attrib4" align="Left Top HStretch"/>
<Widget type="TextBox" skin="SandTextRight" position="164 58 44 18" name="AttribVal4" align="Right Top"/>
<Widget type="Button" skin="" position="4 58 204 18" name="Attrib4Box" align="Left Top HStretch">
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="AttributeToolTip"/>
<UserString key="Caption_AttributeName" value="#{sAttributeAgility}"/>
<UserString key="Caption_AttributeDescription" value="#{sAgiDesc}"/>
<UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_agility.dds"/>
<Widget type="TextBox" skin="SandText" position="0 0 160 18" name="Attrib4" align="Left Top HStretch">
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="TextBox" skin="SandTextRight" position="160 0 44 18" name="AttribVal4" align="Right Top">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="4 76 160 18" name="Attrib5" align="Left Top HStretch"/>
<Widget type="TextBox" skin="SandTextRight" position="164 76 44 18" name="AttribVal5" align="Right Top"/>
<Widget type="Button" skin="" position="4 76 204 18" name="Attrib5Box" align="Left Top HStretch">
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="AttributeToolTip"/>
<UserString key="Caption_AttributeName" value="#{sAttributeSpeed}"/>
<UserString key="Caption_AttributeDescription" value="#{sSpdDesc}"/>
<UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_speed.dds"/>
<Widget type="TextBox" skin="SandText" position="0 0 160 18" name="Attrib5" align="Left Top HStretch">
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="TextBox" skin="SandTextRight" position="160 0 44 18" name="AttribVal5" align="Right Top">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="4 94 160 18" name="Attrib6" align="Left Top HStretch"/>
<Widget type="TextBox" skin="SandTextRight" position="164 94 44 18" name="AttribVal6" align="Right Top"/>
<Widget type="Button" skin="" position="4 94 204 18" name="Attrib6Box" align="Left Top HStretch">
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="AttributeToolTip"/>
<UserString key="Caption_AttributeName" value="#{sAttributeEndurance}"/>
<UserString key="Caption_AttributeDescription" value="#{sEndDesc}"/>
<UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_endurance.dds"/>
<Widget type="TextBox" skin="SandText" position="0 0 160 18" name="Attrib6" align="Left Top HStretch">
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="TextBox" skin="SandTextRight" position="160 0 44 18" name="AttribVal6" align="Right Top">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="4 112 160 18" name="Attrib7" align="Left Top HStretch"/>
<Widget type="TextBox" skin="SandTextRight" position="164 112 44 18" name="AttribVal7" align="Right Top"/>
<Widget type="Button" skin="" position="4 112 204 18" name="Attrib7Box" align="Left Top HStretch">
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="AttributeToolTip"/>
<UserString key="Caption_AttributeName" value="#{sAttributePersonality}"/>
<UserString key="Caption_AttributeDescription" value="#{sPerDesc}"/>
<UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_personality.dds"/>
<Widget type="TextBox" skin="SandText" position="0 0 160 18" name="Attrib7" align="Left Top HStretch">
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="TextBox" skin="SandTextRight" position="160 0 44 18" name="AttribVal7" align="Right Top">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="4 130 160 18" name="Attrib8" align="Left Top HStretch"/>
<Widget type="TextBox" skin="SandTextRight" position="164 130 44 18" name="AttribVal8" align="Right Top"/>
<Widget type="Button" skin="" position="4 130 204 18" name="Attrib8Box" align="Left Top HStretch">
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="AttributeToolTip"/>
<UserString key="Caption_AttributeName" value="#{sAttributeLuck}"/>
<UserString key="Caption_AttributeDescription" value="#{sLucDesc}"/>
<UserString key="ImageTexture_AttributeImage" value="icons\k\attribute_luck.dds"/>
<Widget type="TextBox" skin="SandText" position="0 0 160 18" name="Attrib8" align="Left Top HStretch">
<Property key="NeedMouse" value="false"/>
</Widget>
<Widget type="TextBox" skin="SandTextRight" position="160 0 44 18" name="AttribVal8" align="Right Top">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
</Widget>
</Widget>

Loading…
Cancel
Save