Difference between revisions of "PlugIn Development:GameEx MAME List Update Function"

From Spesoft/GameEx Wiki
Jump to navigation Jump to search
Line 1: Line 1:
==<span style="font-size:125%; color:darkblue;">GameEx: MAME List Update Overview</span>==
This function is called when GameEx updates the MAME list.<br />The variables for <span style="color:red;">'''Update Type, MAME Rom Path, MAME EXE Path'''</span> and <span style="color:red;">'''MAME EXE'''</span> are passed down to this sub procedure when the list update is starting and ending.
This function is called when GameEx updates the MAME list.<br />The variables for <span style="color:red;">'''Update Type, MAME Rom Path, MAME EXE Path'''</span> and <span style="color:red;">'''MAME EXE'''</span> are passed down to this sub procedure when the list update is starting and ending.


==<span style="font-size:125%; color:darkblue;">Code Examples</span>==
== <span style="color:darkblue;">Code Examples</span> ==


<span style="font-size:125%; color:#003300;"><b>VB.NET syntax:</b></span>
=== <span style="font-size:125%; color:#003300;">VB.NET</span> ===
==== Enumeration ====
<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 MAME_Update
Public Enum MAME_Update
Line 10: Line 10:
     Update_End = 1
     Update_End = 1
End Enum</pre>
End Enum</pre>
 
==== Function ====
<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 Sub Event_MAMEListUpdate(ByVal Type As Integer, ByVal MAMEROMPath As String, ByVal MAMEPath As String, ByVal MAMEExe As String)
Public Sub Event_MAMEListUpdate(ByVal Type As Integer, ByVal MAMEROMPath As String, ByVal MAMEPath As String, ByVal MAMEExe As String)
Line 23: Line 23:
End Sub</pre>
End Sub</pre>


<span style="font-size:125%; color:#003300;"><b>C# syntax:</b></span>
=== <span style="color:#003300;">C#</span> ===
==== Enumeration ====
<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 MAME_Update
public enum MAME_Update
Line 30: Line 31:
     Update_End = 1,
     Update_End = 1,
}</pre>
}</pre>
 
==== Function ====
<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 void Event_MAMEListUpdate(int Type, string MAMEROMPath, string MAMEPath, string MAMEExe)
public void Event_MAMEListUpdate(int Type, string MAMEROMPath, string MAMEPath, string MAMEExe)
Line 44: Line 45:
     }
     }
}</pre>
}</pre>
 
<br />
[[Category:PlugIn Development]]
[[Category:PlugIn Development]]

Revision as of 06:31, 27 April 2014

This function is called when GameEx updates the MAME list.
The variables for Update Type, MAME Rom Path, MAME EXE Path and MAME EXE are passed down to this sub procedure when the list update is starting and ending.

Code Examples

VB.NET

Enumeration

Public Enum MAME_Update
     Update_Start = 0
     Update_End = 1
End Enum

Function

Public Sub Event_MAMEListUpdate(ByVal Type As Integer, ByVal MAMEROMPath As String, ByVal MAMEPath As String, ByVal MAMEExe As String)
     Select Case Type
        Case MAME_Update.Update_Start
           'Run some code when the list update starts!
           Exit Select
        Case MAME_Update.Update_End
           'Run some code when the list update finishes!
           Exit Select
     End Select
End Sub

C#

Enumeration

public enum MAME_Update
{
     Update_Start = 0,
     Update_End = 1,
}

Function

public void Event_MAMEListUpdate(int Type, string MAMEROMPath, string MAMEPath, string MAMEExe)
{
     switch(Type)
     {
        case MAME_Update.Update_Start:
           //Run some code when the list update starts!
           break;
	case MAME_Update.Update_End:
           //Run some code when the list update finishes!
	   break;
     }
}