How to capture Event? (1 Viewer)

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Hi All,

    Seems obvious, but I would like to capture an event for MP that would trigger my small process plugin to show a Dialog. I am setting up a small Help Plugin, that takes WIndowId and ControlId and shows some text from an XML file.

    But: How to activate the "blody" thing, I still do not know :mad:
     

    samuel337

    Portal Pro
    August 25, 2004
    772
    0
    Melbourne, Australia
    IIRC, add an event handler to the appropriate delegate in the MediaPortal.GUI.Library.GUIGraphicsContext class, either Receivers (for messages) or OnNewAction (for actions).

    I think you should listen in for messages; there's a GUI_WINDOW_INIT message that gets sent everytime the window changes.

    Sam
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    samuel337: Thanks for the info, after searching around I found the way to listen to onAction and check for keys. But adding new events (for the mapper to use) would mean changing the core, I guess.
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Hi mPod,

    It was related to the help plugin I mad (accidentally deleted thread). So I wanted a global action message saying "HELP_NEEDED" so that people can map it to any key / remote etc. But that can come in time. I now found a way to capture the key events (onAction) and I now use the ? key to show help.
     

    mPod

    Portal Pro
    January 26, 2005
    2,084
    3
    Berlin
    Home Country
    Germany Germany
    Well, if you want I could add an "ACTION_DISPLAY_HELP" action... But if it's not needed i won't do that, of course... ;)
     

    Users who are viewing this thread

    Top Bottom