It is currently 12 Sep 2025, 11:45
   
Text Size

r23019 : Game Log Console Rennovations

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

r23019 : Game Log Console Rennovations

Postby spr » 25 Aug 2013, 20:25

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
  • 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
User avatar
spr
 
Posts: 213
Joined: 06 Jul 2013, 19:31
Has thanked: 28 times
Been thanked: 60 times

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 16 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 16 users online :: 0 registered, 0 hidden and 16 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 16 guests

Login Form