fix some buttons not getting the right main color

(especially in UI bags... ew.  can't believe I missed that!)
master
Vanessa Dannenberg 2021-03-04 10:29:28 -05:00
parent bd7531c021
commit 971aedd2d0
4 changed files with 15 additions and 10 deletions

View File

@ -22,12 +22,12 @@ minetest.register_on_joinplayer(function(player)
";"..dreambuilder_theme.tooltip_bgcolor..
";"..dreambuilder_theme.tooltip_fontcolor.."]"..
"style_type[button;bgcolor="..dreambuilder_theme.btn_color.."]"..
"style_type[button_exit;bgcolor="..dreambuilder_theme.form_bgcolor.."]"..
"style_type[image_button;bgcolor="..dreambuilder_theme.form_bgcolor..
"style_type[button_exit;bgcolor="..dreambuilder_theme.btn_color.."]"..
"style_type[image_button;bgcolor="..dreambuilder_theme.btn_color..
";border="..dreambuilder_theme.image_button_borders.."]"..
"style_type[image_button_exit;bgcolor="..dreambuilder_theme.form_bgcolor..
"style_type[image_button_exit;bgcolor="..dreambuilder_theme.btn_color..
";border="..dreambuilder_theme.image_button_borders.."]"..
"style_type[item_image_button;bgcolor="..dreambuilder_theme.form_bgcolor..
"style_type[item_image_button;bgcolor="..dreambuilder_theme.btn_color..
";border="..dreambuilder_theme.image_button_borders.."]"
local name = player:get_player_name()
local info = minetest.get_player_information(name)

View File

@ -219,12 +219,12 @@ EOF
cat > /tmp/herefileA << 'EOF'
"style_type[button;bgcolor="..dreambuilder_theme.btn_color.."]"..
"style_type[button_exit;bgcolor="..dreambuilder_theme.form_bgcolor.."]"..
"style_type[image_button;bgcolor="..dreambuilder_theme.form_bgcolor..
"style_type[button_exit;bgcolor="..dreambuilder_theme.btn_color.."]"..
"style_type[image_button;bgcolor="..dreambuilder_theme.btn_color..
";border="..dreambuilder_theme.image_button_borders.."]"..
"style_type[image_button_exit;bgcolor="..dreambuilder_theme.form_bgcolor..
"style_type[image_button_exit;bgcolor="..dreambuilder_theme.btn_color..
";border="..dreambuilder_theme.image_button_borders.."]"..
"style_type[item_image_button;bgcolor="..dreambuilder_theme.form_bgcolor..
"style_type[item_image_button;bgcolor="..dreambuilder_theme.btn_color..
";border="..dreambuilder_theme.image_button_borders.."]"
EOF
@ -376,7 +376,7 @@ sed -i 's/"listcolors\[#00000000;#00000000\]"/""/' $workdir"/mods/unified_invent
sed -i 's/"listcolors\[#00000000;#00000000\]"/""/' $workdir"/mods/unified_inventory/register.lua"
sed -i '/local n = 4/ {
i \\tformspec[4]="style_type[image_button;bgcolor="..dreambuilder_theme.form_bgcolor.."]"
i \\tformspec[4]="style_type[image_button;bgcolor="..dreambuilder_theme.btn_color.."]"
i \\tformspec[5]=
r /tmp/LISTCOLORS_HIDE_SLOTS
a \\t\t\t""
@ -384,6 +384,10 @@ sed -i '/local n = 4/ {
d
}' $workdir"/mods/unified_inventory/internal.lua"
sed -i '/1.175;ui_bags_header.png/ {
a \\t\t\t"style_type[button;bgcolor="..dreambuilder_theme.btn_color.."]",
}' $workdir"/mods/unified_inventory/bags.lua"
sed -i "0, /depends = /s//depends = dreambuilder_gui_theming, /" $workdir"/mods/unified_inventory/mod.conf"
mv $workdir"/mods/dreambuilder_extras/dreambuilder_gui_theming" \

View File

@ -15,6 +15,7 @@ unified_inventory.register_page("bags", {
return { formspec = table.concat({
string.gsub(unified_inventory.standard_inv_bg, "YYY", "4.4"),
bags_inv_bg_prefix.."1.175;ui_bags_header.png]",
"style_type[button;bgcolor="..dreambuilder_theme.btn_color.."]",
"label[0,0;" .. F(S("Bags")) .. "]",
"button[0,2.2;2,0.5;bag1;" .. F(S("Bag @1", 1)) .. "]",
"button[2,2.2;2,0.5;bag2;" .. F(S("Bag @1", 2)) .. "]",

View File

@ -67,7 +67,7 @@ function unified_inventory.get_formspec(player, page)
pagedef.formspec_prepend and "" or "no_prepend[]",
unified_inventory.standard_background -- Background
}
formspec[4]="style_type[image_button;bgcolor="..dreambuilder_theme.form_bgcolor.."]"
formspec[4]="style_type[image_button;bgcolor="..dreambuilder_theme.btn_color.."]"
formspec[5]=
"listcolors[#00000000;"..dreambuilder_theme.listcolor_slot_bg_hover..";#00000000;"..
dreambuilder_theme.tooltip_bgcolor..";"..