playMaker

Author Topic: GUITexture Position  (Read 2376 times)

Andys

  • Playmaker Newbie
  • *
  • Posts: 30
GUITexture Position
« on: March 27, 2013, 05:15:05 AM »
Is there a way to fix a GUI Texture position on the screen, because when i re-size the screen it moves left or right and outside of the Gui box which doesn't move.

The GUi texture sits on another and is being used for a health bar, so they need to stay aligned.

Or is there a better way of doing this?
« Last Edit: March 27, 2013, 06:02:37 AM by andysaunders »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: GUITexture Position
« Reply #1 on: March 27, 2013, 08:03:09 AM »
Hi,

 Yes. use the inset position, make the transform position to 0,0 or 0,1 or else ( to stick to corners of the screen if screen size changes.

 then uset he pixel inset position, then you will get absolute positionning.

 BUT, I strongly recommand you get a proper 2d framework do this... it will save you a  lot of time and frustration down the road :)

Inset position can be set using this custom action:

http://hutonggames.com/playmakerforum/index.php?topic=776.msg3127#msg3127


bye,

 Jean

Andys

  • Playmaker Newbie
  • *
  • Posts: 30
Re: GUITexture Position
« Reply #2 on: March 27, 2013, 08:15:32 AM »
Thanks for the reply, will give it a go.

Can you recomend a 2d framework?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: GUITexture Position
« Reply #3 on: March 27, 2013, 08:51:03 AM »
Hi,

 nGui seems very popular, and it's ok to work with, 2d toolkit is very good, but more for 2d animations than interactive ui.

grab a free version of ngui and give a it go and see how it goes.

bye,

 Jean