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
Development
General Development (no feature request here!)
How to override default action with my own?
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="pilehave" data-source="post: 304140" data-attributes="member: 71550"><p>Hi</p><p></p><p>I have a plugin that I want to perform some of my own action instead of the default action.</p><p></p><p>Say, I catch the user pressing record. Now, instead of showing the normal "Do you wish to record", I want to give the user other options in another window.</p><p></p><p>Is there any way to let my plugin take the userinput and stop the default code from excecuting?</p><p></p><p>A small test like this one below, shows that my script is never excecuted (the log doesn't have an entry for "PowerPlay"), because there already is a function bound to the record-button of my remote:</p><p></p><p>[CODE]</p><p>public void OnAction(MediaPortal.GUI.Library.Action action)</p><p> {</p><p> switch (action.wID)</p><p> {</p><p> case MediaPortal.GUI.Library.Action.ActionType.ACTION_RECORD:</p><p> //stopRecordingDialog();</p><p> Log.Info("PowerPlay - user pressed record");</p><p> break;</p><p> }</p><p> }</p><p>[/CODE]</p><p></p><p>What I would like to do is to override the play, record and stop-button in the fullscreen-tv window. That's all <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>I have the code behind these three buttons working, but right now I can only map them to keys on my keyboard that is not being used, or buttons on my remote that is also not being used. Not very userfriendly of me to release the plugin like that <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /></p></blockquote><p></p>
[QUOTE="pilehave, post: 304140, member: 71550"] Hi I have a plugin that I want to perform some of my own action instead of the default action. Say, I catch the user pressing record. Now, instead of showing the normal "Do you wish to record", I want to give the user other options in another window. Is there any way to let my plugin take the userinput and stop the default code from excecuting? A small test like this one below, shows that my script is never excecuted (the log doesn't have an entry for "PowerPlay"), because there already is a function bound to the record-button of my remote: [CODE] public void OnAction(MediaPortal.GUI.Library.Action action) { switch (action.wID) { case MediaPortal.GUI.Library.Action.ActionType.ACTION_RECORD: //stopRecordingDialog(); Log.Info("PowerPlay - user pressed record"); break; } } [/CODE] What I would like to do is to override the play, record and stop-button in the fullscreen-tv window. That's all :) I have the code behind these three buttons working, but right now I can only map them to keys on my keyboard that is not being used, or buttons on my remote that is also not being used. Not very userfriendly of me to release the plugin like that ;) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
How to override default action with my own?
Contact us
RSS
Top
Bottom