You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
806 B
27 lines
806 B
namespace CMSGame
|
|
{
|
|
public partial class VideoSettingsMenu : Control
|
|
{
|
|
public VideoSettings? Settings;
|
|
|
|
public CheckButton? FullScreenCheckButton;
|
|
|
|
public override void _Ready()
|
|
{
|
|
Settings = this.GetAutoloadNode<GameSettingsNode>(nameof(GameSettingsNode)).VideoSettings;
|
|
|
|
this.GetUniqueNode(ref FullScreenCheckButton, nameof(FullScreenCheckButton));
|
|
|
|
FullScreenCheckButton!.Toggled += FullScreenCheckButton_Toggled;
|
|
|
|
FullScreenCheckButton.SetPressedNoSignal(Settings.UseFullScreen);
|
|
}
|
|
|
|
private void FullScreenCheckButton_Toggled(bool buttonPressed)
|
|
{
|
|
Settings!.UseFullScreen = buttonPressed;
|
|
DisplayServerHelper.ApplyResolutionSettings(buttonPressed);
|
|
}
|
|
}
|
|
}
|