Julius: In-game Menus and Alt-Tab

Created on 31 Jan 2019  路  7Comments  路  Source: bvschaik/julius

The following applies to these menus:

  • Load Game
  • Save Game
  • Delete Game
  • Quit Game
  • Replay Map (also "review your assignment")
  • Display Settings
  • Sound Settings
  • Speed Settings
  • Difficulty Settings

If you pull up any of these menus, then alt+tab, then return to game they whole background screen is black. This issue self-corrects after leaving the menu. I would just ignore this, but there are some menus and windows for which this does not happen such as Help and About. I figured there's a chance it's an easy fix.

Also, if you get an in-game message with a video, then alt-tab. The video box is blank upon returning to game. Normally there is a final still image that remains displayed.

All of these are very minor in my opinion. If it takes more than a few minutes of poking around, or it's a strange beast to fix, just go ahead and dismiss this ticket.

Most helpful comment

I'll check this out just for fun and change things or at leastreport my findings.

The "video disappears" bug also happens in the original game, and since an external library is used to render the videos I'm not sure that can be easily fixed.

All 7 comments

I'll check this out just for fun and change things or at leastreport my findings.

The "video disappears" bug also happens in the original game, and since an external library is used to render the videos I'm not sure that can be easily fixed.

I didn't realize the final image disappeared in the original game - fair enough.

I'll say again, these are small details. If it's not a simple fix then it may not be worth it.

@crudelios I don't think you can fix this easily. All dialogs only draw the part of the screen that they're using, leaving the unused buffer area as they found it. This works fine when you stay in game, but if the buffer is re-created due to a screen resize, it's set to black and then only the used portion is drawn. On macOS, the buffer doesn't blank out when alt-tabbing to other windows though, does it on Windows?

One possible solution is to call window_city_draw_all() in the draw_background function of the dialogs that exhibit this behaviour, but that means those dialogs are now tied to the city screen. That's not an option for the file dialog (load/save/delete game) or the confirmation dialog (exit game), since they're also used elsewhere.

In Windows, most of them blank out, but the "Help" window and "About" window do not. I haven't looked at that part of the code, but perhaps there is something different about those.

@bvschaik I have the feeling you're right, it can't be properly done without major refactoring to the windowing code...

Sounds good, at least it's documented for future observers.

@jdmillard The help and about dialogs both lead to window/message_dialog.c, which does a window_city_draw_all() when drawing the dialog background. So that dialog actively renders the city before drawing itself, that's why it's ok in those screens.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ennioVisco picture ennioVisco  路  4Comments

jfkonecn picture jfkonecn  路  5Comments

giggietto picture giggietto  路  8Comments

jonathanmcnamee picture jonathanmcnamee  路  3Comments

ArtySh0ck picture ArtySh0ck  路  3Comments