Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent mouse interactions with map and other UI elements when popup is open #447

Merged
merged 3 commits into from
Sep 30, 2024

Conversation

pcen
Copy link
Contributor

@pcen pcen commented Sep 29, 2024

Fixes the issue with popups described in #441. Also adjusts the spacing of the "ENTER or SPACEBAR for next turn" so it doesn't start too close to left edge.

@pcen pcen changed the base branch from Development to godot4 September 29, 2024 21:03
@pcen pcen requested a review from WildWeazel September 29, 2024 21:03
@@ -64,6 +88,18 @@ public void ShowPopup(Popup child, PopupCategory category)
log.Error("Invalid popup category");
}
AudioStreamWav wav = Util.LoadWAVFromDisk(Util.Civ3MediaPath(soundFile));

// 1. prevent mouse interaction with non-UI elements (ie. the map)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long term, need to learn how to use Godot UI properly. Couldn't find a more idiomatic solution on line for this particular problem though.

Short term, I plan to decouple UI from game logic as much as possible. This is kinda a prerequisite for decoupling game from server so that someday we could implement multiplayer.

@pcen pcen merged commit 621eac8 into godot4 Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant