General UI support
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: General UI support
by Chris H. » 12 Feb 2012, 01:38
`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
Done.

`
Edit:
I went ahead and added the bug fix as it was fairly easy to find and then to make the change.
-
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: General UI support
by Doublestrike » 12 Feb 2012, 03:58
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.Chris H. wrote:Yeah, it does look strange.
The display also changes as I move the mouse pointer and click on the various components.
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
---
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: General UI support
by Doublestrike » 12 Feb 2012, 04:09
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).
I just made a few quick avatars, hoping some graphics guru can do some fixing.

---
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: General UI support
by Doublestrike » 12 Feb 2012, 04:23
@mac users everywhere - bugfix #1 is in place. How's the repaint now?
---
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: General UI support
by friarsol » 12 Feb 2012, 05:31
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..
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: General UI support
by Doublestrike » 12 Feb 2012, 05:51
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
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();
---
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: General UI support
by ArsenalNut » 12 Feb 2012, 07:21
The combat pane is not getting updated as you declare attackers and blockers which makes it combat challenging.
So many cards, so little time
-
ArsenalNut - Posts: 512
- Joined: 08 Jul 2011, 03:49
- Has thanked: 27 times
- Been thanked: 121 times
Re: General UI support
by Sloth » 12 Feb 2012, 08:05
The repaint problem is still there, on both windows 7 and XP.Doublestrike wrote:@mac users everywhere - bugfix #1 is in place. How's the repaint now?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: General UI support
by Roujin » 12 Feb 2012, 11:11
Heh, okay, thanksChris H. wrote:Done.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


Re: General UI support
by slapshot5 » 12 Feb 2012, 11:48
And Mac.Sloth wrote:The repaint problem is still there, on both windows 7 and XP.Doublestrike wrote:@mac users everywhere - bugfix #1 is in place. How's the repaint now?
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: General UI support
by Chris H. » 12 Feb 2012, 12:13
`slapshot5 wrote:And Mac.Sloth wrote:The repaint problem is still there, on both windows 7 and XP.Doublestrike wrote:@mac users everywhere - bugfix #1 is in place. How's the repaint now?
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.
-
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: General UI support
by Doublestrike » 12 Feb 2012, 12:16
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.
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.
---
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: General UI support
by slapshot5 » 12 Feb 2012, 12:36
I just commented out this line in FPanel (around line 245 - I've got some debug code in though):
-slapshot5
- Code: Select all
g0.fillRoundRect(0, 0, pw, ph, cornerDiameter, cornerDiameter);
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: General UI support
by friarsol » 12 Feb 2012, 16:55
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.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 usingHopefully 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.
- Code: Select all
player.getZone(Zone.Hand).updateObservers();
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: General UI support
by Doublestrike » 12 Feb 2012, 23:30
Yeah, except now background colors won't be drawn (probably)slapshot5 wrote:I just commented out this line in FPanel (around line 245 - I've got some debug code in though):in drawBackgroundColor. All seems normal.
- Code: Select all
g0.fillRoundRect(0, 0, pw, ph, cornerDiameter, cornerDiameter);
-slapshot5


---
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
Who is online
Users browsing this forum: No registered users and 20 guests