[SOLVED] Mofidying the default GUI text for UMC
Moderator: Forum Moderators
[SOLVED] Mofidying the default GUI text for UMC
Is it possible to replace this text with a custom one?
Apparently, there's no LUA or WML, or txt that you could edit to replace GUI text. Turns out, this particular piece of text is contained in report.cpp. As I understand, it isn't possible to edit compiled C++ files, or download fhem from GIT and compile without modifying the core game files.
Maybe there's some other way, like, to repalce this GUI element with a custom made LUA GUI?
Apparently, there's no LUA or WML, or txt that you could edit to replace GUI text. Turns out, this particular piece of text is contained in report.cpp. As I understand, it isn't possible to edit compiled C++ files, or download fhem from GIT and compile without modifying the core game files.
Maybe there's some other way, like, to repalce this GUI element with a custom made LUA GUI?
Last edited by Inkerrio on December 8th, 2022, 12:34 pm, edited 3 times in total.
Re: Mofidying the default GUI text for UMC
I would try with wesnoth.theme_items Lua.
Re: Mofidying the default GUI text for UMC
This actually worked, thank you
Edit: in case someone some day will want to change a tooltip in the default GUI and will be searching for a solution, here's the code
Code: Select all
local gold_bar = wesnoth.interface.game_display.gold
function wesnoth.interface.game_display.gold()
local _ = wesnoth.textdomain "WWII"
local g = gold_bar()
-- remove the old table --
table.remove(g, 1, 2)
-- store side 1 into variable --
side = wesnoth.sides[1]
-- store the gold into variable --
side_gold = side.gold
-- insert the gold variable --
table.insert(g, wml.tag.element {
text = side_gold,
tooltip = "Supply\n\nThe amount of resources currently available to recruit and maintain your army."
})
return g
end
Last edited by Pentarctagon on December 24th, 2022, 9:01 am, edited 1 time in total.
Reason: [code]
Reason: [code]
- Celtic_Minstrel
- Developer
- Posts: 2290
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: [SOLVED] Mofidying the default GUI text for UMC
Please use
[code]
tags when posting code on the forums, and be sure to make sure it's indented properly as well.Re: [SOLVED] Mofidying the default GUI text for UMC
How you have changed the icons?