playMaker

Author Topic: GUILayout Begin Area [SOLVED]  (Read 5631 times)

tim.holman

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 49
GUILayout Begin Area [SOLVED]
« on: November 18, 2011, 05:19:19 PM »
I'm setting up a golf scorecard using the GuiLayout options. I have a number of boxes that are being organized through a series of "GUILayout Begin(End) Vertical" and "GUILayout Begin(End) Horizontal" actions. (This has allowed me to create columns and rows, similar to a spreadsheet.) At the beginning of all of this though, I have a "GUILayout Begin Area" (along with an "End Area" to cap it all off). As I tweak the values under the "GUILayout Begin Area," nothing happens. I have messed around with every variable, including layout options, but nothing seems to happen at all. When I disable the "Begin Area" action, the scorecard still works fine for me, however, the Playmaker Fsm is outlined in red, indicating an error.  F.Y.I., I'm trying to center the scorecard in the middle of the screen, but it refuses to move from the upper left corner no matter what I do (including "GUILayout Begin Area Centered").

Am I missing something here? How do I manipulate the positioning/ size of all of these gui elements? Am I correct in believing that this should be something adjusted under the "Begin Area" action? Any ideas would be greatly appreciated.
« Last Edit: December 20, 2011, 07:07:28 PM by alexchouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: GUILayout Begin Area
« Reply #1 on: November 18, 2011, 11:04:51 PM »
Did you try using GUILayout Begin Centered? Begin Area should let you do this... will run some tests...

tim.holman

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 49
Re: GUILayout Begin Area
« Reply #2 on: November 21, 2011, 10:28:02 AM »
I did indeed try GUILayout Begin Centered, however, that did not seem to affect it one bit. I even tried moving it up and down in the action list for that particular state, but it never actually centered anything.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: GUILayout Begin Area
« Reply #3 on: November 21, 2011, 06:49:04 PM »
Take a look at the PlaymakerSamples\TestLab\GUI\GUILayoutScreenCorners test.

Does that work for you? I just tried editing the top level GUILayout Begin Area and it works as expected...

Although I just tried GUILayout Begin Centered and it does appear to be broken - will look into it!

EDIT: I forgot that GUILayout Begin Centered centers the contained gui inside a parent GUILayout Area, so if you put it inside a GUILayout Begin Area that defines the whole screen, then it works as expected. This is by design, but needs proper documentation! Will fix this!

Let me know if that helps...
« Last Edit: November 21, 2011, 07:00:13 PM by alexchouls »

tim.holman

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 49
Re: GUILayout Begin Area
« Reply #4 on: November 23, 2011, 10:39:26 AM »
Alex,
I did try putting the GUILayout Begin/End Centered actions within the GUILayout Begin/End Area actions. Still no difference. The only way I've figured out to move this gui at all is through the Hud Skin I've attached to it (through Playmaker). This won't work, however, because it's using absolute values for screen positioning. (B.t.w. I just recently applied the skin, so that can't be at fault for my positioning issue.)

I will take a look at your example scene when I get a moment and get back to you if that's not working properly. Thank you very much for your help, can't tell you how much I appreciate it!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: GUILayout Begin Area
« Reply #5 on: December 13, 2011, 04:51:39 PM »
Did you take a look at the sample scene. Wondering if you got it working, or if there's a bug to squash!

tim.holman

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 49
Re: GUILayout Begin Area
« Reply #6 on: December 20, 2011, 04:18:18 PM »
I was able to get it working. I actually redid the card all together, which made it much easier. I'm still a bit confused as to why it wasn't working correctly in the first place, but it's no longer an issue for me. Thanks again Alex!

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: GUILayout Begin Area [SOLVED]
« Reply #7 on: December 20, 2011, 07:08:41 PM »
Cool. Let me know if it crops up again...