Minigame UI Structuring #4

Open
opened 2023-08-05 05:39:26 +00:00 by conco · 0 comments
Owner

The minigame framework should have an easy way for adding/removing some root HUD element and removing it on minigame initialize/cleanup. Minigames can always modify the UI more than that/use world panels, but this could be a nice way for simple UIs to be added and auto cleaned

Initial thoughts:

  • Add a 'MinigamePanel', extending 'Panel' and taking in a 'Minigame' for it's constructor
  • Add a MinigamePanel property to our root HUD that gets rendered if not null
  • Add a property (or function) to minigames allowing the manager to fetch a panel for them (if it exists)
  • On initializing a minigame, the manager should go through the players, and update each player's root hud to include the MinigamePanel for that minigame if it exists
  • On ending a minigame, the cleanup players function would clear this property from all player's huds
The minigame framework should have an easy way for adding/removing some root HUD element and removing it on minigame initialize/cleanup. Minigames can always modify the UI more than that/use world panels, but this could be a nice way for simple UIs to be added and auto cleaned Initial thoughts: * Add a 'MinigamePanel', extending 'Panel' and taking in a 'Minigame' for it's constructor * Add a MinigamePanel property to our root HUD that gets rendered if not null * Add a property (or function) to minigames allowing the manager to fetch a panel for them (if it exists) * On initializing a minigame, the manager should go through the players, and update each player's root hud to include the MinigamePanel for that minigame if it exists * On ending a minigame, the cleanup players function would clear this property from all player's huds
conco added the enhancement label 2023-08-05 05:39:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TeamLucker/LuckerGame#4