mirror of
git://repo.or.cz/minetest_schemedit.git
synced 2025-01-09 09:30:32 +01:00
Tweak slice edit buttons
This commit is contained in:
parent
6f8a575786
commit
0240a09800
13
init.lua
13
init.lua
@ -562,9 +562,9 @@ schemedit.add_form("slice", {
|
|||||||
|
|
||||||
if self.panel_add or self.panel_edit then
|
if self.panel_add or self.panel_edit then
|
||||||
local ypos_default, prob_default = "", ""
|
local ypos_default, prob_default = "", ""
|
||||||
local done_button = "button[5,7.18;2,1;done_add;"..F(S("Done")).."]"
|
local done_button = "button[5,7.18;2,1;done_add;"..F(S("Add")).."]"
|
||||||
if self.panel_edit then
|
if self.panel_edit then
|
||||||
done_button = "button[5,7.18;2,1;done_edit;"..F(S("Done")).."]"
|
done_button = "button[5,7.18;2,1;done_edit;"..F(S("Apply")).."]"
|
||||||
if slice_list[self.selected] then
|
if slice_list[self.selected] then
|
||||||
ypos_default = slice_list[self.selected].ypos
|
ypos_default = slice_list[self.selected].ypos
|
||||||
prob_default = slice_list[self.selected].prob
|
prob_default = slice_list[self.selected].prob
|
||||||
@ -580,7 +580,11 @@ schemedit.add_form("slice", {
|
|||||||
end
|
end
|
||||||
|
|
||||||
if not self.panel_edit then
|
if not self.panel_edit then
|
||||||
form = form.."button[0,6;2.4,1;add;"..F(S("Add slice")).."]"
|
if self.panel_add then
|
||||||
|
form = form.."button[0,6;2.4,1;add;"..F(S("Cancel")).."]"
|
||||||
|
else
|
||||||
|
form = form.."button[0,6;2.4,1;add;"..F(S("Add slice")).."]"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if slices ~= "" and self.selected and not self.panel_add then
|
if slices ~= "" and self.selected and not self.panel_add then
|
||||||
@ -591,8 +595,7 @@ schemedit.add_form("slice", {
|
|||||||
]]
|
]]
|
||||||
else
|
else
|
||||||
form = form..[[
|
form = form..[[
|
||||||
button[2.4,6;2.4,1;remove;]]..F(S("Remove slice"))..[[]
|
button[4.8,6;2.4,1;edit;]]..F(S("Back"))..[[]
|
||||||
button[4.8,6;2.4,1;edit;]]..F(S("Edit slice"))..[[]
|
|
||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user