forked from Sokomine/yl_speak_up
adjusted color for trade list buttons
This commit is contained in:
parent
a1b92b7dca
commit
05ea4b90cc
@ -125,9 +125,9 @@ yl_speak_up.get_fs_trade_list = function(player, show_dialog_option_trades)
|
|||||||
anz_trades = anz_trades + 1
|
anz_trades = anz_trades + 1
|
||||||
local kstr = tostring(minetest.formspec_escape(k))
|
local kstr = tostring(minetest.formspec_escape(k))
|
||||||
local sold_out = not(npc_inv:contains_item("npc_main", buy_stack))
|
local sold_out = not(npc_inv:contains_item("npc_main", buy_stack))
|
||||||
local color = "#777777"
|
local color = "#a37e45" --"#777777"
|
||||||
if(sold_out) then
|
if(sold_out) then
|
||||||
color = "#333333"
|
color = "#663333"
|
||||||
-- still needs to contain kstr so that each button has a diffrent text
|
-- still needs to contain kstr so that each button has a diffrent text
|
||||||
kstr = "sold out "..kstr
|
kstr = "sold out "..kstr
|
||||||
end
|
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[]")
|
table.insert(formspec, "label[0,1.9;Sold out]\ncontainer_end[]")
|
||||||
else
|
else
|
||||||
-- show the price label only when the offer is in stock
|
-- 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
|
end
|
||||||
col = col + 1
|
col = col + 1
|
||||||
if(col >= yl_speak_up.trade_max_cols) then
|
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
|
-- kein edit_mode beim trade-formspec da nicht sinnvoll
|
||||||
return yl_speak_up.show_fs_decorated(pname, nil, h, alternate_text, "",
|
return yl_speak_up.show_fs_decorated(pname, nil, h, alternate_text, "",
|
||||||
table.concat(formspec, ""), nil)
|
table.concat(formspec, "\n"), nil)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user