Add C&C settings UI for PixelDouble
This commit is contained in:
@@ -86,6 +86,14 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
windowModeDropdown.GetText = () => graphicsSettings.Mode == WindowMode.Windowed ?
|
windowModeDropdown.GetText = () => graphicsSettings.Mode == WindowMode.Windowed ?
|
||||||
"Windowed" : graphicsSettings.Mode == WindowMode.Fullscreen ? "Fullscreen" : "Pseudo-Fullscreen";
|
"Windowed" : graphicsSettings.Mode == WindowMode.Fullscreen ? "Fullscreen" : "Pseudo-Fullscreen";
|
||||||
|
|
||||||
|
var pixelDoubleCheckbox = generalPane.GetWidget<CheckboxWidget>("PIXELDOUBLE_CHECKBOX");
|
||||||
|
pixelDoubleCheckbox.IsChecked = () => graphicsSettings.PixelDouble;
|
||||||
|
pixelDoubleCheckbox.OnClick = () =>
|
||||||
|
{
|
||||||
|
graphicsSettings.PixelDouble ^= true;
|
||||||
|
Game.viewport.Zoom = graphicsSettings.PixelDouble ? 2 : 1;
|
||||||
|
};
|
||||||
|
|
||||||
generalPane.GetWidget("WINDOW_RESOLUTION").IsVisible = () => graphicsSettings.Mode == WindowMode.Windowed;
|
generalPane.GetWidget("WINDOW_RESOLUTION").IsVisible = () => graphicsSettings.Mode == WindowMode.Windowed;
|
||||||
var windowWidth = generalPane.GetWidget<TextFieldWidget>("WINDOW_WIDTH");
|
var windowWidth = generalPane.GetWidget<TextFieldWidget>("WINDOW_WIDTH");
|
||||||
windowWidth.Text = graphicsSettings.WindowedSize.X.ToString();
|
windowWidth.Text = graphicsSettings.WindowedSize.X.ToString();
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ Container@SETTINGS_PANEL:
|
|||||||
Y:20
|
Y:20
|
||||||
X:375
|
X:375
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Text:Video
|
Text:Graphics
|
||||||
Align:Center
|
Align:Center
|
||||||
Width:340
|
Width:340
|
||||||
Label@MODE_LABEL:
|
Label@MODE_LABEL:
|
||||||
@@ -154,17 +154,25 @@ Container@SETTINGS_PANEL:
|
|||||||
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
|
||||||
|
X:375
|
||||||
|
Y:90
|
||||||
|
Width:200
|
||||||
|
Height:20
|
||||||
|
Font:Regular
|
||||||
|
Text:Enable Pixel Doubling
|
||||||
Label@AUDIO_TITLE:
|
Label@AUDIO_TITLE:
|
||||||
X:375
|
X:375
|
||||||
Y:120
|
Y:130
|
||||||
Width:340
|
Width:340
|
||||||
Font:Bold
|
Font:Bold
|
||||||
Text:Audio
|
Text:Sound
|
||||||
Align:Center
|
Align:Center
|
||||||
Label@SOUND_LABEL:
|
Label@SOUND_LABEL:
|
||||||
X:375
|
X:375
|
||||||
Y:135
|
Y:145
|
||||||
Width:95
|
Width:95
|
||||||
Height:25
|
Height:25
|
||||||
Align:Right
|
Align:Right
|
||||||
@@ -172,13 +180,13 @@ Container@SETTINGS_PANEL:
|
|||||||
Slider@SOUND_SLIDER:
|
Slider@SOUND_SLIDER:
|
||||||
Id:SOUND_SLIDER
|
Id:SOUND_SLIDER
|
||||||
X:475
|
X:475
|
||||||
Y:140
|
Y:150
|
||||||
Width:240
|
Width:240
|
||||||
Height:20
|
Height:20
|
||||||
Ticks:5
|
Ticks:5
|
||||||
Label@MUSIC_LABEL:
|
Label@MUSIC_LABEL:
|
||||||
X:375
|
X:375
|
||||||
Y:165
|
Y:175
|
||||||
Width:95
|
Width:95
|
||||||
Height:25
|
Height:25
|
||||||
Align:Right
|
Align:Right
|
||||||
@@ -186,14 +194,14 @@ Container@SETTINGS_PANEL:
|
|||||||
Slider@MUSIC_SLIDER:
|
Slider@MUSIC_SLIDER:
|
||||||
Id:MUSIC_SLIDER
|
Id:MUSIC_SLIDER
|
||||||
X:475
|
X:475
|
||||||
Y:170
|
Y:180
|
||||||
Width:240
|
Width:240
|
||||||
Height:20
|
Height:20
|
||||||
Ticks:5
|
Ticks:5
|
||||||
Checkbox@SHELLMAP_MUSIC:
|
Checkbox@SHELLMAP_MUSIC:
|
||||||
Id:SHELLMAP_MUSIC
|
Id:SHELLMAP_MUSIC
|
||||||
X:375
|
X:375
|
||||||
Y:200
|
Y:210
|
||||||
Width:200
|
Width:200
|
||||||
Height:20
|
Height:20
|
||||||
Font:Regular
|
Font:Regular
|
||||||
|
|||||||
Reference in New Issue
Block a user