• AVR Freaks

Hot!Draw once on screen switch?

Author
mjolhe01
Starting Member
  • Total Posts : 16
  • Reward points : 0
  • Joined: 2019/08/28 08:00:56
  • Location: 0
  • Status: offline
2020/01/28 10:18:34 (permalink)
0

Draw once on screen switch?

I have a background image I would like to draw once when a screen is accessed. It works fine when I initially load into the screen, but when I switch to other screens and go back using laContext_SetActiveScreen, the image does not redraw. Feels like there should be a simple way to do this?
 
Thanks!
#1

2 Replies Related Threads

    KTrenholm
    Super Member
    • Total Posts : 783
    • Reward points : 0
    • Joined: 2012/08/08 14:04:23
    • Location: Connecticut, USA
    • Status: offline
    Re: Draw once on screen switch? 2020/01/28 10:33:59 (permalink)
    0
    Assuming you're using Harmony v3:
     
    Do you have the "Persistent" property set for the screen in Graphics Composer?
    Assuming you're using an image widget, you could also try re-writing the image to the widget after switching screens using laImageWidget_SetImage()
    post edited by KTrenholm - 2020/01/28 10:48:17
    #2
    mjolhe01
    Starting Member
    • Total Posts : 16
    • Reward points : 0
    • Joined: 2019/08/28 08:00:56
    • Location: 0
    • Status: offline
    Re: Draw once on screen switch? 2020/01/28 11:12:45 (permalink)
    0
    The persistent property is set, the screen took too long to load when it wasn't. Also, I have some dynamic text fields that got wiped out when this wasn't set. I tried to store and reload them manually, but that also caused some issues unless I put in a delay to reload the value. 
     
    Unfortunately, the laImageWidget_SetImage() did not work for this case. For what it's worth it looks like it just falls through this function call because img->image == imgAst, presumable since the widget persists. 
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5