It is currently 07 Nov 2025, 17:47
   
Text Size

General UI support

Post MTG Forge Related Programming Questions Here

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

Re: General UI support

Postby silly freak » 17 Feb 2012, 09:53

Doublestrike wrote:
Chris H wrote:g2d0.create().setClip(clip);
Actually, g2d0 is already created from the root graphics, so that would be introducing another graphics canvas, just so you know (performance!). But that may be the only way to solve the problem...
That's a semantic mistake: you're setting the clip on the created graphics, but then use the old one to paint; the effect is that you're drawing without clipping. But if that looks good, maybe the clipping isn't even necessary?
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: General UI support

Postby Sloth » 17 Feb 2012, 10:37

Chris H. wrote:
Doublestrike wrote:Actually, g2d0 is already created from the root graphics, so that would be introducing another graphics canvas, just so you know (performance!). But that may be the only way to solve the problem...
`
I built a local copy with Maven using my attempt and played for awhile. It got to the point where things were starting to slow down during one of the matches. I checked my Activity Monitor and forge was using less than 700 MB at that time.

So my solution may need additional testing. :(
This has nothing to do with the texture problem. Try conceding and quitting a match and starting a new one: You will see that lots of things aren't cleared properly (which usually leads to the second match being unplayable).

silly freak wrote:
Doublestrike wrote:
Chris H wrote:g2d0.create().setClip(clip);
Actually, g2d0 is already created from the root graphics, so that would be introducing another graphics canvas, just so you know (performance!). But that may be the only way to solve the problem...
That's a semantic mistake: you're setting the clip on the created graphics, but then use the old one to paint; the effect is that you're drawing without clipping. But if that looks good, maybe the clipping isn't even necessary?
Yes, setting the clip was not needed. I commented it out. Please report if there are side effects.
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 Doublestrike » 18 Feb 2012, 09:55

Sloth wrote:Yes, setting the clip was not needed. I commented it out. Please report if there are side effects.
Thanks Sloth - but unfortunately, the rounded rectangle clip is needed to support textures and images in rounded corner panels - this is the whole struggle :)

A solid background color can be drawn directly as a RoundRect, which one sees in the solid-colored panels. But to round the corners of an image, they'll need to be masked somehow - either clipped or composited.

This rounded corner, image supporting panel has a lot of applications, when/if it is done. (It's not being used yet, so one can't see any "side effects" now.)

Anyway, that's the goal. Maybe the best thing to do for now is abandon this functionality, use the square corner version, and once I get a chance to develop on a different OS I can revisit this.
---
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 » 20 Feb 2012, 00:05

...could someone tell me whether repair work on the corner problem is abandoned, so I can finish the work on FPanel?
---
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 » 20 Feb 2012, 00:21

Started a new quest:
Created my decks, and bought pet and plant wall. The UI buttons for the Wall and Pet were invisible until after I left the Quest area and came back. Not only should they show up right away, they probably should be enabled by default if they didn't exist before.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: General UI support

Postby Chris H. » 20 Feb 2012, 02:46

Doublestrike wrote:...could someone tell me whether repair work on the corner problem is abandoned, so I can finish the work on FPanel?
`
That is a tough question to answer.

I can't speak for other people, but I do not have the skills necessary to fix this problem.

There is a chance that someone who is not currently involved in the project may develop an interest in this problem and come up with the solution. Granted, the solution may not appear in the near future.

I believe that the rest of us would like to let you make this decision as you are the one who is most familiar with this part of the project. We would understand if you were to move on to other areas of the UI. 8)
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 » 20 Feb 2012, 03:38

@friarsol - will check.

@Chris - OK thanks, that's it then, I'll move on for now, and revisit when I have access to a different OS.
---
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 Max mtg » 20 Feb 2012, 18:07

Please, pay attention to my problem. This is quite important - viewtopic.php?f=52&t=6468 - because forge won't start on some systems that need their decks fixed, if this is not addressed.

Something prevents JOptionPanes from displaying properly. Problem appeares work a couple of day ago.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: General UI support

Postby Doublestrike » 21 Feb 2012, 12:37

@Chris, others - FPanel now back to original status, more or less. Thanks again for the support, it's now on the back burner.

@Friarsol - bazaar should be OK now.

@Max - fixed things up a bit, is the current state (r14249) the response you were expecting? The message box I was getting is related to SVN (see pic). This is the NPE I mentioned a few days ago; I've now uncommented the line and crossed my fingers.
Attachments
err.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 Max mtg » 21 Feb 2012, 19:13

Doublestrike wrote:@Max - fixed things up a bit, is the current state (r14249) the response you were expecting? The message box I was getting is related to SVN (see pic). This is the NPE I mentioned a few days ago; I've now uncommented the line and crossed my fingers.
Yes, this is what I meant to see

Yet the game does not start - NPE on FView.home field. It is assigned a value at all?

I have managed to run an intermediate build (some of today's morning ones) and found FOUR lists to choose decks from with AI's decks on another tab. I am not sure at all if this is functional. Why not use vertical tabs to choose gametype and display the matching decks next to it?

Something like this - Constructed/sealed/draft/quest at left and decklist at the right side.
And return choice of AI deck to the first tab, please.

Image
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: General UI support

Postby Doublestrike » 21 Feb 2012, 23:55

@Max - the four fields are color gen, custom decks, theme gen, and quest decks. The deck manager was still under construction when I finished this code, so that functionality still needs testing, but should need very little work.

Re: selection options. That would be introducing another click into the mix - player (click), gametype (click), deck (click click), player (click), gametype (click), deck (click click). I personally like having all the options in front of me right away. Tabs were chosen to support small screens and also multiple players in the future. But, there's always a better mousetrap - what does everyone else think?
Last edited by Doublestrike on 22 Feb 2012, 00:50, 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: General UI support

Postby Chris H. » 22 Feb 2012, 00:29

I get two JOptionPane.showMessageDialog windows. It looks like the code is attempting to treat the contents of a ".SVN" folder as a deck file. We had a similar problem a few days ago and I think that Max fixed that one. This may be a similar situation.

On top of these two dialogs I am also getting the crash report:

java.lang.NullPointerException
at forge.view.Main.main(Main.java:75)
The constructed game mode does tend to get busy and can be confusing.
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 » 22 Feb 2012, 00:56

@Max, Chris - Actually I just remembered I have an idea that will solve this easily. It has to do with a different block of work, but I'll start that next instead of the deck editor. I'll hold off until next release though.

====

Am looking at the NPE now; it may have to wait until I get off of work, but I'll get it fixed today. EDIT should be fixed 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 » 22 Feb 2012, 03:24

Doublestrike wrote:@Friarsol - bazaar should be OK now.
Is this referring to the bug regarding Opponents not refreshing after you win a Quest match? I can force the refresh by going into Challenges and coming back, so since that still happens I'm guessing it was something else.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: General UI support

Postby Chris H. » 22 Feb 2012, 03:33

Doublestrike wrote:Am looking at the NPE now; it may have to wait until I get off of work, but I'll get it fixed today. EDIT should be fixed now.
`
Thank you Doublestrike for fixing the NPE on startup. :)
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

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 56 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form