adjusted color for trade list buttons

This commit is contained in:
Sokomine 2022-04-14 19:34:47 +02:00
parent a1b92b7dca
commit 05ea4b90cc

View File

@ -125,9 +125,9 @@ yl_speak_up.get_fs_trade_list = function(player, show_dialog_option_trades)
anz_trades = anz_trades + 1
local kstr = tostring(minetest.formspec_escape(k))
local sold_out = not(npc_inv:contains_item("npc_main", buy_stack))
local color = "#777777"
local color = "#a37e45" --"#777777"
if(sold_out) then
color = "#333333"
color = "#663333"
-- still needs to contain kstr so that each button has a diffrent text
kstr = "sold out "..kstr
end
@ -146,7 +146,8 @@ yl_speak_up.get_fs_trade_list = function(player, show_dialog_option_trades)
table.insert(formspec, "label[0,1.9;Sold out]\ncontainer_end[]")
else
-- show the price label only when the offer is in stock
table.insert(formspec, "label[0,4.4;Price:]\ncontainer_end[]")
table.insert(formspec, "label[0,1.9;->]"..
"label[0,4.4;Price:]\ncontainer_end[]")
end
col = col + 1
if(col >= yl_speak_up.trade_max_cols) then
@ -205,5 +206,5 @@ yl_speak_up.get_fs_trade_list = function(player, show_dialog_option_trades)
-- kein edit_mode beim trade-formspec da nicht sinnvoll
return yl_speak_up.show_fs_decorated(pname, nil, h, alternate_text, "",
table.concat(formspec, ""), nil)
table.concat(formspec, "\n"), nil)
end