Post removed.

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

Post removed.

Post by TheRLG »

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

Post by Nick_Japan »

Good snippet there! Yes I'd be interested in seeing the dimension2d functions and stuff. This is the kind of thing any program with a GUI should have in it somewhere
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

Post by TheRLG »

Post removed.
Last edited by TheRLG on Fri Dec 28, 2007 7:28 am, edited 2 times in total.
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

Post by TheRLG »

Post removed.
Last edited by TheRLG on Fri Dec 28, 2007 7:28 am, edited 1 time in total.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

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.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

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 :?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

Post by TheRLG »

Post removed.
Last edited by TheRLG on Fri Dec 28, 2007 7:28 am, edited 1 time in total.
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Hmm. I've put up a small patch that adds some functionality that I need to prototype an interface in my applpication, but it probably makes more sense (for me) to switch to CEGui later in development than to invest more time in the Irrlicht GUI. But who knows what whims tomorrow may bring?
JimmyFo
Posts: 6
Joined: Fri Dec 01, 2006 5:39 pm

Post by JimmyFo »

It seems to me that this just reads the width, and adjusts for that. Is there a way to keep the height monitored and changed as well, so if there is a unusual size change (wide screen monitors, stretched window, etc) it can adjust the pixel location to fit that? Or do you recommend CEGUI?
TheRLG
Posts: 372
Joined: Thu Oct 07, 2004 11:20 pm

Post by TheRLG »

Post removed.
Last edited by TheRLG on Fri Dec 28, 2007 7:28 am, edited 1 time in total.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

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.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

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?
Post Reply