It is currently 24 Apr 2024, 00:02
   
Text Size

LogBookViewer update

Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins

LogBookViewer update

Postby Lodici » 31 Oct 2013, 12:44

Changes pushed to clone at https://bitbucket.org/lodici/magarena.

screenshot.png

UI Notes
  • I have added an F11 fullscreen option to the View menu. This was primarily for testing but it might be a useful option in itself. It works on Windows 7, it works in Linux Zorin but I had to change the properties of the task bar so that it was not always on top. On Mac OSX I was unable to get proper full screen. Still, even an option that works on most OSes might be better than no option at all.
  • The log message format has not been touched - it still needs to be optimized so that there is more horizontal room for the message content. For example, the health value can be displayed below the health icon instead off to the side. The Turn info on the RHS could be displayed on a single top line. Use plain font instead of bold for message content?
  • Removed logBookButton (Redundant) and textViewButton (available via View menu).
    TODO
  • Add option to hide (roll-up) log viewer.
  • Add option to hide log scroll bar.
  • Save position of splitter divider between sessions.

Tech Notes
  • Updated GamePanel to use layout manager (MigLayout) instead of absolute positioning (setLayout(null)). It has been split into two columns where the LHS JPanel is under the control of MigLayout whilst the RHS JPanel (the battlefield) retains no layout as before (absolute positioning).
  • The general consensus online seems to be that null layouts should be avoided at all costs and are more trouble than they are worth. A layout manager is much more adaptable to different platforms and resolutions.
  • Removed quite a lot of redundant code from DefaultResolutionProfile now that LHS of GamePanel uses a layout manager instead of absolute positioning.

Quite a lot of changes so will need some testing.

- Lodici
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: LogBookViewer update

Postby melvin » 31 Oct 2013, 13:26

@lodici: Great stuff, merged and push to the main repo. Fullscreen mode is awesome!

Switching to MigLayout is definitely the way to do, glad to see that it resulted in much code savings.

Regarding the splitter, I'm wondering if we could have something dynamic instead of a fixed position, by having the log portion takes up whatever space left over from the stack, so when the stack grows the log shrinks and vice-versa. If the title bar for "Stack" and "Log" are moved to be in the middle, they can acting as the separator between the two regions.

Another change that might help this is to have the log be in chronological order instead of the current reverse chronological order, i.e. newer items appearing below and pushing the older items up. The nice thing is that as items are popped of the top of the stack, they "cross" the separator and appear at the bottom of the log, meaning there is less distance for your eye to travel as you follow the resolution of an effect on the stack.

It is great to see new UI work on the project. I'm excited what we're finally able to address issue number 1 https://code.google.com/p/magarena/issues/detail?id=1 :D
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: LogBookViewer update

Postby melvin » 31 Oct 2013, 14:47

The hourly build is almost done, 31mins left as of time of this post. If you'd like to check out/test the new UI, you can download the current development version of 1.44 from https://buildhive.cloudbees.com/job/mel ... arena/554/

Note that due to massive changes in the card scripting engine, the current 1.43 scripts are not compatible with the new Magarena.exe. To try out the 1.44 hourly build, you'll have to use one of the 1.44 zip from the above page.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: LogBookViewer update

Postby Lodici » 31 Oct 2013, 16:17

melvin wrote:Regarding the splitter, I'm wondering if we could have something dynamic instead of a fixed position, by having the log portion takes up whatever space left over from the stack, so when the stack grows the log shrinks and vice-versa. If the title bar for "Stack" and "Log" are moved to be in the middle, they can acting as the separator between the two regions.
That would be quite interesting - I will take a look.

melvin wrote:Another change that might help this is to have the log be in chronological order instead of the current reverse chronological order, i.e. newer items appearing below and pushing the older items up. The nice thing is that as items are popped of the top of the stack, they "cross" the separator and appear at the bottom of the log, meaning there is less distance for your eye to travel as you follow the resolution of an effect on the stack.
Consider it added to my TODO list.

melvin wrote:The hourly build is almost done, 31mins left as of time of this post. If you'd like to check out/test the new UI, you can download the current development version of 1.44 from https://buildhive.cloudbees.com/job/mel ... arena/554/
I noticed that changes I made to .hgignore are also included - not sure if that might be a problem.

- Lodici
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: LogBookViewer update

Postby melvin » 01 Nov 2013, 06:44

