UI improvements, round 1: WinLose UI streamlined (r10855)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
44 posts
• Page 1 of 3 • 1, 2, 3
UI improvements, round 1: WinLose UI streamlined (r10855)
by 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.
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.
A joke is a very serious thing.
-
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
by 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?
-
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
by 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
- 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
by Jaedayr » 02 Oct 2011, 19:16
Just started playing with this, and am posting my findings on the bugz tracker.
Re: UI improvements, round 1: WinLose UI streamlined (r10855
by 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)
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
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
-
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
by 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.
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
by Doublestrike » 03 Oct 2011, 03:28
Thanks for the feedback, will start from the beginning:
(could someone post one
)
======
As usual, at work now, will get started with fixes in...6 hours...tick tick tick
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.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?
Hmmm...OK, strange, will investigate and fix.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.
Will fix this. I don't have a good fantasy quest built up for testingI'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


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.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.
Will investigate and fix, thanks.Also, even though I won the match I lost 15 credits.(Clicked quit in the booster report screen, Continue was greyed out)
Cheers!That is very good! The idea is right how I imageined it to be.
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.However, colors and borders are unpretty now - they need some artistic improvement.
OK will fix.credits are not given (that base sum + bonuses for alternative or fast kill)
Will change the word. Choice (temporarily?) removed, waiting for opinion.booster selection is inaccurate (modern/legacy.. etc are not sets, they are formats) choice is missing...
======
As usual, at work now, will get started with fixes in...6 hours...tick tick tick

---
A joke is a very serious thing.
A joke is a very serious thing.
-
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
by friarsol » 03 Oct 2011, 03:35
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.Doublestrike wrote: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.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.
- 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
by slapshot5 » 03 Oct 2011, 03:48
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 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
-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
by Doublestrike » 03 Oct 2011, 03:52
Ack I hope not!Is there OS-specific code in here somewhere? Haven't tested *nix.

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...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.
---
A joke is a very serious thing.
A joke is a very serious thing.
-
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
by slapshot5 » 03 Oct 2011, 03:55
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.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...
-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
by Doublestrike » 03 Oct 2011, 04:38
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.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.
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.
A joke is a very serious thing.
-
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
by slapshot5 » 03 Oct 2011, 04:48
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 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
-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
by 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
- 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
by Sloth » 03 Oct 2011, 06:47
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.friarsol wrote: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.Doublestrike wrote: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.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.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
44 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 108 guests