PlugIn Development:GameEx Input MCE Remote Function: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 9: | Line 9: | ||
=== <span style="color:#003300;">VB.NET</span> === | === <span style="color:#003300;">VB.NET</span> === | ||
---- | ---- | ||
==== Enumerations ==== | ==== <span style="color:purple;">Enumerations</span> ==== | ||
===== Key Enumeration ===== | ===== <span style="color:orange;">Key Enumeration</span> ===== | ||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | ||
Public Enum MCE_Remote_Key | Public Enum MCE_Remote_Key | ||
| Line 31: | Line 31: | ||
MCEButton_Number0_2 = 58 | MCEButton_Number0_2 = 58 | ||
End Enum</pre> | End Enum</pre> | ||
===== Command Enumeration ===== | ===== <span style="color:orange;">Command Enumeration</span> ===== | ||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | ||
Public Enum MCE_Remote_Command | Public Enum MCE_Remote_Command | ||
| Line 46: | Line 46: | ||
MCEButton_ChannelDown = 271843328 | MCEButton_ChannelDown = 271843328 | ||
End Enum</pre> | End Enum</pre> | ||
===== Raw Enumeration ===== | ===== <span style="color:orange;">Raw Enumeration</span> ===== | ||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | ||
Public Enum MCE_Remote_Raw | Public Enum MCE_Remote_Raw | ||
| Line 67: | Line 67: | ||
MCEButton_VolumeDown = 234 | MCEButton_VolumeDown = 234 | ||
End Enum</pre> | End Enum</pre> | ||
==== Function ==== | ==== <span style="color:purple;">Function</span> ==== | ||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;"> | ||
Public Function Input_MCERemote(ByVal Key As Integer, ByVal Command As Integer, ByVal Raw As Integer) As Boolean | Public Function Input_MCERemote(ByVal Key As Integer, ByVal Command As Integer, ByVal Raw As Integer) As Boolean | ||
| Line 174: | Line 174: | ||
=== <span style="color:#003300;">C#</span> === | === <span style="color:#003300;">C#</span> === | ||
---- | ---- | ||
==== Enumerations ==== | ==== <span style="color:purple;">Enumerations</span> ==== | ||
===== Key Enumeration ===== | ===== <span style="color:orange;">Key Enumeration</span> ===== | ||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | ||
public enum MCE_Remote_Key : uint | public enum MCE_Remote_Key : uint | ||
| Line 197: | Line 197: | ||
MCEButton_Number0_2 = 58, | MCEButton_Number0_2 = 58, | ||
}</pre> | }</pre> | ||
===== Command Enumeration ===== | ===== <span style="color:orange;">Command Enumeration</span> ===== | ||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | ||
public enum MCE_Remote_Command : uint | public enum MCE_Remote_Command : uint | ||
| Line 213: | Line 213: | ||
MCEButton_ChannelDown = 271843328, | MCEButton_ChannelDown = 271843328, | ||
}</pre> | }</pre> | ||
===== Raw Enumeration ===== | ===== <span style="color:orange;">Raw Enumeration</span> ===== | ||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:dashed;"> | ||
public enum MCE_Remote_Raw : uint | public enum MCE_Remote_Raw : uint | ||
| Line 235: | Line 235: | ||
MCEButton_VolumeDown = 234, | MCEButton_VolumeDown = 234, | ||
}</pre> | }</pre> | ||
==== Function ==== | ==== <span style="color:purple;">Function</span> ==== | ||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;"> | ||
public bool Input_MCERemote(uint Key, uint Command, uint Raw) | public bool Input_MCERemote(uint Key, uint Command, uint Raw) | ||
Revision as of 06:51, 27 April 2014
This function is called when you press a button on the MCE remote.
You can return TRUE to continue processing the event or return FALSE and GameEx will not initialize the event.
The Key, Command, and Raw parameters are passed to this function as the user presses a remote button.
PLEASE NOTE: This function only fires when the GameEx UI is visible.
Code Examples
VB.NET
Enumerations
Key Enumeration
Public Enum MCE_Remote_Key
MCEButton_OK = 13
MCEButton_Clear = 27
MCEButton_MoveLeft = 37
MCEButton_MoveUp = 38
MCEButton_MoveRight = 39
MCEButton_MoveDown = 40
MCEButton_Number0 = 48
MCEButton_Number1 = 49
MCEButton_Number2 = 50
MCEButton_Number3 = 51
MCEButton_Number4 = 52
MCEButton_Number5 = 53
MCEButton_Number6 = 54
MCEButton_Number7 = 55
MCEButton_Number8 = 56
MCEButton_Number9 = 57
MCEButton_Number0_2 = 58
End Enum
Command Enumeration
Public Enum MCE_Remote_Command
MCEButton_Back = 65536
MCEButton_Skip = 720896
MCEButton_Replay = 786432
MCEButton_Stop = 851968
MCEButton_Play = 271450112
MCEButton_Pause = 271515648
MCEButton_Record = 271581184
MCEButton_Forward = 271646720
MCEButton_Rewind = 271712256
MCEButton_ChannelUp = 271777792
MCEButton_ChannelDown = 271843328
End Enum
Raw Enumeration
Public Enum MCE_Remote_Raw
MCEButton_MoreInfo = 9
MCEButton_DVDMenu = 36
MCEButton_LiveTV = 37
MCEButton_MyTV = 70
MCEButton_MyMusic = 71
MCEButton_RecordedTV = 72
MCEButton_MyPictures = 73
MCEButton_MyVideos = 74
MCEButton_DVDAngle = 75
MCEButton_DVDAudio = 76
MCEButton_DVDSubtitle = 77
MCEButton_OEM1 = 128
MCEButton_OEM2 = 129
MCEButton_Guide = 141
MCEButton_Mute = 226
MCEButton_VolumeUp = 233
MCEButton_VolumeDown = 234
End Enum
Function
Public Function Input_MCERemote(ByVal Key As Integer, ByVal Command As Integer, ByVal Raw As Integer) As Boolean
Select Case Key
Case MCE_Remote_Key.MCEButton_OK
Exit Select
Case MCE_Remote_Key.MCEButton_Clear
Exit Select
Case MCE_Remote_Key.MCEButton_MoveLeft
Exit Select
Case MCE_Remote_Key.MCEButton_MoveUp
Exit Select
Case MCE_Remote_Key.MCEButton_MoveRight
Exit Select
Case MCE_Remote_Key.MCEButton_MoveDown
Exit Select
Case MCE_Remote_Key.MCEButton_Number0
Exit Select
Case MCE_Remote_Key.MCEButton_Number1
Exit Select
Case MCE_Remote_Key.MCEButton_Number2
Exit Select
Case MCE_Remote_Key.MCEButton_Number3
Exit Select
Case MCE_Remote_Key.MCEButton_Number4
Exit Select
Case MCE_Remote_Key.MCEButton_Number5
Exit Select
Case MCE_Remote_Key.MCEButton_Number6
Exit Select
Case MCE_Remote_Key.MCEButton_Number7
Exit Select
Case MCE_Remote_Key.MCEButton_Number8
Exit Select
Case MCE_Remote_Key.MCEButton_Number9
Exit Select
Case MCE_Remote_Key.MCEButton_Number0_2
Exit Select
End Select
Select Case Command
Case MCE_Remote_Command.MCEButton_Back
Exit Select
Case MCE_Remote_Command.MCEButton_Skip
Exit Select
Case MCE_Remote_Command.MCEButton_Replay
Exit Select
Case MCE_Remote_Command.MCEButton_Stop
Exit Select
Case MCE_Remote_Command.MCEButton_Play
Exit Select
Case MCE_Remote_Command.MCEButton_Pause
Exit Select
Case MCE_Remote_Command.MCEButton_Record
Exit Select
Case MCE_Remote_Command.MCEButton_Forward
Exit Select
Case MCE_Remote_Command.MCEButton_Rewind
Exit Select
Case MCE_Remote_Command.MCEButton_ChannelUp
Exit Select
Case MCE_Remote_Command.MCEButton_ChannelDown
Exit Select
End Select
Select Case Raw
Case MCE_Remote_Raw.MCEButton_MoreInfo
Exit Select
Case MCE_Remote_Raw.MCEButton_DVDMenu
Exit Select
Case MCE_Remote_Raw.MCEButton_LiveTV
Exit Select
Case MCE_Remote_Raw.MCEButton_MyTV
Exit Select
Case MCE_Remote_Raw.MCEButton_MyMusic
Exit Select
Case MCE_Remote_Raw.MCEButton_RecordedTV
Exit Select
Case MCE_Remote_Raw.MCEButton_MyPictures
Exit Select
Case MCE_Remote_Raw.MCEButton_MyVideos
Exit Select
Case MCE_Remote_Raw.MCEButton_DVDAngle
Exit Select
Case MCE_Remote_Raw.MCEButton_DVDAudio
Exit Select
Case MCE_Remote_Raw.MCEButton_DVDSubtitle
Exit Select
Case MCE_Remote_Raw.MCEButton_OEM1
Exit Select
Case MCE_Remote_Raw.MCEButton_OEM2
Exit Select
Case MCE_Remote_Raw.MCEButton_Guide
Exit Select
Case MCE_Remote_Raw.MCEButton_Mute
Exit Select
Case MCE_Remote_Raw.MCEButton_VolumeUp
Exit Select
Case MCE_Remote_Raw.MCEButton_VolumeDown
Exit Select
End Select
Return True
End Function
C#
Enumerations
Key Enumeration
public enum MCE_Remote_Key : uint
{
MCEButton_OK = 13,
MCEButton_Clear = 27,
MCEButton_MoveLeft = 37,
MCEButton_MoveUp = 38,
MCEButton_MoveRight = 39,
MCEButton_MoveDown = 40,
MCEButton_Number0 = 48,
MCEButton_Number1 = 49,
MCEButton_Number2 = 50,
MCEButton_Number3 = 51,
MCEButton_Number4 = 52,
MCEButton_Number5 = 53,
MCEButton_Number6 = 54,
MCEButton_Number7 = 55,
MCEButton_Number8 = 56,
MCEButton_Number9 = 57,
MCEButton_Number0_2 = 58,
}
Command Enumeration
public enum MCE_Remote_Command : uint
{
MCEButton_Back = 65536,
MCEButton_Skip = 720896,
MCEButton_Replay = 786432,
MCEButton_Stop = 851968,
MCEButton_Play = 271450112,
MCEButton_Pause = 271515648,
MCEButton_Record = 271581184,
MCEButton_Forward = 271646720,
MCEButton_Rewind = 271712256,
MCEButton_ChannelUp = 271777792,
MCEButton_ChannelDown = 271843328,
}
Raw Enumeration
public enum MCE_Remote_Raw : uint
{
MCEButton_MoreInfo = 9,
MCEButton_DVDMenu = 36,
MCEButton_LiveTV = 37,
MCEButton_MyTV = 70,
MCEButton_MyMusic = 71,
MCEButton_RecordedTV = 72,
MCEButton_MyPictures = 73,
MCEButton_MyVideos = 74,
MCEButton_DVDAngle = 75,
MCEButton_DVDAudio = 76,
MCEButton_DVDSubtitle = 77,
MCEButton_OEM1 = 128,
MCEButton_OEM2 = 129,
MCEButton_Guide = 141,
MCEButton_Mute = 226,
MCEButton_VolumeUp = 233,
MCEButton_VolumeDown = 234,
}
Function
public bool Input_MCERemote(uint Key, uint Command, uint Raw)
{
switch (Key)
{
case (uint) MCE_Remote_Key.MCEButton_OK:
break;
case (uint) MCE_Remote_Key.MCEButton_Clear:
break;
case (uint) MCE_Remote_Key.MCEButton_MoveLeft:
break;
case (uint) MCE_Remote_Key.MCEButton_MoveUp:
break;
case (uint) MCE_Remote_Key.MCEButton_MoveRight:
break;
case (uint) MCE_Remote_Key.MCEButton_MoveDown:
break;
case (uint) MCE_Remote_Key.MCEButton_Number0:
break;
case (uint) MCE_Remote_Key.MCEButton_Number1:
break;
case (uint) MCE_Remote_Key.MCEButton_Number2:
break;
case (uint) MCE_Remote_Key.MCEButton_Number3:
break;
case (uint) MCE_Remote_Key.MCEButton_Number4:
break;
case (uint) MCE_Remote_Key.MCEButton_Number5:
break;
case (uint) MCE_Remote_Key.MCEButton_Number6:
break;
case (uint) MCE_Remote_Key.MCEButton_Number7:
break;
case (uint) MCE_Remote_Key.MCEButton_Number8:
break;
case (uint) MCE_Remote_Key.MCEButton_Number9:
break;
case (uint) MCE_Remote_Key.MCEButton_Number0_2:
break;
}
switch(Command)
{
case (uint) MCE_Remote_Command.MCEButton_Back:
break;
case (uint) MCE_Remote_Command.MCEButton_Skip:
break;
case (uint) MCE_Remote_Command.MCEButton_Replay:
break;
case (uint) MCE_Remote_Command.MCEButton_Stop:
break;
case (uint) MCE_Remote_Command.MCEButton_Play:
break;
case (uint) MCE_Remote_Command.MCEButton_Pause:
break;
case (uint) MCE_Remote_Command.MCEButton_Record:
break;
case (uint) MCE_Remote_Command.MCEButton_Forward:
break;
case (uint) MCE_Remote_Command.MCEButton_Rewind:
break;
case (uint) MCE_Remote_Command.MCEButton_ChannelUp:
break;
case (uint) MCE_Remote_Command.MCEButton_ChannelDown:
break;
}
switch(Raw)
{
case (uint) MCE_Remote_Raw.MCEButton_MoreInfo:
break;
case (uint) MCE_Remote_Raw.MCEButton_DVDMenu:
break;
case (uint) MCE_Remote_Raw.MCEButton_LiveTV:
break;
case (uint) MCE_Remote_Raw.MCEButton_MyTV:
break;
case (uint) MCE_Remote_Raw.MCEButton_MyMusic:
break;
case (uint) MCE_Remote_Raw.MCEButton_RecordedTV:
break;
case (uint) MCE_Remote_Raw.MCEButton_MyPictures:
break;
case (uint) MCE_Remote_Raw.MCEButton_MyVideos:
break;
case (uint) MCE_Remote_Raw.MCEButton_DVDAngle:
break;
case (uint) MCE_Remote_Raw.MCEButton_DVDAudio:
break;
case (uint) MCE_Remote_Raw.MCEButton_DVDSubtitle:
break;
case (uint) MCE_Remote_Raw.MCEButton_OEM1:
break;
case (uint) MCE_Remote_Raw.MCEButton_OEM2:
break;
case (uint) MCE_Remote_Raw.MCEButton_Guide:
break;
case (uint) MCE_Remote_Raw.MCEButton_Mute:
break;
case (uint) MCE_Remote_Raw.MCEButton_VolumeUp:
break;
case (uint) MCE_Remote_Raw.MCEButton_VolumeDown:
break;
}
return true;
}