It is currently 01 Nov 2025, 17:41
   
Text Size

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

Postby 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.
Last edited by Doublestrike on 29 Nov 2011, 04:36, edited 1 time in total.
---
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 2: match UI

Postby Doublestrike » 29 Nov 2011, 04:33

Forge terminates completely and silently
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.
---
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 2: match UI

Postby 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.
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

Postby 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).
---
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 2: match UI

Postby 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.
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

Postby 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:

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.
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 2: match UI

Postby Doublestrike » 29 Nov 2011, 04:48

Hellfish wrote:Clicking my flashback button doesn't do anything, even with flashback cards in the grave.Makes my Burning Vengeance deck kinda impotent.
Hellfish, can you post your Burning Impotence deck so I can test with it.

:mrgreen:

(but seriously, can you post it)
---
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 2: match UI

Postby friarsol » 29 Nov 2011, 04:51

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!
Yep, that's basically what I was thinking. I'll write the function so you'll have to pass in the Phase.

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

Postby Doublestrike » 29 Nov 2011, 04:52

friarsol wrote:Although it'd be nice to have a Skip to Step/Phase X attached to a bunch of F-keys/Keyboard shortcuts.
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. :)

update
The name of the function might change before I get a chance to actually write it.
No worries, will probably take several days to get around to it, particularly with these big requests in the pipeline (resizing panels, animations, etc.)
---
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 2: match UI

Postby friarsol » 29 Nov 2011, 04:56

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. :)
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)
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

Postby 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. :cry:
---
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 2: match UI

Postby slapshot5 » 29 Nov 2011, 06:12

slapshot5 wrote:1. Combat text needs same treatment as Stack text (white, etc…)
I have fixed this in SVN.

-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

Postby Doublestrike » 29 Nov 2011, 06:27

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.
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.

Obviously, the current phase indicators show the same phases available in the old UI.
---
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 2: match UI

Postby slapshot5 » 29 Nov 2011, 06:36

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)
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:

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();
    }
Doublestrike, was this what you had in mind, or is there a different short-term solution? (Or, maybe, what is the long-term solution for this?)

-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

Postby Sloth » 29 Nov 2011, 06:40

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

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 15 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 15 users online :: 0 registered, 0 hidden and 15 guests (based on users active over the past 10 minutes)
Most users ever online was 9298 on 10 Oct 2025, 12:54

Users browsing this forum: No registered users and 15 guests

Login Form