home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
processing button click in a plugin
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="zombiepig" data-source="post: 59826" data-attributes="member: 12049"><p>i'm wanting to add a button to an existing screen (myvideosinfo), which when clicked runs a function from my process plugin.</p><p></p><p>at the moment the way i'm doing this is manually adding the button to the skin xml and giving it a new id (say 5555). then in the plugin Start() function i've got a line:</p><p>GUIWindowManager.Receivers += new SendMessageHandler(OnMessage);</p><p></p><p>the OnMessage function looks like this:</p><p></p><p>private void OnMessage(GUIMessage message)</p><p>{</p><p> if (message.Message == GUIMessage.MessageType.GUI_MSG_CLICKED && message.SenderControlId == 5555)</p><p> {</p><p> // run my function</p><p> }</p><p>}</p><p></p><p>is this the correct way of doing this? is there a better way?</p></blockquote><p></p>
[QUOTE="zombiepig, post: 59826, member: 12049"] i'm wanting to add a button to an existing screen (myvideosinfo), which when clicked runs a function from my process plugin. at the moment the way i'm doing this is manually adding the button to the skin xml and giving it a new id (say 5555). then in the plugin Start() function i've got a line: GUIWindowManager.Receivers += new SendMessageHandler(OnMessage); the OnMessage function looks like this: private void OnMessage(GUIMessage message) { if (message.Message == GUIMessage.MessageType.GUI_MSG_CLICKED && message.SenderControlId == 5555) { // run my function } } is this the correct way of doing this? is there a better way? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
processing button click in a plugin
Contact us
RSS
Top
Bottom