playMaker

Author Topic: change position of Guilayout Text field. [SOLVED , Alex SAVED the DAY]  (Read 3599 times)

Michaelb

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 53
I have been busting my head in order to find a way to move it , put it somewhere else on the screen.

Also hide it and unhide it at will.

 :(
« Last Edit: July 11, 2014, 01:14:07 PM by Michaelb »

Michaelb

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 53
Re: Is there a way to change position of Guilayout Text field.
« Reply #1 on: July 11, 2014, 07:46:01 AM »
Please don't tell me that there is no way of doing this....

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Is there a way to change position of Guilayout Text field.
« Reply #2 on: July 11, 2014, 12:20:00 PM »
Unity's GUILayout system is designed to control the layout of controls using rules:
http://docs.unity3d.com/ScriptReference/GUILayout.html

You position your gui using layout actions like Begin/End Horizontal, Begin/End Vertical, Flexible Space etc.

If you want to just place a control explicitly with a Rect use GUI actions instead of GUILayout actions.

Michaelb

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 53
Re: Is there a way to change position of Guilayout Text field.
« Reply #3 on: July 11, 2014, 12:30:11 PM »
Got it Alex , thank you very very much.

I will try it right now , and lets hope that it will work.

Again thank you very very much.

Michaelb

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 53
Re: Is there a way to change position of Guilayout Text field.
« Reply #4 on: July 11, 2014, 01:13:07 PM »
ALEX SAVED THE DAY

It took me 5 to 10 minutes to figure it out

At start we put guilayout begin area  (here we add a rect variable)

At the middle guilayouttext field

At the end we close with guilayouttext end area.

What it does , is making a rec that will "drive" the guilayouttext field !!!!

Thousand of thanks Alex.   ;)