It is currently 06 Sep 2025, 07:36
   
Text Size

General UI support

Post MTG Forge Related Programming Questions Here

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

Re: General UI support

Postby 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 :D
`
Done. :)

`
Edit:

I went ahead and added the bug fix as it was fairly easy to find and then to make the change.
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: General UI support

Postby Doublestrike » 12 Feb 2012, 03:58

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
---
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: General UI support

Postby 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).
Attachments
avatar_selection.jpg
---
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: General UI support

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

Postby 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

Postby 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

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.
---
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: General UI support

Postby 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
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: General UI support

Postby Sloth » 12 Feb 2012, 08:05

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

Re: General UI support

Postby Roujin » 12 Feb 2012, 11:11

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:
Roujin
 
Posts: 75
Joined: 01 Nov 2011, 21:58
Has thanked: 6 times
Been thanked: 13 times

Re: General UI support

Postby slapshot5 » 12 Feb 2012, 11:48

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

Postby Chris H. » 12 Feb 2012, 12:13

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.
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: General UI support

Postby 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.
---
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: General UI support

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

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

-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

Postby friarsol » 12 Feb 2012, 16:55

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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: General UI support

Postby Doublestrike » 12 Feb 2012, 23:30

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

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 41 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 41 users online :: 0 registered, 0 hidden and 41 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 41 guests

Login Form