Add "Change Mod" buttons to RA and D2K. Fixes #3401.
This commit is contained in:
@@ -37,6 +37,16 @@ namespace OpenRA.Mods.D2k.Widgets.Logic
|
|||||||
Ui.OpenWindow("EXTRACT_GAMEFILES_PANEL", args);
|
Ui.OpenWindow("EXTRACT_GAMEFILES_PANEL", args);
|
||||||
|
|
||||||
panel.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
|
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 },
|
||||||
|
});
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,16 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
Ui.OpenWindow("INSTALL_FROMCD_PANEL", args);
|
Ui.OpenWindow("INSTALL_FROMCD_PANEL", args);
|
||||||
|
|
||||||
panel.Get<ButtonWidget>("QUIT_BUTTON").OnClick = Game.Exit;
|
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 },
|
||||||
|
});
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Background@INSTALL_PANEL:
|
|||||||
Logic:D2kInstallLogic
|
Logic:D2kInstallLogic
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
Width:600
|
Width:630
|
||||||
Height:350
|
Height:350
|
||||||
Children:
|
Children:
|
||||||
Label@TITLE:
|
Label@TITLE:
|
||||||
@@ -62,31 +62,38 @@ Background@INSTALL_PANEL:
|
|||||||
Height:25
|
Height:25
|
||||||
Text: Put in your Dune 2000 CD and click "From CD" to extract game assets including music.
|
Text: Put in your Dune 2000 CD and click "From CD" to extract game assets including music.
|
||||||
Align:Center
|
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:
|
Button@DOWNLOAD_BUTTON:
|
||||||
X:PARENT_RIGHT - 560
|
X:20
|
||||||
Y:PARENT_BOTTOM - 45
|
Y:PARENT_BOTTOM - 45
|
||||||
Width:120
|
Width:110
|
||||||
Height:25
|
Height:25
|
||||||
Text:Download
|
Text:Download
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Button@QUIT_BUTTON:
|
Button@COPY_BUTTON:
|
||||||
X:PARENT_RIGHT - 140
|
X:140
|
||||||
Y:PARENT_BOTTOM - 45
|
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
|
Height:25
|
||||||
Text:Quit
|
Text:Quit
|
||||||
Font:Bold
|
Font:Bold
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Background@INSTALL_PANEL:
|
|||||||
Logic:RAInstallLogic
|
Logic:RAInstallLogic
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
Width:500
|
Width:510
|
||||||
Height:160
|
Height:160
|
||||||
Children:
|
Children:
|
||||||
Label@TITLE:
|
Label@TITLE:
|
||||||
@@ -28,23 +28,30 @@ Background@INSTALL_PANEL:
|
|||||||
Text:Content can be downloaded, or copied from the install CD.
|
Text:Content can be downloaded, or copied from the install CD.
|
||||||
Align:Center
|
Align:Center
|
||||||
Button@DOWNLOAD_BUTTON:
|
Button@DOWNLOAD_BUTTON:
|
||||||
X:PARENT_RIGHT - 280
|
X:20
|
||||||
Y:PARENT_BOTTOM - 45
|
Y:PARENT_BOTTOM - 45
|
||||||
Width:120
|
Width:110
|
||||||
Height:25
|
Height:25
|
||||||
Text:Download
|
Text:Download
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Button@INSTALL_BUTTON:
|
Button@INSTALL_BUTTON:
|
||||||
X:PARENT_RIGHT - 420
|
X:140
|
||||||
Y:PARENT_BOTTOM - 45
|
Y:PARENT_BOTTOM - 45
|
||||||
Width:120
|
Width:110
|
||||||
Height:25
|
Height:25
|
||||||
Text:Use CD
|
Text:Use CD
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Button@QUIT_BUTTON:
|
Button@MODS_BUTTON:
|
||||||
X:PARENT_RIGHT - 140
|
X:PARENT_RIGHT - 250
|
||||||
Y:PARENT_BOTTOM - 45
|
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
|
Height:25
|
||||||
Text:Quit
|
Text:Quit
|
||||||
Font:Bold
|
Font:Bold
|
||||||
|
|||||||
Reference in New Issue
Block a user