marc2003: I am trying to incorporate the buttons you gave me into the similar script. No problem with the buttons that paints the same for every lastfm_mode. (I made vars that change the function of them)
you told me to use "b.buttons.name.x =" in on_paint for panel size dependent buttons. Is it bad to just use b.update() there? You used that in your tutorial and it seems to work here as well?
Would you use if statements for the buttons that change depending on li.lastfm_mode? I am trying with that, but if I use your method in "on_size" I get messages that buttons don't exist if I am in another mode, and if I just use b.update() the buttons doesn't update when I change lastfm_mode...
Then I placed text here: I would want it to be clickable, and I also wonder how I could get the header...
function on_paint(gr) {
p.draw_background(gr);
p.right_text(gr,"("+header+")", gdi.Font("Segoe UI", 8,0), p.textcolour_hl, 80, -3, b.w, 24);
I tried with this:
if (li.lastfm_mode == 0) {header = artist;}
else if (li.lastfm_mode == 1) {header = album;}
else if (li.lastfm_mode == 3) {header = "title";}
Both inside the b.update function and above it (of course defining artist and so on above it) but neither way gives correctly updated info to on_paint...