UI Improvements, Round 2: Match UI
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: UI Improvements, Round 2: match UI
by Doublestrike » 29 Nov 2011, 04:31
Thanks Slowe, I'll attack that problem first.
In the old UI, there are new JFrames (new windows) being called every time the state of the game changes. In the old UI, one JFrame handles everything. So, there's hiccups when the program is expecting a new JFrame but gets given something else.
As to the other issues, they're fairly easy I think and will be resolved soon-ish.
In the old UI, there are new JFrames (new windows) being called every time the state of the game changes. In the old UI, one JFrame handles everything. So, there's hiccups when the program is expecting a new JFrame but gets given something else.
As to the other issues, they're fairly easy I think and will be resolved soon-ish.
Last edited by Doublestrike on 29 Nov 2011, 04:36, edited 1 time in total.
---
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 2: match UI
by Doublestrike » 29 Nov 2011, 04:33
Just noticed this comment. Actually had fixed this and went to commit the change, when the server died. Unfortunate timing. Now it has to wait until I get home.Forge terminates completely and silently
---
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 2: match UI
by friarsol » 29 Nov 2011, 04:35
I see that the Combat tab auto-switches when Combat is started. But it doesn't seem to switch back to the Stack tab after Combat ends.
Doublestrike, what stuff needs to be updated with the passing priority? I can try to squeeze an hour of time in one of these evenings to add something for this.
Doublestrike, what stuff needs to be updated with the passing priority? I can try to squeeze an hour of time in one of these evenings to add something for this.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI Improvements, Round 2: match UI
by Doublestrike » 29 Nov 2011, 04:38
@friarsol - cheers. There's a commented section in ControlDock.java that says something like "force end of turn isn't implemented yet, waiting for a code guru to fix". If you search "code guru" you'll probably find it. It's inside a keyPressed method.
Then, it's just a matter of grabbing the input controller (from AllZone I think) and tickling it the right way. (sorry I don't have the code in front of me)
---------
If it's a new passing priority button, then there's three places to add it: an icon in the skin (FSkin.java), a button in the dock (ViewDock.java), and an action in the controller (ControlDock.java).
Then, it's just a matter of grabbing the input controller (from AllZone I think) and tickling it the right way. (sorry I don't have the code in front of me)
---------
If it's a new passing priority button, then there's three places to add it: an icon in the skin (FSkin.java), a button in the dock (ViewDock.java), and an action in the controller (ControlDock.java).
---
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 2: match UI
by friarsol » 29 Nov 2011, 04:44
What's the intention here? To pass priority until the turn ends or something hits the stack?
Edit: Nope nothing about buttons. Although it'd be nice to have a Skip to Step/Phase X attached to a bunch of F-keys/Keyboard shortcuts. I can write a function generic enough to accept the phase to skip to, and pass priority until its reached or the Stack is non-empty.
Edit: Nope nothing about buttons. Although it'd be nice to have a Skip to Step/Phase X attached to a bunch of F-keys/Keyboard shortcuts. I can write a function generic enough to accept the phase to skip to, and pass priority until its reached or the Stack is non-empty.
Last edited by friarsol on 29 Nov 2011, 04:47, edited 1 time in total.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI Improvements, Round 2: match UI
by Doublestrike » 29 Nov 2011, 04:47
The button in place now is there to skip all phases in the current turn and move to the next turn.
Not entirely sure about the pass priority, here's what Hellfish asked:
Not entirely sure about the pass priority, here's what Hellfish asked:
Hellfish wrote:A customizable "Pass Priority" hotkey would be nice. I know of Space/Enter of course but you know, options!
---
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 2: match UI
by Doublestrike » 29 Nov 2011, 04:48
Hellfish, can you post your Burning Impotence deck so I can test with it.Hellfish wrote:Clicking my flashback button doesn't do anything, even with flashback cards in the grave.Makes my Burning Vengeance deck kinda impotent.
(but seriously, can you post it)
---
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 2: match UI
by friarsol » 29 Nov 2011, 04:51
Yep, that's basically what I was thinking. I'll write the function so you'll have to pass in the Phase.Doublestrike wrote:The button in place now is there to skip all phases in the current turn and move to the next turn.
Not entirely sure about the pass priority, here's what Hellfish asked:Hellfish wrote:A customizable "Pass Priority" hotkey would be nice. I know of Space/Enter of course but you know, options!
passPriorityThrough(Phase phase)
And then for each phase you can just call that from the different keyboard shortcut.
For the existing endTurn() it'll be like this:
passPriorityThrough(Phase.EndOfTurn)
The name of the function might change before I get a chance to actually write it.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI Improvements, Round 2: match UI
by Doublestrike » 29 Nov 2011, 04:52
OK, and it's easy-ish to implement...if you get that far, three files, this time : include a preference in ForgePreferences, add a keybord shortcut edit in ViewDock, and an action in ControlDock. Otherwise, same as usual - it's on the list.friarsol wrote:Although it'd be nice to have a Skip to Step/Phase X attached to a bunch of F-keys/Keyboard shortcuts.
update
No worries, will probably take several days to get around to it, particularly with these big requests in the pipeline (resizing panels, animations, etc.)The name of the function might change before I get a chance to actually write it.
---
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 2: match UI
by friarsol » 29 Nov 2011, 04:56
Yea if I can find the time I'll add the hooks, and then it'll be a fairly straightforward addition for you (or someone else who is motivated)Doublestrike wrote:OK, and it's easy-ish to implement...if you get that far, three files, this time : include a preference in ForgePreferences, add a keybord shortcut edit in ViewDock, and an action in ControlDock. Otherwise, same as usual - it's on the list.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: UI Improvements, Round 2: match UI
by Doublestrike » 29 Nov 2011, 04:59
Cool beans man that'll be great! It'll happen at some point, the ball is rolling.
I'm not getting much work done here at Work - jonesin' to go home and Forge it up.
I'm not getting much work done here at Work - jonesin' to go home and Forge it 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 2: match UI
by slapshot5 » 29 Nov 2011, 06:12
I have fixed this in SVN.slapshot5 wrote:1. Combat text needs same treatment as Stack text (white, etc…)
-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 2: match UI
by Doublestrike » 29 Nov 2011, 06:27
Actually, the vertical space under the life and above the phase indicators is reserved for player keywords. Which reminds me, an observer needs to be added for player keyword changes - the Swing code is in place, but the observer control is not. That's probably got to be finished first, then we can see how much room is left for extra phase indicators.slowe wrote:The phase indicator and stop setter is great, but it doesn't list all of the phases, most notably the main phases. There's enough room (with some vertical expansion) to list all the phases, and there's no reason not to.
Obviously, the current phase indicators show the same phases available in the old UI.
---
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 2: match UI
by slapshot5 » 29 Nov 2011, 06:36
I know a way to fix this, but I'm not sure if it's what is intended by the new UI or not. In ViewTopLevel.java, the uncommented line needs to be added to this method:Hellfish wrote:[*]When viewing the graveyard or exile, the detail or image view does not update to show the card. (In fact, when any card list is presented, the detail or image view does not update)
- Code: Select all
/**
* Required by display interface. Due to be deprecated: already handled by
* controller class.
*
* @param card
*   a card
*/
@Override
public final void setCard(final Card card) {
this.getCardviewerController().showCard(card);
//System.err.println("ViewTopLevel > getCard: Something should happen here!");
//new Exception().printStackTrace();
}
-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 2: match UI
by Sloth » 29 Nov 2011, 06:40
Player keywords are pretty rare and have almost always a source on the battlefield (True Believer for example). I think the player details to the right are enough to check them. No need to reserve valueable space here.Doublestrike wrote:Actually, the vertical space under the life and above the phase indicators is reserved for player keywords. Which reminds me, an observer needs to be added for player keyword changes - the Swing code is in place, but the observer control is not. That's probably got to be finished first, then we can see how much room is left for extra phase indicators.
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Who is online
Users browsing this forum: No registered users and 15 guests