wesnoth / wesnoth

An open source, turn-based strategy game with a high fantasy theme.
https://www.wesnoth.org/
GNU General Public License v2.0
5.54k stars 1.02k forks source link

[UtBS] In S9, Replace the "x turns remain to free x merfolk" popup message with UI counter elements #6934

Open max-torch opened 2 years ago

max-torch commented 2 years ago

Describe the desired feature

Existing design

The current implementation of how the player is given information on the remaining merfolk and the remaining time is this: image This message pops up every start of a new turn for a finite amount of time and then disappears.

Proposal

Add UI elements, just for this scenario, that show the information, and get rid of the popup message, and add a note or dialog somewhere to let the player know about the UI elements. Mockup below: image In the top right of the map you have the UI elements keeping track of remaining turns of the sub objective and the remaining merfolk.

EDIT: Another possible option is to have a small, persistent sentence that says "x turns remain to free x merfolk" that exists at a corner that uses the same component that is being used for the recently added Tutorial text that is displayed at the top left of the map. Then have the sentence update each turn. That way we don't have to design a whole new UI element.

CelticMinstrel commented 2 years ago

Another possible option is to have a small, persistent sentence that says "x turns remain to free x merfolk" that exists at a corner that uses the same component that is being used for the recently added Tutorial text that is displayed at the top left of the map. Then have the sentence update each turn. That way we don't have to design a whole new UI element.

This can easily be done using the new floating label API.

Your mockup however is much trickier. In theory it can be done with a modeless GUI2 dialog. However, there is no Lua API for that, because modeless GUI2 dialogs (last I checked) break the game entirely if shown onscreen above the map. It's possible that's no longer the case with the recent refactors, but since those were more geared towards rendering than event dispatching, it's also quite likely that it's still the case.

knyghtmare commented 2 years ago

do you want the indicator on the right-side of the game-map or the left? Or the centre?

max-torch commented 2 years ago

do you want the indicator on the right-side of the game-map or the left? Or the centre?

i would say top right