scrollbar finetuning

This commit is contained in:
Sokomine 2023-10-02 04:04:47 +02:00
parent 53c9318cd4
commit 3c4f5bd3ea

View File

@ -400,16 +400,16 @@ yl_speak_up.get_fs_manage_quest_steps = function(player, param)
table.insert(formspec, tostring(c)) table.insert(formspec, tostring(c))
table.insert(formspec, " ways) by:]") table.insert(formspec, " ways) by:]")
table.insert(formspec, "scrollbaroptions[max=") table.insert(formspec, "scrollbaroptions[max=")
table.insert(formspec, tostring((c-1) * 30)) -- 10 units for default 0.1 scroll factor table.insert(formspec, tostring((c-1.5) * 30)) -- 10 units for default 0.1 scroll factor
table.insert(formspec, ";thumbsize=15") table.insert(formspec, ";thumbsize=15")
table.insert(formspec, "]") table.insert(formspec, "]")
table.insert(formspec, "scrollbar[23.2,4.7;0.3,4;vertical;scrollbar_where;0.1]") table.insert(formspec, "scrollbar[23.2,4.7;0.3,5;vertical;scrollbar_where;0.1]")
elseif(c == 1) then elseif(c == 1) then
table.insert(formspec, "label[6.2,4.5;This quest step can be set by:]") table.insert(formspec, "label[6.2,4.5;This quest step can be set by:]")
else else
table.insert(formspec, "label[6.2,4.5;This quest step cannot be set yet.]") table.insert(formspec, "label[6.2,4.5;This quest step cannot be set yet.]")
end end
table.insert(formspec, "scroll_container[6.2,4.7;17,4;scrollbar_where;vertical;]") table.insert(formspec, "scroll_container[6.2,4.7;17,5;scrollbar_where;vertical;]")
c = 0 c = 0
for where_id, d in pairs(step_data[selected].where or {}) do for where_id, d in pairs(step_data[selected].where or {}) do
table.insert(formspec, "container[0,") table.insert(formspec, "container[0,")