Page 1 of 1

loveframes column list selecting

Posted: Tue Oct 01, 2019 8:34 am
by Coder567
Hi
Does anyone know how to use loveframes column list selecting? I can't figure out how to get the column user clicks.
In below code I'm printing the row variables but no row index there

Code: Select all

list.OnRowSelected = function(parent, row, data)
  
    for k, v in ipairs(data) do
        print("Column " ..k.. ": " ..v)
    end
    
    for k, v in pairs(row) do
      if type(v) == "number" then
        print("row " ..k.. ": " ..v)
        end
    end
    
end
i tried already looking in the loveframes doc but there's no info about index


Also is it possible to change the color of the text on specific field in the list?


thanks!

Re: loveframes column list selecting

Posted: Tue Oct 01, 2019 2:46 pm
by monolifed
https://github.com/linux-man/LoveFrames ... t.lua#L562
it doesn't pass index k to onrowselected. You might do this:

Code: Select all

onrowselected(self, row, row:GetColumnData(), k)
You might try using love's colored texts:

Code: Select all

text = {{1,0,0}, "red text"}

Re: loveframes column list selecting

Posted: Tue Oct 01, 2019 3:31 pm
by Coder567
ingsoc451 wrote: Tue Oct 01, 2019 2:46 pm https://github.com/linux-man/LoveFrames ... t.lua#L562
it doesn't pass index k to onrowselected. You might do this:

Code: Select all

onrowselected(self, row, row:GetColumnData(), k)
You might try using love's colored texts:

Code: Select all

text = {{1,0,0}, "red text"}
i don't get how that onrowselected works..

tried the color but didn't work

thanks

Re: loveframes column list selecting

Posted: Wed Oct 02, 2019 11:03 am
by Coder567
I read from somewhere that loveframes is no longer maintained? could it be this isn't fully featured?