From eabafafe17051c49bbef83f368d30aabc0368ade Mon Sep 17 00:00:00 2001 From: Sokomine Date: Thu, 21 Sep 2023 20:07:22 +0200 Subject: [PATCH] improved tooltips in manage quest steps --- fs_manage_quest_steps.lua | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/fs_manage_quest_steps.lua b/fs_manage_quest_steps.lua index 4255b16..ee1f6c5 100644 --- a/fs_manage_quest_steps.lua +++ b/fs_manage_quest_steps.lua @@ -304,29 +304,39 @@ yl_speak_up.get_fs_manage_quest_steps = function(player, param) 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;<]") + table.insert(formspec, "button[5.6,1.7;0.6,7.0;show_prev_step;<]".. + "tooltip[show_prev_step;Show the previous step according to ".. + em("your quest logic")..".\n".. + "The other "..em("< Prev").." button shows the previous step ".. + "in\n"..em("alphabetical order")..".]") 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[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 (shown\n".. - "to the left) and the *current* step (shown in the middle).\n".. + "Insert a new quest step between the "..em("previous step").. + " (shown\n".. + "to the left) and the "..em("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;>]") + table.insert(formspec, "button[23.8,1.7;0.6,7.0;show_next_step;>]".. + "tooltip[show_next_step;Show the next step according to ".. + em("your quest logic")..".\n".. + "The other "..em("Next >").." button shows the next step ".. + "in\n"..em("alphabetical order")..".]") end if(#required_for <= 1) then table.insert(formspec, "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 (in the middle), and the *next one*\n".. - "shown to the right.\n".. - "Note: This only makes sense if there's just one\n".. + "Insert a new quest step between "..em("current step").. + " (shown\nin the middle) ".. + "and the "..em("next step").." (shown to the right).\n".. + "Note: This only makes sense if there's just one or no\n".. " next step.]") end