Add "Change Mod" buttons to RA and D2K. Fixes #3401.

This commit is contained in:
Paul Chote
2013-06-15 21:24:49 +12:00
parent 01a625691a
commit 0e21107694
4 changed files with 62 additions and 28 deletions

View File

@@ -37,6 +37,16 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
Ui.OpenWindow("EXTRACT_GAMEFILES_PANEL", args);
panel.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
panel.Get<ButtonWidget>("MODS_BUTTON").OnClick = () =>
{
Ui.OpenWindow("MODS_PANEL", new WidgetArgs()
{
{ "onExit", () => {} },
// Close this panel
{ "onSwitch", Ui.CloseWindow },
});
};
}
}
}

View File

@@ -34,6 +34,16 @@ namespace OpenRA.Mods.RA.Widgets.Logic
Ui.OpenWindow("INSTALL_FROMCD_PANEL", args);
panel.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
panel.Get<ButtonWidget>("MODS_BUTTON").OnClick = () =>
{
Ui.OpenWindow("MODS_PANEL", new WidgetArgs()
{
{ "onExit", () => {} },
// Close this panel
{ "onSwitch", Ui.CloseWindow },
});
};
}
}
}

View File

@@ -2,7 +2,7 @@ Background@INSTALL_PANEL:
Logic:D2kInstallLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:600
Width:630
Height:350
Children:
Label@TITLE:
@@ -62,31 +62,38 @@ Background@INSTALL_PANEL:
Height:25
Text: Put in your Dune 2000 CD and click "From CD" to extract game assets including music.
Align:Center
Button@EXTRACT_BUTTON:
X:PARENT_RIGHT - 280
Y:PARENT_BOTTOM - 45
Width:100
Height:25
Text:Extract Data
Font:Bold
Button@COPY_BUTTON:
X:PARENT_RIGHT - 420
Y:PARENT_BOTTOM - 45
Width:90
Height:25
Text:From CD
Font:Bold
Button@DOWNLOAD_BUTTON:
X:PARENT_RIGHT - 560
X:20
Y:PARENT_BOTTOM - 45
Width:120
Width:110
Height:25
Text:Download
Font:Bold
Button@QUIT_BUTTON:
X:PARENT_RIGHT - 140
Button@COPY_BUTTON:
X:140
Y:PARENT_BOTTOM - 45
Width:120
Width:110
Height:25
Text:From CD
Font:Bold
Button@EXTRACT_BUTTON:
X:260
Y:PARENT_BOTTOM - 45
Width:110
Height:25
Text:Extract Data
Font:Bold
Button@MODS_BUTTON:
X:PARENT_RIGHT - 250
Y:PARENT_BOTTOM - 45
Width:110
Height:25
Text:Change Mod
Font:Bold
Button@QUIT_BUTTON:
X:PARENT_RIGHT - 130
Y:PARENT_BOTTOM - 45
Width:110
Height:25
Text:Quit
Font:Bold

View File

@@ -2,7 +2,7 @@ Background@INSTALL_PANEL:
Logic:RAInstallLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:500
Width:510
Height:160
Children:
Label@TITLE:
@@ -28,23 +28,30 @@ Background@INSTALL_PANEL:
Text:Content can be downloaded, or copied from the install CD.
Align:Center
Button@DOWNLOAD_BUTTON:
X:PARENT_RIGHT - 280
X:20
Y:PARENT_BOTTOM - 45
Width:120
Width:110
Height:25
Text:Download
Font:Bold
Button@INSTALL_BUTTON:
X:PARENT_RIGHT - 420
X:140
Y:PARENT_BOTTOM - 45
Width:120
Width:110
Height:25
Text:Use CD
Font:Bold
Button@QUIT_BUTTON:
X:PARENT_RIGHT - 140
Button@MODS_BUTTON:
X:PARENT_RIGHT - 250
Y:PARENT_BOTTOM - 45
Width:120
Width:110
Height:25
Text:Change Mod
Font:Bold
Button@QUIT_BUTTON:
X:PARENT_RIGHT - 130
Y:PARENT_BOTTOM - 45
Width:110
Height:25
Text:Quit
Font:Bold