mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:23:52 +00:00
Nicer VR meta menu
This commit is contained in:
parent
ca202011a6
commit
ce455e7aaa
3 changed files with 61 additions and 47 deletions
|
@ -15,11 +15,7 @@ namespace MWVR
|
|||
: WindowBase("openmw_vr_metamenu.layout")
|
||||
, mWidth (w)
|
||||
, mHeight (h)
|
||||
, mButtonBox(0)
|
||||
{
|
||||
|
||||
getWidget(mButtonBox, "ButtonBox");
|
||||
|
||||
updateMenu();
|
||||
}
|
||||
|
||||
|
@ -125,8 +121,6 @@ namespace MWVR
|
|||
|
||||
void VrMetaMenu::updateMenu()
|
||||
{
|
||||
setCoord(0,0, mWidth, mHeight);
|
||||
|
||||
static std::vector<std::string> buttons{ "return", "quicksave", "quickload", "console", "inventory", "journal", "rest", "gamemenu" };
|
||||
|
||||
if(mButtons.empty())
|
||||
|
@ -141,11 +135,5 @@ namespace MWVR
|
|||
button->setVisible(true);
|
||||
mButtons[buttonId] = button;
|
||||
}
|
||||
|
||||
int width = mButtonBox->getWidth();
|
||||
int height = mButtonBox->getHeight();
|
||||
|
||||
mButtonBox->setCoord (mWidth/2 - width/2, mHeight/2 - height/2, width, height);
|
||||
mButtonBox->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,6 @@ namespace MWVR
|
|||
bool exit() override;
|
||||
|
||||
private:
|
||||
MyGUI::Widget* mButtonBox{ nullptr };
|
||||
std::map<std::string, MyGUI::Button*> mButtons{};
|
||||
|
||||
void onButtonClicked (MyGUI::Widget* sender);
|
||||
|
|
|
@ -2,40 +2,67 @@
|
|||
|
||||
<MyGUI type="Layout">
|
||||
<!-- TODO: Multiple language support -->
|
||||
<Widget type="Widget" layer="MainMenu" position="0 0 300 659" name="_Main" align="Center">
|
||||
<Widget type="Widget" position="63 0 173 659" name="ButtonBox">
|
||||
<Widget type="Button" skin="MW_Button" position="30 0 112 64" name="return">
|
||||
<Property key="Caption" value="Return"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="Button" skin="MW_Button" position="4 85 164 64" name="quicksave">
|
||||
<Property key="Caption" value="Quick Save"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="Button" skin="MW_Button" position="3 170 166 64" name="quickload">
|
||||
<Property key="Caption" value="Quick Load"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="Button" skin="MW_Button" position="27 255 118 64" name="console">
|
||||
<Property key="Caption" value="Console"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="Button" skin="MW_Button" position="14 340 145 64" name="inventory">
|
||||
<Property key="Caption" value="Inventory"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="Button" skin="MW_Button" position="31 425 110 64" name="journal">
|
||||
<Property key="Caption" value="Journal"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="Button" skin="MW_Button" position="46 510 80 64" name="rest">
|
||||
<Property key="Caption" value="Rest"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="Button" skin="MW_Button" position="0 595 173 64" name="gamemenu">
|
||||
<Property key="Caption" value="Game Menu"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="VBox" layer="MainMenu" name="_Main" align="Center">
|
||||
<Property key="AutoResize" value="true"/>
|
||||
<Property key="Padding" value="50"/>
|
||||
<Property key="Spacing" value="12"/>
|
||||
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" name="return" align="HCenter">
|
||||
<Property key="Caption" value="Return"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Spacer"/>
|
||||
<Widget type="Widget" skin="IB_T" align="HCenter" position="0 0 125 4">
|
||||
<Widget type="Widget"/>
|
||||
</Widget>
|
||||
<Widget type="Spacer"/>
|
||||
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" name="quicksave" align="HCenter">
|
||||
<Property key="Caption" value="Quick Save"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" name="quickload" align="HCenter">
|
||||
<Property key="Caption" value="Quick Load"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Spacer"/>
|
||||
<Widget type="Widget" skin="IB_T" align="HCenter" position="0 0 125 4">
|
||||
<Widget type="Widget"/>
|
||||
</Widget>
|
||||
<Widget type="Spacer"/>
|
||||
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" name="inventory" align="HCenter">
|
||||
<Property key="Caption" value="Inventory"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" name="journal" align="HCenter">
|
||||
<Property key="Caption" value="Journal"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" name="rest" align="HCenter">
|
||||
<Property key="Caption" value="Rest"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="Spacer"/>
|
||||
<Widget type="Widget" skin="IB_T" align="HCenter" position="0 0 125 4">
|
||||
<Widget type="Widget"/>
|
||||
</Widget>
|
||||
<Widget type="Spacer"/>
|
||||
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" name="console" align="HCenter">
|
||||
<Property key="Caption" value="Console"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
|
||||
<Widget type="AutoSizedButton" skin="MW_Button" name="gamemenu" align="HCenter">
|
||||
<Property key="Caption" value="Game Menu"/>
|
||||
<Property key="FontHeight" value="32"/>
|
||||
</Widget>
|
||||
|
||||
<!-- without this the last button wouldn't resize correctly -->
|
||||
<Widget type="Widget"/>
|
||||
</Widget>
|
||||
</MyGUI>
|
||||
|
|
Loading…
Reference in a new issue