Summary of plugin methods? (1 Viewer)

jmbillings

MP Donator
  • Premium Supporter
  • June 9, 2008
    128
    20
    Ely
    Home Country
    United Kingdom United Kingdom
    I wonder if anyone can give brief overview of some of the plugin methods? I'm trying to force my background image to display before my plugin makes it's network calls (i.e. if I was making a winforms app, I'm looking for the equivalent of DoEvents() :))

    The plugin has methods like OnPageLoad, OnInit, OnDeInit etc- what's the lifecycle of all these? I'm thinking in a similar vein to the Android activity lifecycle

    The controls themselves seem to offer things like Refresh, Render, DoRender, DoUpdate... these all sound sort of similar, what are the differences?

    Any pointers appreciated :)
     
    Last edited:

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    For any long lasting work (more than 1ms) you should use a worker thread so you arent blocking the render/main thread.
     

    jmbillings

    MP Donator
  • Premium Supporter
  • June 9, 2008
    128
    20
    Ely
    Home Country
    United Kingdom United Kingdom
    Yeah, I'm already using OpenReadAsync which I assumed wouldn't block the UI thread?
     

    jmbillings

    MP Donator
  • Premium Supporter
  • June 9, 2008
    128
    20
    Ely
    Home Country
    United Kingdom United Kingdom
    Hmm, think maybe it's not a blocking issue actually. If I comment out my download code the problem persists.
    I basically want my plugin screen to be black on entry; so in my skin, I have the following:

    <control>
    <description>image</description>
    <type>image</type>
    <id>3</id>
    <posX>0</posX>
    <posY>0</posY>
    <width>1920</width>
    <height>1080</height>
    <texture>black.jpg</texture>
    </control>

    When the plugin loads though, the default skin wallpaper is still visible. What am I missing? Is there an easier way to accomplish this?
     

    Users who are viewing this thread

    Top Bottom