This project is read-only.

G2DButton

Nov 29, 2011 at 10:29 AM

Hi ohan I am adding 3 buttons to a frame at the end of a game the frame takes up almost all of the screen. The 3 buttons are added to the bottom of the frame none overlapping and they are all added to the frame independently. the problem is when i try and click on them the area to click them (ie when the button highlights) is different then where the button is the code to create the buttons is attached.

 

        G2DButton Exit = new G2DButton("Exit");           Exit.TextFont = font;            Exit.Bounds = new Rectangle(0, 520, 256, 50);            Exit.ActionPerformedEvent += new ActionPerformed(HandleExitActionsPerformed);

            G2DButton Retry = new G2DButton("Retry");            Retry.TextFont = font;            Retry.Bounds = new Rectangle(257, 520, 256, 50);            Retry.ActionPerformedEvent += new ActionPerformed(HandleRetryActionsPerformed);


            G2DButton Next = new G2DButton("Next");            Next.TextFont = font;            Next.Bounds = new Rectangle(513, 520, 257, 50);

Next.ActionPerformedEvent += new ActionPerformed(HandleNextActionsPerformed);

Nov 29, 2011 at 8:53 PM

after playing with it a bit the issue seems to be that if i move the window with the game then i am able to line up the boxes with there highlight area but by default it does not seem to stay there.

Coordinator
Dec 2, 2011 at 10:54 PM

Which version of Goblin is this? Also, can you send me the source code?

Ohan