It is currently 10 Sep 2025, 11:34
   
Text Size

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

Post MTG Forge Related Programming Questions Here

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

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

Postby Doublestrike » 02 Oct 2011, 11:58

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.
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

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

Postby Sloth » 02 Oct 2011, 14:02

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?
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

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

Postby slapshot5 » 02 Oct 2011, 15:58

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
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

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

Postby Jaedayr » 02 Oct 2011, 19:16

Just started playing with this, and am posting my findings on the bugz tracker.
Jaedayr
Tester
 
Posts: 523
Joined: 08 Jul 2010, 00:06
Has thanked: 16 times
Been thanked: 13 times

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

Postby Hellfish » 02 Oct 2011, 21:27

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)
Last edited by Hellfish on 02 Oct 2011, 21:48, edited 1 time in total.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

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

Postby Max mtg » 02 Oct 2011, 21:44

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.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

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

Postby Doublestrike » 03 Oct 2011, 03:28

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 :)
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

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

Postby friarsol » 03 Oct 2011, 03:35

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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

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

Postby slapshot5 » 03 Oct 2011, 03:48

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
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

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

Postby Doublestrike » 03 Oct 2011, 03:52

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...
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

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

Postby slapshot5 » 03 Oct 2011, 03:55

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
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

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

Postby Doublestrike » 03 Oct 2011, 04:38

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.
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

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

Postby slapshot5 » 03 Oct 2011, 04:48

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?
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

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

Postby slapshot5 » 03 Oct 2011, 05:17

Ok, I tried HEAD_HEIGHT = 150; on Windows and it looks fine. I will commit with a comment.

-slapshot5
slapshot5
Programmer
 
Posts: 1391
Joined: 03 Jan 2010, 17:47
Location: Mac OS X
Has thanked: 25 times
Been thanked: 68 times

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

Postby Sloth » 03 Oct 2011, 06:47

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.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 23 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 23 users online :: 0 registered, 0 hidden and 23 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 23 guests

Login Form