From d2be730b7a0c3f97a7c3f83bd3f91be9d947bb0e Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Thu, 30 May 2019 18:22:33 +0100 Subject: [PATCH] Task list made simpler --- modules/gui/task-list.lua | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/modules/gui/task-list.lua b/modules/gui/task-list.lua index 2c1a8dcd..e61eca3d 100644 --- a/modules/gui/task-list.lua +++ b/modules/gui/task-list.lua @@ -183,14 +183,8 @@ function generate_task(player,element,task_id) local task_area = element[task_id] if not task_area then -- label to show the task number - local top_align = element.add{ + element.add{ name='count-'..task_id, - type='flow' - } - top_align.style.vertical_align = 'top' - top_align.style.vertically_stretchable = true - top_align.add{ - name='label', type='label', caption=task_number..')' } @@ -202,14 +196,11 @@ function generate_task(player,element,task_id) type='flow', } Gui.set_padding(task_area) - task_area.style.vertical_align = 'top' -- if the player can edit then it adds the edit and delete button if player_allowed_edit(player) then local flow = Gui.create_right_align(element,'edit-'..task_id) flow.caption = task_id - flow.style.vertical_align = 'top' - flow.style.vertically_stretchable = true edit_task(flow) discard_task(flow) @@ -218,7 +209,7 @@ function generate_task(player,element,task_id) end -- update the number indexes and the current editing players - element['count-'..task_id].label.caption = task_number..')' + element['count-'..task_id].caption = task_number..')' if element['edit-'..task_id] then local players = table_keys(details.editing) if #players > 0 then @@ -357,7 +348,8 @@ local function generate_container(player,element) name='table', type='table', column_count=col_count, - draw_horizontal_lines=true + draw_horizontal_lines=true, + vertical_centering=false } Gui.set_padding(flow_table) flow_table.style.horizontally_stretchable = true