Lodici wrote:I noticed that changes I made to .hgignore are also included - not sure if that might be a problem.
Not a problem, I looked through it briefly and it doesn't affect my setup. Some of it is useful such as excluding the automatically downloaded libs in release/lib.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: LogBookViewer update

Postby Lodici » 02 Nov 2013, 09:12

Pushed to https://bitbucket.org/lodici/magarena.

Added a couple of options for log viewer which can be accessed via a new icon on the RHS of the log titlebar.
- Toggle scrollbar visibility.
- Option to determine whether a new message is added to the top or bottom of the list.

- Lodici
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: LogBookViewer update

Postby melvin » 02 Nov 2013, 09:40

I like the way how the configuration is easily accessible with the new icon.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: LogBookViewer update

Postby Lodici » 08 Nov 2013, 16:12

Pushed to https://bitbucket.org/lodici/magarena.

Based on @melvin's excellent suggestion...
The manual splitting of the Log and Stack is now no more. Instead it now automatically resizes. The Log will fill all space not taken up by the Stack. As new items are added to the Stack it will grow and the Log will contract. This is designed for a downward growing log since the top item on the stack will be added to the bottom row of the log.

I have also added an option to the TexturedPanel that will display a semi-transparent background and have applied these to the Log/Stack viewer and Game console. This makes the text much easier to read regardless of the theme whereas before certain themes were using a textured background (eg. blackswamp) that swamped (sorry!) the foreground text.

- Lodici
Attachments
screenshot.png
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: LogBookViewer update

Postby melvin » 09 Nov 2013, 13:43

Looks great! With all of these improvements, I'm updating https://code.google.com/p/magarena/issues/detail?id=1 as resolved.
User avatar
melvin
AI Programmer
 
Posts: 1062
Joined: 21 Mar 2010, 12:26
Location: Singapore
Has thanked: 36 times
Been thanked: 459 times

Re: LogBookViewer update

Postby Huggybaby » 09 Nov 2013, 14:58

Hmm, I should read the project pages I guess, because almost none of those complaints make any sense.
I turn off "Skip single option choices" "Always pass" and, "Remove unusual target choices". Then I never miss anything. And using the keyboard to skip to the next phase is lightning quick and hardly inconvenient.
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 701 times
Been thanked: 594 times

Re: LogBookViewer update

Postby Lodici » 09 Nov 2013, 16:03

Any objections if I remove the "Add new message to top" from the Log menu and make the log direction fixed (ie. new messages are always added to the bottom)?
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: LogBookViewer update

Postby Huggybaby » 09 Nov 2013, 16:51

More options are better aren't they?
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 701 times
Been thanked: 594 times

Re: LogBookViewer update

Postby Lodici » 09 Nov 2013, 18:44

Only if they are useful. Bear in mind only users of the snapshot/daily build would be aware of this option anyway. Including an option just because you can does not necessarily mean you should especially if the option was not requested or expected in the first place.

The latest update to the Log/Stack viewer is designed based on the following suggestion ...
melvin wrote:Another change that might help this is to have the log be in chronological order instead of the current reverse chronological order, i.e. newer items appearing below and pushing the older items up. The nice thing is that as items are popped of the top of the stack, they "cross" the separator and appear at the bottom of the log, meaning there is less distance for your eye to travel as you follow the resolution of an effect on the stack.

My view is that for the next release the order should not be optional so as optimize the area of effect mentioned above. Obviously, if there is a load of feedback to the contrary then the option can be restored.

It also means I can make the code a bit simpler.
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Re: LogBookViewer update

Postby Huggybaby » 09 Nov 2013, 19:48

Well, I have no idea how many people would view the log from top to bottom, or vice versa. That's what testing and feedback are for, and as you said almost no one has had a chance to try the option. I suspect most people would prefer new items on the bottom, but I don't know.
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 701 times
Been thanked: 594 times

Re: LogBookViewer update

Postby Lodici » 09 Nov 2013, 22:33

Since the default behaviour is to add to the bottom of the list then I guess there is no harm in leaving the option.

@melvin I have published some new updates. Do I need to notify you each time I publish or are you able to detect when my clone has been updated?
User avatar
Lodici
Programmer
 
Posts: 399
Joined: 13 Oct 2013, 09:44
Has thanked: 29 times
Been thanked: 71 times

Next

Return to Magarena

Who is online

Users browsing this forum: No registered users and 16 guests

cron

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 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 16 guests

Login Form