1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-29 06:40:37 +02:00

cache on/off button image refs and commonly-used label for same

This commit is contained in:
Vanessa Ezekowitz
2017-04-11 18:52:39 -04:00
parent a7c3908b61
commit 5e26aa5f91
5 changed files with 23 additions and 12 deletions

View File

@ -27,10 +27,10 @@ local function update_chest_formspec(pos)
"image_button[0,4.3;1,0.6",
"splitstacks",
{
{text="", texture="pipeworks_button_off.png", addopts="false;false;pipeworks_button_interm.png"},
{text="", texture="pipeworks_button_on.png", addopts="false;false;pipeworks_button_interm.png"}
pipeworks.button_off,
pipeworks.button_on
}
).."label[0.9,4.31;Allow splitting incoming stacks from tubes]"
)..pipeworks.button_label
meta:set_string("formspec", formspec)
end
@ -94,10 +94,10 @@ local function setup_locked_formspec(pos, meta)
"image_button[0,4.3;1,0.6",
"splitstacks",
{
{text="", texture="pipeworks_button_off.png", addopts="false;false;pipeworks_button_interm.png"},
{text="", texture="pipeworks_button_on.png", addopts="false;false;pipeworks_button_interm.png"}
pipeworks.button_off,
pipeworks.button_on
}
).."label[0.9,4.31;Allow splitting incoming stacks from tubes]"
)..pipeworks.button_label
)
end