Page 1 of 3

UI improvements, round 1: WinLose UI streamlined (r10855)

PostPosted: 02 Oct 2011, 11:58
by Doublestrike
The Win/Lose GUI has been reworked for usability, presentation, and encapsulation.

It now uses WinLoseFrame to show the default frame (view). Every layout is managed by MigLayout (two thumbs up, BTW, for that great tool). A class called "modeHandler" populates a center panel in the frame. There is a default mode handler class, and subclasses can be written as necessary for various modes of the game. Mode handlers can directly influence the view.

The first two mode handlers are the default (WinLoseModeHandler) and quest mode (QuestWinLoseHandler). All quest reward stuff is now encapsulated into QuestWinLoseHandler, for now. Later a model/view separation might be possible. I'd like a transparent dark overlay under the frame, but apparently this requires more libraries (booo).

If there's a significant problem, the old methods and classes should still work quickly and easily by uncommenting a single line in GameAction.

Deprecated files will be removed in a few days or a week, assuming no major issues arise. These files are: Gui_WinLose and QuestRewardsUtil.

Please post testing results here and I'll fix bugs as they come in.

Edit: Subclipse broke itself about a million times when I was trying to commit this, so I hope everything went up OK. It took me three hours of retries, and three revisions went by, to get the darn thing up.

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 02 Oct 2011, 14:02
by Sloth
The new default Win/Lose window looks very spartanic to me (no borders, dark blue buttons with black letters on a dark blue background). Is it supposed to be like that?

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 02 Oct 2011, 15:58
by slapshot5
Just playing normal matches, there is no way to quit. You only have Restart and Continue buttons. You can't get back to the main screen.

-slapshot5

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 02 Oct 2011, 19:16
by Jaedayr
Just started playing with this, and am posting my findings on the bugz tracker.

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 02 Oct 2011, 21:27
by Hellfish
I'll echo the reports that the quest "settings" (i.e. start at 15 life with a plant wall token) are only in effect in game 1 and add that I was not given the option to choose a format to pick the reward booster from as I should, but was simply handed a Legacy booster.

EDIT: Ran another match and got a Standard booster this time.Also, even though I won the match I lost 15 credits.(Clicked quit in the booster report screen, Continue was greyed out)

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 02 Oct 2011, 21:44
by Max mtg
That is very good! The idea is right how I imageined it to be.
However, colors and borders are unpretty now - they need some artistic improvement.

Bugs: credits are not given (that base sum + bonuses for alternative or fast kill), booster selection is inaccurate (modern/legacy.. etc are not sets, they are formats) choice is missing... and may be it's ok to take away the choice, but players will miss it.

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 03 Oct 2011, 03:28
by Doublestrike
Thanks for the feedback, will start from the beginning:

Sloth wrote:The new default Win/Lose window looks very spartanic to me (no borders, dark blue buttons with black letters on a dark blue background). Is it supposed to be like that?
Ideally, no. Later, when there's a look and feel defined for the entire UI, then it will look better. The dark blue background was mimic-ing the theme started in the splash screen. If moomarc could post the texture he used for that, I can put it in. Borders etc. will also be improved soon.

Just playing normal matches, there is no way to quit. You only have Restart and Continue buttons. You can't get back to the main screen.
Hmmm...OK, strange, will investigate and fix.

I'll echo the reports that the quest "settings" (i.e. start at 15 life with a plant wall token) are only in effect in game 1
Will fix this. I don't have a good fantasy quest built up for testing :( (could someone post one [-o< )

and add that I was not given the option to choose a format to pick the reward booster from as I should, but was simply handed a Legacy booster.
Yeah, I couldn't find a way to do that without a window, so I just forced a random pick. If people want the popup back, no worries, will fix. (Poll?) Personally, I think the constant choice is annoying, esp. since a booster happens almost every game, it's click city.

Also, even though I won the match I lost 15 credits.(Clicked quit in the booster report screen, Continue was greyed out)
Will investigate and fix, thanks.

That is very good! The idea is right how I imageined it to be.
Cheers!

However, colors and borders are unpretty now - they need some artistic improvement.
At this point I didn't feel it was worth putting a lot of work into that, since an LAF (or even a color scheme) hasn't been defined for this project (...right?). And see first reply above.

