LCARSx32 / Main-LCARS-x32-Project

http://www.lcarsx32.com
Other
27 stars 10 forks source link

Proposed code change for LCARSbuttonsClass.Flash() #4

Closed DenKomm closed 8 years ago

DenKomm commented 8 years ago

Suggested code change to handle unwanted button state when using LCARSbuttons for other applications.

In this case, button gets stuck in "dim" state when LCARSbuttonsClass.Flash() is set to false during dim state. This is due to "isFlashing" never being reset out of "True" (ie, when the button is "dim") and the Button refresh specifically has "If isLit XOR isFlashing" for determining redraw state.

When isFlashing is null or false, the isLit state then determines button draw state of "dim" or not.

Surak256 commented 8 years ago

Thanks for finding this. There's a few other issues with that code that I hadn't noticed before. I'll merge in your change, then fix the other problems.