forked from your-land-mirror/yl_speak_up
rearranged buttons in manage quest steps
This commit is contained in:
parent
4bcbf8ee0a
commit
9313ef3bef
@ -247,7 +247,7 @@ yl_speak_up.get_fs_manage_quest_steps = function(player, param)
|
||||
"add_to_one_needed,add_to_all_needed;bgcolor=blue;textcolor=yellow]"..
|
||||
"container[0.1,2.7;5.6,10.8]"..
|
||||
"box[0,0;5.6,8.5;#666666]"..
|
||||
"button[4.6,0.0;0.9,0.7;add_to_one_needed;Edit]"..
|
||||
"button[4.6,0.0;0.94,0.7;add_to_one_needed;Edit]"..
|
||||
"tooltip[add_to_one_needed;Add or remove a quest step to this list.]"..
|
||||
"label[0.1,0.5;"..em("One of").." these quest steps:]")
|
||||
yl_speak_up.quest_step_show_table(formspec, "0.1,0.7;5.4,2.7;one_step_required;",
|
||||
@ -263,7 +263,7 @@ yl_speak_up.get_fs_manage_quest_steps = function(player, param)
|
||||
"to achieve this current quest step here.]")
|
||||
|
||||
table.insert(formspec, "label[0.1,4.0;"..em("All of").." these quest steps:]"..
|
||||
"button[4.6,3.5;0.9,0.7;add_to_all_needed;Edit]"..
|
||||
"button[4.6,3.5;0.94,0.7;add_to_all_needed;Edit]"..
|
||||
"tooltip[add_to_all_needed;Add or remove a quest step to this list.]")
|
||||
yl_speak_up.quest_step_show_table(formspec, "0.1,4.2;5.4,4.0;all_steps_required;",
|
||||
step_data[selected].all_steps_required or {})
|
||||
@ -279,8 +279,8 @@ yl_speak_up.get_fs_manage_quest_steps = function(player, param)
|
||||
|
||||
|
||||
-- right side (next quest step)
|
||||
table.insert(formspec, "label[24.2,2.0;Achieving this quest step]"..
|
||||
"label[24.2,2.4;"..em("helps").." the quester to:]"..
|
||||
table.insert(formspec, "label[24.4,2.0;Achieving this quest step]"..
|
||||
"label[24.4,2.4;"..em("helps").." the quester to:]"..
|
||||
"container[24.2,2.7;5.6,10.8]"..
|
||||
"box[0,0;5.6,8.5;#666666]"..
|
||||
"label[0.1,0.5;get these quest step(s) "..em("next")..":]")
|
||||
@ -302,24 +302,30 @@ yl_speak_up.get_fs_manage_quest_steps = function(player, param)
|
||||
table.insert(formspec, ";1;]")
|
||||
table.insert(formspec, "container_end[]")
|
||||
|
||||
if( (step_data[selected].one_step_required and #step_data[selected].one_step_required > 0)
|
||||
or(step_data[selected].all_steps_required and #step_data[selected].all_steps_required > 0)) then
|
||||
table.insert(formspec, "button[5.6,1.7;0.6,7.0;show_prev_step;<]")
|
||||
end
|
||||
-- add buttons for inserting steps between this and the prev/next one
|
||||
if(not(step_data[selected].one_step_required) or #step_data[selected].one_step_required <= 1) then
|
||||
table.insert(formspec,
|
||||
"button[3.0,11.3;6.0,0.6;insert_after_prev_step;"..
|
||||
"+ Insert step *before* this one]"..
|
||||
"button[5.6,8.7;0.6,2.6;insert_after_prev_step;+]"..
|
||||
"tooltip[insert_after_prev_step;"..
|
||||
"Insert a new quest step between the *previous* step\n"..
|
||||
"and the *current* (displayed here) step.\n"..
|
||||
"Note: This only makes sense if there's just one\n"..
|
||||
"Insert a new quest step between the *previous* step (shown\n"..
|
||||
"to the left) and the *current* step (shown in the middle).\n"..
|
||||
"Note: This only makes sense if there's just one or no\n"..
|
||||
" previous step.]")
|
||||
end
|
||||
if(required_for and #required_for > 0) then
|
||||
table.insert(formspec, "button[23.8,1.7;0.6,7.0;show_next_step;>]")
|
||||
end
|
||||
if(#required_for <= 1) then
|
||||
table.insert(formspec,
|
||||
"button[21.0,11.3;6.0,0.6;insert_before_next_step;"..
|
||||
"Insert step *after* this one +]"..
|
||||
"button[23.8,8.7;0.6,2.6;insert_before_next_step;+]"..
|
||||
"tooltip[insert_before_next_step;"..
|
||||
"Insert a new quest step between this, the *currently*\n"..
|
||||
"displayed step, and the *next one*.\n"..
|
||||
"displayed step (in the middle), and the *next one*\n"..
|
||||
"shown to the right.\n"..
|
||||
"Note: This only makes sense if there's just one\n"..
|
||||
" next step.]")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user