It is currently 11 Sep 2025, 18:54
   
Text Size

UI update, prep for round 2: In-game UI feature requests

Post MTG Forge Related Programming Questions Here

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

Re: UI update, prep for round 2: In-game UI feature requests

Postby Chris H. » 08 Oct 2011, 13:12

slapshot5 wrote:I think we have a skinning problem on Mac OS X (Snow Leopard at least. Chris would have to check Lion). Here is what I see in the WinLoseFrame:

Screen shot 2011-10-08 at 5.04.35 AM.png


It looks fine for me on X11 running on FreeBSD. Haven't checked Windows, but I assume it looks fine there.

-slapshot5

Edit: I already fixed the sizing issue, but the problem I meant to describe was the lack of visible text or graphics on the buttons.
`
I see the same thing on Mac OS X Lion. At the end of now game it looked like a button had text inside of one of the buttons ... but the text was an almost white color on a white color background and was not very visible. But I may have been seeing things. :mrgreen:
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: UI update, prep for round 2: In-game UI feature requests

Postby Doublestrike » 08 Oct 2011, 13:16

I have gui.skin=default in forge.preferences, but it is still using the Yoda splash.
Thanks, fixed r11028. This is the fallout from

For some reason I couldn't upload the other fonts and images of the theme so it may not work right yet, but that problem will sort itself out soon enough.
There's something missing between my understanding of Subclipse and what Subclipse actually is doing. :?

Update Ahh, it's "Add to version control" that I was missing. That will clear up a few things! :oops:

=====

About the other issue, I don't have access to a Mac box so sorry can't help very much...but the error is apparently coming from FButton in forge.gui.skin. It can't find the resources defined in FSkin (also in forge.gui.skin)...
Last edited by Doublestrike on 08 Oct 2011, 13:17, 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 update, prep for round 2: In-game UI feature requests

Postby Chris H. » 08 Oct 2011, 13:17

On Mac OS X Lion the progress bar for the startup screen is not fully overlapping the image:

`
Attachments
Screen Shot.jpg
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: UI update, prep for round 2: In-game UI feature requests

Postby Doublestrike » 08 Oct 2011, 13:19

Chris H. wrote:On Mac OS X Lion the progress bar for the startup screen is not fully overlapping the image:
That's a graphics issue only; ideally all splash screens will have an empty space at the bottom for the load bar, which soon will mimic the colors in the skin.

That screen's text is rastered into the image, so I couldn't change it quickly. Functionality was the goal. :)
---
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 update, prep for round 2: In-game UI feature requests

Postby Doublestrike » 08 Oct 2011, 13:27

I have gui.skin=default in forge.preferences, but it is still using the Yoda splash.
The "Rebel" skin should be available now in r11029. Thanks for the testing support. Time for bed, back in the mornin'.
---
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 update, prep for round 2: In-game UI feature requests

Postby moomarc » 08 Oct 2011, 14:17

Doublestrike wrote:
Chris H. wrote:On Mac OS X Lion the progress bar for the startup screen is not fully overlapping the image:
That's a graphics issue only; ideally all splash screens will have an empty space at the bottom for the load bar, which soon will mimic the colors in the skin.

That screen's text is rastered into the image, so I couldn't change it quickly. Functionality was the goal. :)
As soon as I'm finished with my system maintenance I'll post the non-mockup graphic. At least I can still follow things here from my phone...
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: UI update, prep for round 2: In-game UI feature requests

Postby slapshot5 » 09 Oct 2011, 20:17

Here's an interesting update to the Mac OS X skinning problem:

