Add RA settings UI for PixelDouble
This commit is contained in:
@@ -91,6 +91,14 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
var windowHeight = display.GetWidget<TextFieldWidget>("WINDOW_HEIGHT");
|
var windowHeight = display.GetWidget<TextFieldWidget>("WINDOW_HEIGHT");
|
||||||
windowHeight.Text = gs.WindowedSize.Y.ToString();
|
windowHeight.Text = gs.WindowedSize.Y.ToString();
|
||||||
|
|
||||||
|
var pixelDoubleCheckbox = display.GetWidget<CheckboxWidget>("PIXELDOUBLE_CHECKBOX");
|
||||||
|
pixelDoubleCheckbox.IsChecked = () => gs.PixelDouble;
|
||||||
|
pixelDoubleCheckbox.OnClick = () =>
|
||||||
|
{
|
||||||
|
gs.PixelDouble ^= true;
|
||||||
|
Game.viewport.Zoom = gs.PixelDouble ? 2 : 1;
|
||||||
|
};
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
var debug = bg.GetWidget("DEBUG_PANE");
|
var debug = bg.GetWidget("DEBUG_PANE");
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,14 @@ Background@SETTINGS_MENU:
|
|||||||
Height:25
|
Height:25
|
||||||
Font:Tiny
|
Font:Tiny
|
||||||
Align:Center
|
Align:Center
|
||||||
Text:Video changes will be applied after the game is restarted
|
Text:Mode/Resolution changes will be applied after the game is restarted
|
||||||
|
Checkbox@PIXELDOUBLE_CHECKBOX:
|
||||||
|
Id:PIXELDOUBLE_CHECKBOX
|
||||||
|
Y:50
|
||||||
|
Width:200
|
||||||
|
Height:20
|
||||||
|
Font:Regular
|
||||||
|
Text:Enable Pixel Doubling
|
||||||
Container@DEBUG_PANE:
|
Container@DEBUG_PANE:
|
||||||
Id:DEBUG_PANE
|
Id:DEBUG_PANE
|
||||||
X:37
|
X:37
|
||||||
|
|||||||
Reference in New Issue
Block a user