Post removed.
Post removed.
Post removed.
Last edited by TheRLG on Fri Dec 28, 2007 7:27 am, edited 5 times in total.
-
Nick_Japan
- Posts: 98
- Joined: Mon Dec 13, 2004 11:47 am
- Location: Japan
-
rogerborg
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
I'm mildly horrified that the GUI takes ints in the first place. I'd rather it took floats which refer to a proportion of the screen size, and converted internally. As a compromise, I'm minded to add a method to GUI that takes a rect<f32> and returns a rect<s32>, which can be used inline in GUI method calls.
Ah, right, I'll just go and do that now.
Submitted to the tracker.
Ah, right, I'll just go and do that now.
Submitted to the tracker.
cool thanks.. I've been thinking about this since I started the GUI serialization stuff.. Not only should GUI elements take an optional float rect for size, but they should also have an option for edge (and centre) alignment within their parent for both position and size, and a way for this information to be set, remembered and serialized, and of course have automatic resizing for child controls...
writing all this would be pretty easy, its just a matter of choosing a clean way to implement it
writing all this would be pretty easy, its just a matter of choosing a clean way to implement it
the newest version of irrlicht still in svn has scalable GUI and 4 directional alignment commands thanks to our good friend bitplane and the bunch.
Last edited by Midnight on Sun Feb 18, 2007 4:44 am, edited 1 time in total.
Can't you just place stuff in an absolute position/scale relevant to the current resolution and not have to worry about what the old/new resolution is?
eg. PositionX = 0.654 * XResolution; PositionY = 0.345 * YResolution; ScaleX = 0.45 * XResolution; ScaleY = 0.75 * YResolution;?
What is advantage of all this new scale/old scale stuff? I am probably missing something or overlooked something in your post?
eg. PositionX = 0.654 * XResolution; PositionY = 0.345 * YResolution; ScaleX = 0.45 * XResolution; ScaleY = 0.75 * YResolution;?
What is advantage of all this new scale/old scale stuff? I am probably missing something or overlooked something in your post?