start drawing 'reply' buttons under items

Clicking on them doesn't do anything yet.
This commit is contained in:
Kartik K. Agaram 2023-06-21 23:28:21 -07:00
parent 4dbd3b9864
commit 91831af1c8
3 changed files with 11 additions and 1 deletions

View File

@ -7,7 +7,15 @@ load_subtree = function(filename, out, depth)
local row = cols(Inter_comment_spacing)
table.insert(row.data,
{type='rectangle', w=depth*Indent, h=0})
table.insert(row.data, item)
local item_stuff = rows()
table.insert(item_stuff.data, item)
table.insert(item_stuff.data, {
type='text', data={{data='reply'}},
margin=20,
bg=Reply_button_color,
border=Reply_button_border_color,
})
table.insert(row.data, item_stuff)
table.insert(out, row)
for i,reply_id in ipairs(item.metadata.replies) do
local reply = load_subtree(reply_id, out, depth+1)

View File

@ -0,0 +1 @@
Reply_button_border_color = {r=0.4,g=0.7,b=0.4}

1
0134-Reply_button_color Normal file
View File

@ -0,0 +1 @@
Reply_button_color = {r=0.7,g=1.0,b=0.7}