Page 3 of 22

Re: General UI support

PostPosted: 12 Feb 2012, 01:38
by Chris H.
friarsol wrote:Someone sign Roujin up for commit status already, he clearly wants to directly spend his free time on the project, so we should oblige him :D
`
Done. :)

`
Edit:

I went ahead and added the bug fix as it was fairly easy to find and then to make the change.

Re: General UI support

PostPosted: 12 Feb 2012, 03:58
by Doublestrike
Chris H. wrote:Yeah, it does look strange. :)

The display also changes as I move the mouse pointer and click on the various components.
Strange is putting it lightly. Apparently OS specific (grrr). I'll have a hack with Sloth's clue, hopefully something amazing happens and it clears up.

If someone else wants to dig also, the culprit here is probably the paintComponent() method in FPanel, it

- sets a rounded clip
- paints a texture or BG color (this is what's on Chris's screen)
- paints a foreground if necessary
- paints borders

Re: General UI support

PostPosted: 12 Feb 2012, 04:09
by Doublestrike
Avatar selection is now available in settings.

I just made a few quick avatars, hoping some graphics guru can do some fixing. :) (sprite_avatars.png in default skin).

Re: General UI support

PostPosted: 12 Feb 2012, 04:23
by Doublestrike
@mac users everywhere - bugfix #1 is in place. How's the repaint now?

Re: General UI support

PostPosted: 12 Feb 2012, 05:31
by friarsol
What do we need to get the Zone Labels to be updated on a ChangeZone? It looks like this is only happening at the beginning of the turn. I tried doing a player.updateObservers() in GameAction.changeZone() but that doesn't seem to do the trick..

Re: General UI support

PostPosted: 12 Feb 2012, 05:51
by Doublestrike
That observer updates the life and poison.

Updates of hand, graveyard, library, flashback, exile are attached to the hand zone, and can be updated using

Code: Select all
player.getZone(Zone.Hand).updateObservers();
Hopefully that's what you're looking for? The architecture is a bit strange, it's from the old UI. I'll get around to fixing that up one of these days.

Re: General UI support

PostPosted: 12 Feb 2012, 07:21
by ArsenalNut
The combat pane is not getting updated as you declare attackers and blockers which makes it combat challenging.

Re: General UI support

PostPosted: 12 Feb 2012, 08:05
by Sloth
Doublestrike wrote:@mac users everywhere - bugfix #1 is in place. How's the repaint now?
The repaint problem is still there, on both windows 7 and XP.

Re: General UI support

PostPosted: 12 Feb 2012, 11:11
by Roujin
Chris H. wrote:
friarsol wrote:Someone sign Roujin up for commit status already, he clearly wants to directly spend his free time on the project, so we should oblige him :D
Done. :)
Heh, okay, thanks :) Don't expect very regular commits by me though, at least at the moment. I still have two exams and one due project for university lingering in the very near future :lol:

Re: General UI support

PostPosted: 12 Feb 2012, 11:48
by slapshot5
Sloth wrote:
Doublestrike wrote:@mac users everywhere - bugfix #1 is in place. How's the repaint now?
The repaint problem is still there, on both windows 7 and XP.
And Mac.

Re: General UI support

PostPosted: 12 Feb 2012, 12:13
by Chris H.
slapshot5 wrote:
Sloth wrote:
Doublestrike wrote:@mac users everywhere - bugfix #1 is in place. How's the repaint now?
The repaint problem is still there, on both windows 7 and XP.
And Mac.
`
I updated to rev 13980 and the repaint problem on my Mac seems to have not improved. I am seeing the same sort of problems as yesterday.

Re: General UI support

PostPosted: 12 Feb 2012, 12:16
by Doublestrike
I've got the problem narrowed down to when the background is painted - setOpaque is false (has to be) so visual artifacts aren't removed when the parent is painted (I think).

I run into this problem really often but I haven't figured out the way to fix it, and have a translucent background. Anyway working on it. I found a place where it's happening on my machine so I've got something to start from.

Re: General UI support

PostPosted: 12 Feb 2012, 12:36
by slapshot5
I just commented out this line in FPanel (around line 245 - I've got some debug code in though):

Code: Select all
g0.fillRoundRect(0, 0, pw, ph, cornerDiameter, cornerDiameter);
in drawBackgroundColor. All seems normal.

-slapshot5

Re: General UI support

PostPosted: 12 Feb 2012, 16:55
by friarsol
Doublestrike wrote:That observer updates the life and poison.

Updates of hand, graveyard, library, flashback, exile are attached to the hand zone, and can be updated using

Code: Select all
player.getZone(Zone.Hand).updateObservers();
Hopefully that's what you're looking for? The architecture is a bit strange, it's from the old UI. I'll get around to fixing that up one of these days.
Gross. Alright, I'm going to add this into GameAction.changeZone(). When all of the observers get moved to just the Player, just make sure it gets updated. Just look for Player.updateLabelObservers() after that happens.

Re: General UI support

PostPosted: 12 Feb 2012, 23:30
by Doublestrike
slapshot5 wrote:I just commented out this line in FPanel (around line 245 - I've got some debug code in though):

Code: Select all
g0.fillRoundRect(0, 0, pw, ph, cornerDiameter, cornerDiameter);
in drawBackgroundColor. All seems normal.

-slapshot5
Yeah, except now background colors won't be drawn (probably) :wink: :) But I suppose a workaround is better than nothing. Working on it today.