Latest Posts

Topic: Scenario message boxes which don't pause the game

kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 19:48
Posts: 2440
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-10-18, 12:25

As far i understand each scenario message box uses story_message_box.cc which pauses the game until the window get closed.

Now i want to have a message box which is shown only for a short time and closes automatically. It contains only a few words, so the need to let the player close the window isn't needed. Such a window should attend the story with some atmosphere. Say one would show a ship in a thunderstorm and the corresponding message box shows "... ARGGHHH ..." or similar. It would be annoying if the player is forced to close this window then.

Is there a possibility to archive this with lua?


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 17:07
Posts: 1954
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-10-18, 12:34

You could send a message to the player. Making that message a popup, and having your script delete the message and close the message window after some seconds might do the trick.

Making the window non-modal and non-game-pausing should also be possible but this would be some additional C++ implementation effort.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2020-10-19, 17:05

I just happen to have implemented these in https://github.com/widelands/widelands/pull/4369


Busy indexing nil values

Top Quote