From 971aedd2d07f5cf81fd4a14c9392a1f99efc195c Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 4 Mar 2021 10:29:28 -0500 Subject: [PATCH] fix some buttons not getting the right main color (especially in UI bags... ew. can't believe I missed that!) --- mods/default/init.lua | 8 ++++---- .../customize-dreambuilder-game.sh | 14 +++++++++----- mods/unified_inventory/bags.lua | 1 + mods/unified_inventory/internal.lua | 2 +- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/mods/default/init.lua b/mods/default/init.lua index a1e10b19..3bd0ac49 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -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) diff --git a/mods/dreambuilder_extras/customize-dreambuilder-game.sh b/mods/dreambuilder_extras/customize-dreambuilder-game.sh index 8ffcd7d3..82274aa9 100755 --- a/mods/dreambuilder_extras/customize-dreambuilder-game.sh +++ b/mods/dreambuilder_extras/customize-dreambuilder-game.sh @@ -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" \ diff --git a/mods/unified_inventory/bags.lua b/mods/unified_inventory/bags.lua index ed4f1140..cb3ee45c 100644 --- a/mods/unified_inventory/bags.lua +++ b/mods/unified_inventory/bags.lua @@ -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)) .. "]", diff --git a/mods/unified_inventory/internal.lua b/mods/unified_inventory/internal.lua index 4ccf2aed..993a139e 100644 --- a/mods/unified_inventory/internal.lua +++ b/mods/unified_inventory/internal.lua @@ -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..";"..