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?
Editing built in widgets, like "Red Resource Bars"
Moderator: Moderators
-
- Posts: 2
- Joined: 14 May 2014, 01:47
Re: Editing built in widgets, like "Red Resource Bars"
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
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
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Editing built in widgets, like "Red Resource Bars"
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.
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.
-
- Posts: 2
- Joined: 14 May 2014, 01:47
Re: Editing built in widgets, like "Red Resource Bars"
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
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"
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.
I also tried to work a bit on red tooltip, but it's very complicated code for what it does.