Page 5 of 5

Re: Savegame UI / Gadget

Posted: 18 Jan 2010, 20:48
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.

Re: Savegame UI / Gadget

Posted: 19 Jan 2010, 00:29
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.

Re: Savegame UI / Gadget

Posted: 19 Jan 2010, 04:42
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 :-)

Re: Savegame UI / Gadget

Posted: 19 Jan 2010, 06:46
by Forboding Angel
It's pretty, I like it. Daddy approves :-)

Re: Savegame UI / Gadget

Posted: 19 Jan 2010, 16:45
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