2D Framework Position

Hey i have a question. Why is the start position in the 2d framework in the bottom left and in the gui the top left?
It confused me a litte bit =)

@Snowsun92 said: Hey i have a question. Why is the start position in the 2d framework in the bottom left and in the gui the top left? It confused me a litte bit =)

The gui is only top-left when you initially add an Element, after that the position is your standard bottom-left. I did this for the gui components because half the time (if not more) you components are static, so once you’ve placed them, your done with them.

The 2D framework assumes that everything will be in a fairly constant state of change, thus the choice to use the bottom-left for coords.

I’m not by any means saying this is the proper or even best reason for doing so… it was a choice I made early on when putting together the gui library and I just went with it :wink:

@t0neg0d said: The gui is only top-left when you initially add an Element, after that the position is your standard bottom-left. I did this for the gui components because half the time (if not more) you components are static, so once you've placed them, your done with them.

The 2D framework assumes that everything will be in a fairly constant state of change, thus the choice to use the bottom-left for coords.

I’m not by any means saying this is the proper or even best reason for doing so… it was a choice I made early on when putting together the gui library and I just went with it :wink:

Okay thanks for the information. I post some screenshots when i have more done in the game =)

1 Like