Skip to content

Commit d0c6b31

Browse files
committed
Re-fix Screensaver
1 parent 70cce08 commit d0c6b31

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

TitleScreen/TitleScreen.cs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,28 @@ public override void _Ready()
3131

3232
public override void _Input(InputEvent @event)
3333
{
34-
_timer.Start();
35-
36-
if (@event.IsActionPressed("ButtonA") && !_isScreensaverActive)
34+
35+
if (!(@event is not InputEventJoypadButton and not InputEventKey and not InputEventJoypadMotion))
3736
{
38-
GetTree().ChangeSceneToFile( _buttonSceneMap[_gameTurnTable.GetCurrentSelection()]);
37+
if (_isScreensaverActive)
38+
{
39+
_isScreensaverActive = false;
40+
_audioStreamPlayer.Play();
41+
_screensaverNode.Visible = false;
42+
}
43+
_timer.Start();
3944
}
4045

41-
if (@event is not InputEventJoypadButton and not InputEventKey and not InputEventJoypadMotion)
46+
if (@event.IsActionPressed("ButtonA") && !_isScreensaverActive)
4247
{
43-
return; // These are the only events that should reset the screensaver. Doing this bc I think the touch screen is causing issues
48+
GetTree().ChangeSceneToFile( _buttonSceneMap[_gameTurnTable.GetCurrentSelection()]);
4449
}
4550

4651
if (@event.IsActionPressed("Mute")) //Non-reversible, mainly to not go insane while testing.
4752
{
4853
AudioServer.SetBusMute(AudioServer.GetBusIndex("Master"), true);
4954
}
5055

51-
if (_isScreensaverActive)
52-
{
53-
_isScreensaverActive = false;
54-
_audioStreamPlayer.Play();
55-
_screensaverNode.Visible = false;
56-
}
57-
5856
}
5957

6058
private void _startScreensaver()

0 commit comments

Comments
 (0)