mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Savegame dialog improvements
This commit is contained in:
parent
a35d4334c3
commit
edadcb338c
5 changed files with 58 additions and 4 deletions
|
@ -253,6 +253,21 @@ namespace MWGui
|
|||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MWBase::StateManager::State state = MWBase::Environment::get().getStateManager()->getState();
|
||||
|
||||
// If game is running, ask for confirmation first
|
||||
if (state == MWBase::StateManager::State_Running && !reallySure)
|
||||
{
|
||||
ConfirmationDialog* dialog = MWBase::Environment::get().getWindowManager()->getConfirmationDialog();
|
||||
dialog->askForConfirmation("#{sMessage1}");
|
||||
dialog->eventOkClicked.clear();
|
||||
dialog->eventOkClicked += MyGUI::newDelegate(this, &SaveGameDialog::onConfirmationGiven);
|
||||
dialog->eventCancelClicked.clear();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
setVisible(false);
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode (MWGui::GM_MainMenu);
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<Child type="Widget" skin="BTN_BottomRight" offset="132 20 4 4" align="Bottom Right"/>
|
||||
<Child type="Widget" skin="BTN_BottomRight" offset="132 20 4 4" align="Bottom Right"/>
|
||||
|
||||
<BasisSkin type="SimpleText" offset="4 4 128 16" align="Stretch">
|
||||
<BasisSkin type="SimpleText" offset="4 3 128 16" align="Stretch">
|
||||
<State name="disabled" colour="#{fontcolour=disabled}" shift="0"/>
|
||||
<State name="normal" colour="#{fontcolour=normal}" shift="0"/>
|
||||
<State name="highlighted" colour="#{fontcolour=normal_over}" shift="0"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Layout">
|
||||
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 300 130" align="Center" name="_Main">
|
||||
<Widget type="Window" skin="MW_DialogNoTransp" layer="Windows" position="0 0 300 130" align="Center" name="_Main">
|
||||
<Property key="Visible" value="false"/>
|
||||
|
||||
<Widget type="EditBox" skin="MW_TextEditClient" position="16 8 268 130" name="Message" align="Center Top">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Layout">
|
||||
<Widget type="VBox" skin="MW_Dialog" layer="Windows" position="0 0 600 400" align="Center" name="_Main">
|
||||
<Widget type="VBox" skin="MW_DialogNoTransp" layer="Windows" position="0 0 600 400" align="Center" name="_Main">
|
||||
<Property key="Padding" value="12"/>
|
||||
<Property key="Spacing" value="8"/>
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<MyGUI type="Resource" version="1.1">
|
||||
<!-- Defines a transparent background -->
|
||||
<!-- Defines a partially transparent background -->
|
||||
<Resource type="ResourceSkin" name="BlackBG" size="8 8" texture="transparent">
|
||||
<Property key="Colour" value="#{fontcolour=background}"/>
|
||||
<BasisSkin type="MainSkin" offset="0 0 8 8">
|
||||
|
@ -9,6 +9,14 @@
|
|||
</BasisSkin>
|
||||
</Resource>
|
||||
|
||||
<!-- Defines a non-transparent background -->
|
||||
<Resource type="ResourceSkin" name="FullBlackBG" size="8 8" texture="black">
|
||||
<BasisSkin type="MainSkin" offset="0 0 8 8">
|
||||
<State name="normal" offset="0 0 8 8"/>
|
||||
</BasisSkin>
|
||||
</Resource>
|
||||
|
||||
<!-- Defines a non-transparent background -->
|
||||
<Resource type="ResourceSkin" name="TransparentBG" size="8 8" texture="transparent">
|
||||
<Property key="Colour" value="#{fontcolour=background}"/>
|
||||
</Resource>
|
||||
|
@ -883,4 +891,35 @@
|
|||
<Property key="Scale" value="1 1 -1 -1"/>
|
||||
</Child>
|
||||
</Resource>
|
||||
|
||||
<Resource type="ResourceSkin" name="MW_DialogNoTransp" size="256 54">
|
||||
<Child type="Widget" skin="FullBlackBG" offset="4 4 248 46" align="Stretch" name="Client"/>
|
||||
|
||||
<!-- Outer borders -->
|
||||
<Child type="Widget" skin="DB_T" offset="4 0 248 4" align="Top HStretch" name="Border">
|
||||
<Property key="Scale" value="0 1 0 -1"/>
|
||||
</Child>
|
||||
<Child type="Widget" skin="DB_L" offset="0 4 4 46" align="Left VStretch" name="Border">
|
||||
<Property key="Scale" value="1 0 -1 0"/>
|
||||
</Child>
|
||||
<Child type="Widget" skin="DB_B" offset="4 50 248 4" align="Bottom HStretch" name="Border">
|
||||
<Property key="Scale" value="0 0 0 1"/>
|
||||
</Child>
|
||||
<Child type="Widget" skin="DB_R" offset="252 4 4 46" align="Right VStretch" name="Border">
|
||||
<Property key="Scale" value="0 0 1 0"/>
|
||||
</Child>
|
||||
|
||||
<Child type="Widget" skin="DB_BR" offset="252 50 4 4" align="Right Bottom" name="Border">
|
||||
<Property key="Scale" value="0 0 1 1"/>
|
||||
</Child>
|
||||
<Child type="Widget" skin="DB_BL" offset="0 50 4 4" align="Left Bottom" name="Border">
|
||||
<Property key="Scale" value="1 0 -1 1"/>
|
||||
</Child>
|
||||
<Child type="Widget" skin="DB_TR" offset="252 0 4 4" align="Right Top" name="Border">
|
||||
<Property key="Scale" value="0 1 1 -1"/>
|
||||
</Child>
|
||||
<Child type="Widget" skin="DB_TL" offset="0 0 4 4" align="Left Top" name="Border">
|
||||
<Property key="Scale" value="1 1 -1 -1"/>
|
||||
</Child>
|
||||
</Resource>
|
||||
</MyGUI>
|
||||
|
|
Loading…
Reference in a new issue