Skip to content

Commit

Permalink
use ShowingPopup instead of Visible on PopupOverlay class
Browse files Browse the repository at this point in the history
  • Loading branch information
pcen committed Sep 17, 2023
1 parent 8d4552b commit 83dfffb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion C7/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public override void _UnhandledInput(InputEvent @event) {

// Handle Godot keybind actions
private void processActions() {
if (Input.IsActionJustPressed(C7Action.Escape) && popupOverlay.Visible) {
if (Input.IsActionJustPressed(C7Action.Escape) && popupOverlay.ShowingPopup) {
popupOverlay.OnHidePopup();
return;
}
Expand Down
2 changes: 1 addition & 1 deletion C7/UIElements/Popups/PopupOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void OnHidePopup()
Hide();
}

public bool ShowingPopup() => currentChild is not null;
public bool ShowingPopup => currentChild is not null;

public void PlaySound(AudioStreamWav wav)
{
Expand Down

0 comments on commit 83dfffb

Please sign in to comment.