Page 1 of 1

Editing built in widgets, like "Red Resource Bars"

Posted: 14 May 2014, 01:55
by Thundathigh
How would I go about changing colors and size in built in widgets like "Red Resource Bars"?
I see that when I change a position of a bar in game that it is saved to BA.lua in Documents\My Games\Spring\LuaUI\Config, but editing the file itself doesn't cause any updates in game, and the file is overwritten.

I also tried moving the (edited) BA.lua to Program Files (x86)\Spring\LuaUI\Config and Program Files (x86)\Spring\LuaUI\Widgets, but neither places changed anything in the game.

So how can I edit the built in widgets, or where should the updated BA.lua be placed?

Re: Editing built in widgets, like "Red Resource Bars"

Posted: 14 May 2014, 01:59
by Jools
Don't edit the ba.lua, it's just a config file.

I think red TM stuff are a bit more complicated than normal widgets, but usually you edit supplied widgets by grabbing a copy from the mod and putting it in spring/luaui/widgets, thereby overriding it with your local version.

I think ba has that widget here: http://imolarpg.dyndns.org/trac/balates ... cebars.lua

Re: Editing built in widgets, like "Red Resource Bars"

Posted: 14 May 2014, 02:59
by Silentwings
You can "edit" them locally by having a local copy of the widget file in your /luaui/widgets directory and then editing that. BA will load your local version in preference to the internal one, if it exists.

If you're going to do that - be aware that various widgets/gadgets communicate (especially for UI related stuff) and changing one can break other things.

Re: Editing built in widgets, like "Red Resource Bars"

Posted: 14 May 2014, 03:18
by Thundathigh
Thanks Jools, that exactly what I was looking for!

And I'm just changing the alpha level on a couple of things, so it shouldn't break anything haha

Edit: Success

Re: Editing built in widgets, like "Red Resource Bars"

Posted: 14 May 2014, 23:37
by Jools
By the way, while we're talking about Red (TM) things: would be nice if someone could optimise them a bit, atm they are very heavy.

I also tried to work a bit on red tooltip, but it's very complicated code for what it does.