Setup player screen FX
This commit is contained in:
@@ -18,4 +18,7 @@ public partial class OptionsData : Node
|
||||
|
||||
[Save("ScreenResolution")]
|
||||
public required int ScreenResolution { get; set; }
|
||||
|
||||
[Save("SkipCutscene")]
|
||||
public required bool SkipCutscene { get; set; }
|
||||
}
|
||||
@@ -2,6 +2,7 @@ using Chickensoft.AutoInject;
|
||||
using Chickensoft.Introspection;
|
||||
using Godot;
|
||||
using NathanHoad;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Zennysoft.Game.Ma;
|
||||
@@ -53,9 +54,12 @@ public partial class OptionsMenu : Control
|
||||
MasterVolumeLevel = MasterVolumeSlider.Value,
|
||||
MusicVolumeLevel = MusicVolumeSlider.Value,
|
||||
SFXVolumeLevel = SFXVolumeSlider.Value,
|
||||
ScreenResolution = ResolutionOptions.GetSelectedId()
|
||||
ScreenResolution = ResolutionOptions.GetSelectedId(),
|
||||
SkipCutscene = SkipOpeningCSCheck.ButtonPressed
|
||||
};
|
||||
|
||||
SkipOpeningCSCheck.Pressed += SkipOpeningCS_Pressed;
|
||||
|
||||
DeleteSaveButton.Pressed += DeleteSaveButton_Pressed;
|
||||
YesDeleteButton.Pressed += YesDeleteButton_Pressed;
|
||||
NoDeleteButton.Pressed += NoDeleteButton_Pressed;
|
||||
@@ -76,6 +80,8 @@ public partial class OptionsMenu : Control
|
||||
VisibilityChanged += OptionsMenu_VisibilityChanged;
|
||||
}
|
||||
|
||||
private void SkipOpeningCS_Pressed() => OptionsData.SkipCutscene = SkipOpeningCSCheck.ButtonPressed;
|
||||
|
||||
private void NoDeleteButton_Pressed()
|
||||
{
|
||||
ReleaseFocus();
|
||||
@@ -151,6 +157,7 @@ public partial class OptionsMenu : Control
|
||||
MusicVolumeSlider.Value = optionsData.MusicVolumeLevel;
|
||||
SFXVolumeSlider.Value = optionsData.SFXVolumeLevel;
|
||||
ResolutionOptions.Select(optionsData.ScreenResolution);
|
||||
SkipOpeningCSCheck.ButtonPressed = optionsData.SkipCutscene;
|
||||
DisplayServer.WindowSetMode(_windowModes[optionsData.ScreenResolution]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user