Savegame UI / Gadget - Page 5

Savegame UI / Gadget

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

Moderator: Moderators

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Savegame UI / Gadget

Post by zwzsg »

Yeah, unsynced gadget can do UI pretty much the same as widget.

Though, from a philosophical standpoint, I'd rather have UI be on a widget so that the player can freely swap UI. Which I never do, cause doing a synced gadget -> unsynced gadget is much simpler to me than writing whatever's needed for gadget to expose stuff to widgets.t synced gadget -> widget, and also I pefer having all the code related to the same stuff in the same file.

Forboding Angel wrote:Couldn't you just have a widget that acts as a go-between for I/O? That being it's only function. It strikes me that it should be simple enough to pass parameters to the widget and then make the widget do it's thing.
That's what I did. At first it seemed convoluted, but anyway there was no other way, and in the end it's only a couple lines of codes. The annoying bit is that I cannot forbid the user to switch off the widget.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Savegame UI / Gadget

Post by lurker »

You should have it in a gadget with a /command to disable each bit, in my opinion. Game ui should not die if luaui is doing strange things or shuts off, and it's simpler to write things showing semi-privileged data as gadgets.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Savegame UI / Gadget

Post by Argh »

Early mockup. Click to display at full size.

Image

For folks who don't like it (I mean, c'mon, what place am I posting this? OFC people will complain), this will be a Widget, and if you're lazy and just want to swap out the graphics, here are the specifications:

1. Total size of main background image: 1024X256.
2. Actual size of background intended to be displayed: 800X256, centered. Do not build it wider or deeper unless you want to recode the UI- this will use a non-dynamic size (i.e., it will be the same size, in pixels, at all resolutions, instead of stretching).
3. Uses alpha mask.
4. Buttons: 64X64, and they have two states: "dormant" and "lit" (on mouseover). Make sure they're small enough that when "lit", the glow doesn't have obvious square edges. 10 rows of buttons, and there will be two types: "save" and "load" (haven't built "load" yet, but you get the idea).
5. The position / size of the "info" bar has not been frozen yet, but will not be flexible unless you want to change the code.

So, if you don't like it, no problem- don't complain, get busy :-)
Attachments
mockup.jpg
(54.17 KiB) Downloaded 2 times
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Savegame UI / Gadget

Post by Forboding Angel »

It's pretty, I like it. Daddy approves :-)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Savegame UI / Gadget

Post by Argh »

Moar progress. Gotta go here in a bit, but the basic crap is done (note, specs haven't changed here, if anybody is wanting to make an alt), click to enlarge, etc.:

Image
Attachments
ui_wip.jpg
(490.65 KiB) Downloaded 2 times
Post Reply

Return to “Lua Scripts”