cursor442 / AATracker

Game tracker for Axis and Allies Global 1940
GNU General Public License v3.0
0 stars 0 forks source link

New log screen tab not immediately drawn #100

Closed cursor442 closed 7 months ago

cursor442 commented 1 year ago

The function to add a new tab to the log screen tab bar does not trigger a redraw on its own. It must wait for the next drawing call from another source.

cursor442 commented 12 months ago

Creating a new game after adding enough to the log to add a new page leaves the extra tab up, which then crashes the game when clicked.

cursor442 commented 12 months ago

Tab for new page is now drawn but main tab bar disappears when it is added. Extra tab still persists after new game.

cursor442 commented 7 months ago

Main tab bar still works even though it is invisible. Extra tab is gone after new game but Page 1 tab is only one character wide.

cursor442 commented 7 months ago

Main tab bar no longer hidden. Would be better to not redraw it every time the log tab bar is used but that can be dealt with in the future.

cursor442 commented 7 months ago

Custom text button also disappears when switching between tabs. What's strange is that the text width bounds for the Page 1 tab are set to 0 when making a new game (but of course not when making the original game) but all tabs after it are calculated correctly.

cursor442 commented 7 months ago

Switching to the nation screen before making the new game results in a crash when switching back to the log screen.

cursor442 commented 7 months ago

Crash is resolved. Log class should report that there is a new page upon the start of a new game. The next page number variable was uninitialized otherwise.

cursor442 commented 7 months ago

The log screen bar wasn't being deleted when there was only one page, just when there were multiple pages. The tab width was of course fine when the tab bar wasn't deleted. Try only fully deleting the tab bar when exiting the application and just delete tabs after tab 1 when calling destroyLogScreen to create a new game or load a game.

cursor442 commented 7 months ago

Deleting all tabs aside from the first seems to work ok. No random crashes in the couple tests either, may have resolved some uninitialized graphics pointer issue in the process. Just fix custom text button disappearing the close the issue.

cursor442 commented 7 months ago

Just force the hide screen for now. Can undo later when updating log screen to the class-based structure.