After losing 2 games (on purpose, c'mon), the disabled version of the Continue button looks good.

Screen shot 2011-10-09 at 3.14.39 PM.png


-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 update, prep for round 2: In-game UI feature requests

Postby friarsol » 17 Oct 2011, 12:15

Hey Doublestrike,

What are you planning on doing about the Input boxes? They've been a struggle to work with for a year and a half now. It sounds like they are going to disappear mostly, but are they still going to be used for certain things? Or are they being completely replaced?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: UI update, prep for round 2: In-game UI feature requests

Postby Doublestrike » 18 Oct 2011, 01:03

Apologies ahead of time for the huge post - got started and couldn't stop!

friarsol wrote:What are you planning on doing about the Input boxes? They've been a struggle to work with for a year and a half now.
Interpretation 1
Do you mean the "Input", "Stack", and "Combat" areas? The input will remain, since it's important for yes/no/ok/cancel stuff. The stack and combat areas are placed in a vertical tabber with some other non-critical-but-still-important elements. This tabber has six tabs at present: Stack, Combat, Console, Player information (for multiplayer), Map (also for multiplayer), and Dev Mode. When new input is delivered to any of these areas, the tab will show itself and highlight the new information.

Interpretation 2
If you mean the phase marker checkbox inputs in the menu, there's a graphical phase monitor/toggle area with each player field.

Interpretation 3
If you want them gone altogether, this can happen too, but later. Right now, I'm building an MVC architecture for the entire UI, which encompasses the whole operation in a single JFrame with a top-level controller for each display state (home, match, deck editor, Shandalar, etc.) and child controllers for various components (player fields, user hand, input area, etc.)

The current codebase is fairly well split between model and view, but view controllers are mixed in with the swing, resulting in convoluted piles of enormous undocumented files 1500 lines long. Hellish to work with and debug. So, soon enough, the "input boxes" of which you speak can be easily sliced out of control and view, if that is the goal.

In other news...
While I'm writing this long post, I might as well mention the UI structure for multiplayer will be in place when people need it. I've got a standard playing field for each player, one of whom is the user, with mana, keywords, and card management info visible, and a controller to access each field (or global control from the top level). Any number of these fields can be instantiated as necessary, and a scrolling/jumping functionality can be added to the battlefield to move around the fields (visible on the Map tab, summarized in the Player Info tab).

Also, toying with the idea of having a tabber in the hand area, allowing the user to see the hands of teammates, but this would happen much, much later.

Documentation whinge
Also, could I make a general request for better documentation, specifically, please explain what the heck a method does. For example, I'll be on line 1234, looking at
Code: Select all
new VeryImportantSomething.VagueCriticalAction(); // critical for game operation - don't screw this up
and hover for more information about this class, only to get

Code: Select all
<b>VeryImportantSomething().</b> The VeryImportantSomething class.
and

Code: Select all
<b>VagueCriticalAction</b> Does vague critical actions.
which usually means I frown, curse under my breath, kick my dog, and start a hunt to find what's so important, which instance it's using (arcane? forge? a different package?), why it's child code is important, blah blah blah. Anyway, the final result is obfuscated code, which sucks for the next guy... </complain>

(I don't really kick my dog, that was just an instance of DramaticLicense.)

CardPrinted?
A quick question too: I'm using instances of Card whenever a card is displayed. Should I be using CardPrinted since it's lighter?

Arcane?
Could someone fill me in on the history and future of the Arcane packages? What it looks like to me is that the Forge and Arcane packages hold old stuff, waiting to be transitioned into the multiple package structure endorsed by Maven. What's the deal there?

Incidentally, as I go, I'll be phasing out the UI parts of these packages, in favor of the architecture described above, and a more unified organization.

Lowest screen resolution?
The UI fully supports resizing, tested for resolutions down to a minimumSize of 800W x 600H. If someone needs lower, or for vertically-oriented screens, shout it out and I'll work it in now.

Screenshot?
When I have enough progress on the graphical side, I'll post a screenshot. Right now still in the code trenches. :)
---
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 update, prep for round 2: In-game UI feature requests

Postby friarsol » 18 Oct 2011, 03:33

I was talking about Input (and InputControl) specifically. I'd love to see them completely removed/upgraded to something appropriate once the time is right. It's going to be a fairly big workpiece in it's own right, just wanted you to keep it on your radar since it's related to all this (and it sounds like it already is).

As far as the documentation goes, Braids and Dave were trying to add javadocs incrementally. In the cases of the code you are looking at, most of this stuff just hasn't been touched in forever, and whoever originally did it is no longer active, so I wouldn't hold your breath. We can do a better job at the parts we are currently coding up to improve documentation.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: UI update, prep for round 2: In-game UI feature requests

Postby Doublestrike » 18 Oct 2011, 03:56

friarsol wrote:I was talking about Input (and InputControl) specifically. I'd love to see them completely removed/upgraded to something appropriate once the time is right
Ahh, the ol' forge.gui.input package. That looks to me like "model" type stuff, setting up match flow and whatnot. I'm trying very hard to keep my grubby fingers off all of that core functionality stuff. My job description mostly involves view and control, which will be ready for any slicing and dicing.
---
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 update, prep for round 2: In-game UI feature requests

Postby slapshot5 » 18 Oct 2011, 04:26

Doublestrike wrote:About the other issue, I don't have access to a Mac box so sorry can't help very much...but the error is apparently coming from FButton in forge.gui.skin. It can't find the resources defined in FSkin (also in forge.gui.skin)...
I don't think that's what is going on. If I create a AlphaComposite and specifically assign it to enabled, the buttons become somewhat readable:

Code: Select all
private AlphaComposite enabledComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.75f);
For the record, saying I know *nothing* about this graphics stuff would be overstating my knowledge. I don't know what the rule or the alpha params do or what to expect when I tweak them. If anyone has thoughts, I'll gladly test them on my Mac.

-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 update, prep for round 2: In-game UI feature requests

Postby Doublestrike » 18 Oct 2011, 04:39

slapshot5 wrote:If I create a AlphaComposite and specifically assign it to enabled, the buttons become somewhat readable:

Code: Select all
private AlphaComposite enabledComposite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.75f);
Oooh that's a good clue. Alpha composite is the transparency of the button. It's dropped down to 25% for disabled buttons. Maybe the buttons aren't showing because a composite isn't defined for them...so your code would work, but should use 100% opacity (1.0f).

From that clue, could you try this - in the inits section:
Code: Select all
private AlphaComposite disabledComposite =
            AlphaComposite.getInstance(AlphaComposite.SRC_OVER,0.25f);
private AlphaComposite defaultComposite =
            AlphaComposite.getInstance(AlphaComposite.SRC_OVER,1.0f);
In the paintComponent override:
Code: Select all
if(!isEnabled()) {
    g2d.setComposite(disabledComposite);
}
else {
    g2d.setComposite(defaultComposite);
}
---
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 update, prep for round 2: In-game UI feature requests

Postby Hellfish » 18 Oct 2011, 06:55

Doublestrike wrote:CardPrinted?
A quick question too: I'm using instances of Card whenever a card is displayed. Should I be using CardPrinted since it's lighter?
I think that the Card object is the way to go.CardPrinted is for the deckeditors that don't need the ingame things that Card provides like pumped keywords,current PT (After static effects) and such.
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 update, prep for round 2: In-game UI feature requests

Postby Rob Cashwalker » 18 Oct 2011, 13:28

Hellfish wrote:
Doublestrike wrote:CardPrinted?
A quick question too: I'm using instances of Card whenever a card is displayed. Should I be using CardPrinted since it's lighter?
I think that the Card object is the way to go.CardPrinted is for the deckeditors that don't need the ingame things that Card provides like pumped keywords,current PT (After static effects) and such.
THEORETICALLY, the heavy Card object should only exist while in the card game - in a game zone, ie battlefield, library, exile, etc. SO it may be required for the card game UI to use the Card object.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 34 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form