What you want to do?
There is a way to overwrite some UI's text depending on what kind of button they are (not every button is moddable, most of them is hardcoded afaik)
PS. images and script are not related, images are old ones just to give you an example
This is part of the script I'm doing with ivanpera for your people trust overhaul.
Does it mean something to you or you're completely "ignorant" about these kind of things?
Code:
-- ###------------------------- START *******
-- TOOLTIPS ---------------------------------------------------------------------
-- ###-------------------------
local function AeF_03_econ_DisplayTooltip(context)
-- *** BASE COLOR
local color1 = "";
local color2 = "";
local color3 = "";
local color4 = "";
-- *** CHANGE VANILLA UI TOOLTIP
if context.string == "tab_regions"
then
local tt_text = UIComponent(context.component):GetTooltipText();
local string1 = "Provinces";
local string2 = "Fides Oeconomicae";
-- *** CHANGE COLORS
if string.find(tt_text, string1) or string.find(tt_text, string2) or tt_text == ""
then
local length = #TRUST_LEVEL_THRESHOLDS;
done1 = false; done2 = false;
for i = 1, length do
if (AeF_03_econ_trust <= TRUST_LEVEL_THRESHOLDS[i] or i == length) and done1 == false
then
color1 = COLOR1_TABLE[i];
color2 = COLOR2_TABLE[i];
done1 = true;
end
if (old_trust <= TRUST_LEVEL_THRESHOLDS[i] or i == length) and done2 == false
then
color3 = COLOR1_TABLE[i];
color4 = COLOR2_TABLE[i];
done2 = true;
end
if done1 and done2
then
break;
end
end
-- *** SET TOOLTIP
local index = #TRUST_LEVEL_THRESHOLDS
local trust_max = TRUST_LEVEL_THRESHOLDS[index]
local ratio = math.ceil(old_trust/trust_max*100);
local component = UIComponent(context.component):Id();
UIComponent(context.component):SetTooltipText(WHITE..
"CURRENT\nFides Oeconomicae :\n"..
color1..AeF_03_econ_trust..WHITE.."/"..trust_max..
"\n\nPREVIOUS\nFides Oeconomicae :\n "..
color3..old_trust..WHITE.."/"..trust_max..
" "..LINE1..trust_tooltip.."");
end
end
end
-- ###---------------------------------- END*