credits are not given (that base sum + bonuses for alternative or fast kill)
OK will fix.

booster selection is inaccurate (modern/legacy.. etc are not sets, they are formats) choice is missing...
Will change the word. Choice (temporarily?) removed, waiting for opinion.

======

As usual, at work now, will get started with fixes in...6 hours...tick tick tick :)

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 03 Oct 2011, 03:35
by friarsol
Doublestrike wrote:
and add that I was not given the option to choose a format to pick the reward booster from as I should, but was simply handed a Legacy booster.
Yeah, I couldn't find a way to do that without a window, so I just forced a random pick. If people want the popup back, no worries, will fix. (Poll?) Personally, I think the constant choice is annoying, esp. since a booster happens almost every game, it's click city.
Personally, it would be nice to choose this once and kept forever. Since I generally want a Legacy booster, and it is a bit annoying to scroll down to the bottom to select it each time.

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 03 Oct 2011, 03:48
by slapshot5
slapshot5 wrote:Just playing normal matches, there is no way to quit. You only have Restart and Continue buttons. You can't get back to the main screen.

-slapshot5
This appears to be OS-specific. I can repro on my Mac OS X Snow Leopard, but not on Windows XP. In Windows, Quit is the 3rd option. Is there OS-specific code in here somewhere? Haven't tested *nix.

-slapshot5

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 03 Oct 2011, 03:52
by Doublestrike
Is there OS-specific code in here somewhere? Haven't tested *nix.
Ack I hope not! :cry:

This appears to be OS-specific. I can repro on my Mac OS X Snow Leopard, but not on Windows XP. In Windows, Quit is the 3rd option.
Strange. They're just JButtons, added to the footer panel, same order every system, I would think. They're referred to by their field name, so...

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 03 Oct 2011, 03:55
by slapshot5
Doublestrike wrote:Strange. They're just JButtons, added to the footer panel, same order every system, I would think. They're referred to by their field name, so...
What code do I need to tweak to make this WinLose screen a lot bigger. I'll see if the button is just there hidden.

-slapshot5

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 03 Oct 2011, 04:38
by Doublestrike
slapshot5 wrote:What code do I need to tweak to make this WinLose screen a lot bigger. I'll see if the button is just there hidden.
In the WinLoseFrame contructor (I think) there's a few fields dictating the dimensions. HEAD_HEIGHT, FOOT_HEIGHT, FRAME_WIDTH_SMALL, FRAME_WIDTH_BIG. These should change those. The other vals are changed dynamically with MigLayout. This is the first time I've used MigLayout so there could be a keyword mistake or something, but I don't think that's the problem.

The button is called btnQuit (others are btnRestart and btnContinue). They're referenced in a modeHandler using the "view" object, e.g. view.btnQuit.

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 03 Oct 2011, 04:48
by slapshot5
slapshot5 wrote:What code do I need to tweak to make this WinLose screen a lot bigger. I'll see if the button is just there hidden.

-slapshot5
Well, unfortunately (or fortunately), this is exactly what's going on. I'll have to play with some numbers so we can find something that works and looks good on all platforms.

-slapshot5

Edit: How does int HEAD_HEIGHT = 150; look on Windows?

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 03 Oct 2011, 05:17
by slapshot5
Ok, I tried HEAD_HEIGHT = 150; on Windows and it looks fine. I will commit with a comment.

-slapshot5

Re: UI improvements, round 1: WinLose UI streamlined (r10855

PostPosted: 03 Oct 2011, 06:47
by Sloth
friarsol wrote:
Doublestrike wrote:
and add that I was not given the option to choose a format to pick the reward booster from as I should, but was simply handed a Legacy booster.
Yeah, I couldn't find a way to do that without a window, so I just forced a random pick. If people want the popup back, no worries, will fix. (Poll?) Personally, I think the constant choice is annoying, esp. since a booster happens almost every game, it's click city.
Personally, it would be nice to choose this once and kept forever. Since I generally want a Legacy booster, and it is a bit annoying to scroll down to the bottom to select it each time.
I would prefer selecting this each time (I think clicking for a reward won't annoy the users as much as other click orgies). Checkboxes that can be changed during a quest would also be fine.