r23019 : Game Log Console Rennovations

r23019 Game Log Console efficiency & UI updates
As a new MTG player, I find the game log console in Forge very useful as a learning tool. Well, if not for a few irritating quirks...
The game log console is a essentially a list of JTextArea components. Prior to r23019, every time a new log entry was generated the existing list of JTextAreas would be destroyed, rebuilt from scratch, resized and displayed. To see how inefficient this is try running an AI vs AI Constructed game - you will have trouble following the log since it will blank out intermittently, the scroll-bar will jump all over the place as it tries to keep up and following a specific entry is nigh on impossible because it does not stay in the same colored banding/zebra row.
As of r23019, this code has been completely rewritten, so that now new log entries are simply added to the existing list - no rebuilding necessary. Again if you run an AI vs Ai game you should notice the difference.
Changes
Cheers,
Steve
As a new MTG player, I find the game log console in Forge very useful as a learning tool. Well, if not for a few irritating quirks...
The game log console is a essentially a list of JTextArea components. Prior to r23019, every time a new log entry was generated the existing list of JTextAreas would be destroyed, rebuilt from scratch, resized and displayed. To see how inefficient this is try running an AI vs AI Constructed game - you will have trouble following the log since it will blank out intermittently, the scroll-bar will jump all over the place as it tries to keep up and following a specific entry is nigh on impossible because it does not stay in the same colored banding/zebra row.
As of r23019, this code has been completely rewritten, so that now new log entries are simply added to the existing list - no rebuilding necessary. Again if you run an AI vs Ai game you should notice the difference.
Changes
- much more efficient process behind the scenes used to update the log console.
- The scrollbar is not permanently displayed anymore so there is more space available. If a scrollbar is required you will notice that the mouse pointer will change to a "hand" when hovering over the log console to indicate that something will happen if the mouse button is clicked. In this case, it will toggle the visibility of the scrollbar.
- Previously, when new log entries were added, the list did not always update properly so that these new entries were not visible without having to manually move the scrollbar yourself. This should now be fixed. As before, new log entries are added to the bottom of the list.
- A Log entry now stays within the same colored band. Unlike the previous version, this results in a much better sense of the list scrolling up as new entries are added.
- Slight adjustment to the colorings to improve contrast.
Cheers,
Steve