Vertical Scroller Mode

Introduce your project and write about your work.

Moderator: PPS-Leaders

User avatar
Michel
Human Space Navy Sergeant
Posts: 13
Joined: Tue Nov 21, 2006 5:14 pm

Post by Michel » Thu Feb 01, 2007 2:23 pm

Well, I have to say that the way I implemented the vertical GUI-elements was quite ignorant. First I tried to make it possible for glgui_box to group GUI-elements with variable angles, but at the end I saw that it's just too much work for the time I still had. The main problem was, that the element2D sizes don't change, when rotating a widget, so if you rotate a widget by 90 degrees for instance, the SizeX value will then become the height and SizeY will become the width of an object. Somehow the sine/cosine calculations I tried to add to glgui_box didn't work correctly. I think it had to do with the behaviour of the element2d- values when initializing. The angle isn't given through correctly or something like that, so making the whole GUI more flexible is actually much more work then I expected and I think it would start at changing the behaviour of element2d.
My approach was one big work-around: The placement of the energywidgetverticals is all handled by the HUD class. They aren't packed into a container at all, so it only works for this specific set-up as we have in the HUD. For any other situation: If you want to have vertical elements you will have to reprogram it by scratch. Of course, the energywidgetvertical- class is usable. It also resizes its elements correctly according to the widget- size of the energyWidgetVertical.

Post Reply

Who is online

Users browsing this forum: No registered users and 107 guests