Author Topic: Animate selected text color ?  (Read 3859 times)

loukoum

  • Newbie
  • *
  • Posts: 4
    • View Profile
Animate selected text color ?
« on: July 28, 2017, 11:08:15 AM »
Hello,

I want to ùknow if it'is possible to annimate the listbox's selected color

i try this but not working :
Code: [Select]
local overlay_lb = fe.add_listbox(lbx,lby-4*ith,lbw,lbh);
overlay_lb.rows=9;
overlay_lb.align=Align.Left;
overlay_lb.selbg_alpha=0;
overlay_lb.visible=false;

fe.overlay.set_custom_controls( overlay_l, overlay_lb );

local pulse3= { when = Transition.ShowOverlay , property = "****SelectionColor*****", end = { red = 255, green = 0, blue = 50 }, start = { red = 255, green = 255, blue = 255 }, time = 250, loop=true }
animation.add( PropertyAnimation( overlay_lb, pulse3 ) );


What is the "property" of the "selected color", in a fe.listbox element ?

Thank you for reading me

bjose2345

  • Sr. Member
  • ****
  • Posts: 107
    • View Profile
Re: Animate selected text color ?
« Reply #1 on: July 28, 2017, 11:29:14 AM »
I think you cant (maybe im wrong) ... but you can use for example 2 Overlays, one overlapping the other , Overlay A with blue color and Overlay B with a red color, then only put Overlay A alpha = 255 and Overlay B = 0 (hiding one and showing another), and animated the alpha property, from Overlay A to go from 255 to 0 and Overlay B do the opposite 0 to 255 and there you go.

loukoum

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Animate selected text color ?
« Reply #2 on: July 29, 2017, 02:16:28 AM »
We can animate the "non selected" text (with color property) but not the selected text ?

It is strange  :o

I reas the source code and i don't find anything ... maybe a dev can help me ?