mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:23:53 +00:00
resize both the left and the right pane of the stats window
This commit is contained in:
parent
06d732cca3
commit
65ccfba191
3 changed files with 66 additions and 50 deletions
|
@ -60,6 +60,8 @@ StatsWindow::StatsWindow (WindowManager& parWindowManager)
|
|||
getWidget(skillAreaWidget, "Skills");
|
||||
getWidget(skillClientWidget, "SkillClient");
|
||||
getWidget(skillScrollerWidget, "SkillScroller");
|
||||
getWidget(mLeftPane, "LeftPane");
|
||||
getWidget(mRightPane, "RightPane");
|
||||
|
||||
skillScrollerWidget->eventScrollChangePosition += MyGUI::newDelegate(this, &StatsWindow::onScrollChangePosition);
|
||||
updateScroller();
|
||||
|
@ -93,6 +95,8 @@ void StatsWindow::onScrollChangePosition(MyGUI::ScrollBar* scroller, size_t pos)
|
|||
|
||||
void StatsWindow::onWindowResize(MyGUI::Window* window)
|
||||
{
|
||||
mLeftPane->setCoord( MyGUI::IntCoord(0, 0, 0.44*window->getSize().width, window->getSize().height) );
|
||||
mRightPane->setCoord( MyGUI::IntCoord(0.44*window->getSize().width, 0, 0.56*window->getSize().width, window->getSize().height) );
|
||||
updateScroller();
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,9 @@ namespace MWGui
|
|||
|
||||
static const int lineHeight;
|
||||
|
||||
MyGUI::Widget* mLeftPane;
|
||||
MyGUI::Widget* mRightPane;
|
||||
|
||||
MyGUI::WidgetPtr skillAreaWidget, skillClientWidget;
|
||||
MyGUI::ScrollBar* skillScrollerWidget;
|
||||
int lastPos, clientHeight;
|
||||
|
|
|
@ -3,59 +3,68 @@
|
|||
<MyGUI type="Layout">
|
||||
<Widget type="Window" skin="MW_Window_Pinnable" layer="Windows" position="0 0 500 342" name="_Main">
|
||||
|
||||
<!-- Player health stats -->
|
||||
<Widget type="Widget" skin="MW_Box" position="8 8 212 62">
|
||||
<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="ProgressBar" skin="MW_Progress_Red" position="78 4 130 18" name="HBar"/>
|
||||
<Widget type="ProgressBar" skin="MW_Progress_Blue" position="78 22 130 18" name="MBar"/>
|
||||
<Widget type="ProgressBar" skin="MW_Progress_Green" position="78 40 130 18" name="FBar"/>
|
||||
<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 type="Widget" skin="" name="LeftPane" position="0 0 220 342">
|
||||
|
||||
<!-- Player health stats -->
|
||||
<Widget type="Widget" skin="MW_Box" position="8 8 212 62" align="Left Top HStretch">
|
||||
<Widget type="TextBox" skin="NormalText" position="4 4 70 18" name="Health_str" align="Left Top HStretch"/>
|
||||
<Widget type="TextBox" skin="NormalText" position="4 22 70 18" name="Magicka_str" align="Left Top HStretch"/>
|
||||
<Widget type="TextBox" skin="NormalText" position="4 40 70 18" name="Fatigue_str" align="Left Top HStretch"/>
|
||||
<Widget type="ProgressBar" skin="MW_Progress_Red" position="78 4 130 18" name="HBar" align="Right Top"/>
|
||||
<Widget type="ProgressBar" skin="MW_Progress_Blue" position="78 22 130 18" name="MBar" align="Right Top"/>
|
||||
<Widget type="ProgressBar" skin="MW_Progress_Green" position="78 40 130 18" name="FBar" align="Right Top"/>
|
||||
<Widget type="TextBox" skin="ProgressText" position="78 4 130 18" name="HBarT" align="Right Top"/>
|
||||
<Widget type="TextBox" skin="ProgressText" position="78 22 130 18" name="MBarT" align="Right Top"/>
|
||||
<Widget type="TextBox" skin="ProgressText" position="78 40 130 18" name="FBarT" align="Right Top"/>
|
||||
</Widget>
|
||||
|
||||
<!-- Player level, race and class -->
|
||||
<Widget type="Widget" skin="MW_Box" position="8 78 212 62" align="Left Top HStretch">
|
||||
<Widget type="TextBox" skin="NormalText" position="4 4 100 18" name="Level_str" align="Left Top HStretch"/>
|
||||
<Widget type="TextBox" skin="NormalText" position="4 22 100 18" name="Race_str" align="Left Top HStretch"/>
|
||||
<Widget type="TextBox" skin="NormalText" position="4 40 100 18" name="Class_str" align="Left Top HStretch"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="104 4 104 18" name="LevelText" align="Right Top"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="104 22 104 18" name="RaceText" align="Right Top"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="104 40 104 18" name="ClassText" align="Right Top"/>
|
||||
</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="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="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="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="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="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="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="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>
|
||||
|
||||
</Widget>
|
||||
|
||||
<!-- Player level, race and class -->
|
||||
<Widget type="Widget" skin="MW_Box" position="8 78 212 62">
|
||||
<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 type="Widget" skin="" name="RightPane" position="220 0 280 342">
|
||||
|
||||
<!-- Player skills, factions, birthsign and reputation -->
|
||||
<Widget type="Widget" skin="MW_Box" position="8 8 248 292" align="ALIGN_LEFT ALIGN_STRETCH" name="Skills">
|
||||
<Widget type="Widget" skin="" position="0 4 226 284" align="ALIGN_LEFT ALIGN_TOP ALIGN_STRETCH" name="SkillClient" />
|
||||
<Widget type="ScrollBar" skin="MW_VScroll" position="230 4 14 284" align="ALIGN_RIGHT ALIGN_VSTRETCH" name="SkillScroller" />
|
||||
</Widget>
|
||||
|
||||
</Widget>
|
||||
|
||||
<Widget type="Widget" skin="MW_Box" position="8 148 212 152" align="ALIGN_LEFT ALIGN_TOP ALIGN_VSTRETCH">
|
||||
<Widget type="TextBox" skin="SandText" position="4 4 160 18" name="Attrib1"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="164 4 44 18" name="AttribVal1"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="4 22 160 18" name="Attrib2"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="164 22 44 18" name="AttribVal2"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="4 40 160 18" name="Attrib3"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="164 40 44 18" name="AttribVal3"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="4 58 160 18" name="Attrib4"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="164 58 44 18" name="AttribVal4"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="4 76 160 18" name="Attrib5"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="164 76 44 18" name="AttribVal5"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="4 94 160 18" name="Attrib6"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="164 94 44 18" name="AttribVal6"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="4 112 160 18" name="Attrib7"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="164 112 44 18" name="AttribVal7"/>
|
||||
|
||||
<Widget type="TextBox" skin="SandText" position="4 130 160 18" name="Attrib8"/>
|
||||
<Widget type="TextBox" skin="SandTextRight" position="164 130 44 18" name="AttribVal8"/>
|
||||
</Widget>
|
||||
|
||||
<!-- Player skills, factions, birthsign and reputation -->
|
||||
<Widget type="Widget" skin="MW_Box" position="228 8 248 292" align="ALIGN_LEFT ALIGN_STRETCH" name="Skills">
|
||||
<Widget type="Widget" skin="" position="4 4 222 284" align="ALIGN_STRETCH" name="SkillClient" />
|
||||
<Widget type="ScrollBar" skin="MW_VScroll" position="230 4 14 284" align="ALIGN_RIGHT ALIGN_VSTRETCH" name="SkillScroller" />
|
||||
</Widget>
|
||||
</Widget>
|
||||
</MyGUI>
|
||||
|
|
Loading…
Reference in a new issue