Lua UI window manager module positioning proposal

Lua UI window manager module positioning proposal

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Lua UI window manager module positioning proposal

Post by AF »

I propose we set out a basic layout for positioned modules.

Modules or widgets with UI components would declare a module position and a set of properties and then they would be added to a list of modules in that section that the user could re-order.

They would set their width and height or percentages and wether they stretch or not to fill empty unused space in the module, so a build menu could stretch to fill the rest of a module adding an extra row of build icons at the bottom.

This way a UI module would draw itself based on translated co-ordinates using the window manager API rather than drawing directly to the screen with OpenGL calls.

Modules could declare themselves as not being part of this system and using screen coordinates instead.

As an example I've shown a bsic layout and then used IceXuicks mockup with edits to show what would fit in where. Upper middle and lower control the placement within a section fo a UI module. Corners are sued to go from a corner up or across underneath ro above or alongside the other sections.

Image

For example if the ETA panel where moved from G Upper to G middle then as the screen got taller the distance would increase between the panel and its neighbour as it centers itself.

Of course there are some kinks such as what happens if you havent got a corner module but you have a top lower right and right top components?
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

Ideas are cheap, let's see some code ;-)
MelTraX
Posts: 470
Joined: 02 Jan 2007, 16:18

Post by MelTraX »

It's an interesting idea.. I'll think about it a bit..

Right now I was only planning to implement docking windows.. So one window would be underneath another one and moves with it / moves if the other window is resized..

Btw: AlfaSub and I are making some progress in merging our two systems.. Hopefully it will bring some performance boost.. :D
User avatar
AlfaSub
Posts: 17
Joined: 07 Feb 2006, 20:28

Post by AlfaSub »

Yeah... meltrax and I are trying to develop the system to be as flexible as possible. We pretty much have everything you described implemented in actual code, windows just don't snap together yet.

The only other thing we don't have implemented is the "layout" regions. The objection I have to the layout you describe is that it implies a certain lack of control. If stuff can only be in one given sector of the screen at a time... I think having fully moveable and sizeable windows is better. That way the user isnt "boxed in" with fairly arbitrary screen regions.

Right now (in the current IceUI build) you can move and size each UI widget in whatever fashion you want. Hell, you could put every single element in the center of the screen if for some reason you liked it more that way. You can pretty much achieve everything you're mentioning with the layout scheme, but without the limitation of a predefined grid layout.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

No because the region is the width fo the widest panel it contains and the combined height of all the panels it contains or vice versa dpending on where it is.

If the user disagrees they can just resize a panel move it into another area or reorder. And not everything should have to use that system.

Se in my example there are spaces and holes where panels dont stretch or push the layout region out towards the centre
Post Reply

Return to “Lua Scripts”