|
From: <che...@us...> - 2007-05-24 16:57:10
|
Revision: 426
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=426&view=rev
Author: chef_koch
Date: 2007-05-24 09:57:05 -0700 (Thu, 24 May 2007)
Log Message:
-----------
updated source of simomsay to v0.4, released already a few weeks ago
Modified Paths:
--------------
trunk/plugins/MySimon/Source/SimonSay/MySimon.cs
trunk/plugins/MySimon/Source/SimonSay/MySimon.csproj
trunk/plugins/MySimon/Source/SimonSay.sln
trunk/plugins/MySimon/Source/SimonSay.suo
trunk/plugins/MySimon/readme.txt
Modified: trunk/plugins/MySimon/Source/SimonSay/MySimon.cs
===================================================================
--- trunk/plugins/MySimon/Source/SimonSay/MySimon.cs 2007-05-24 16:36:32 UTC (rev 425)
+++ trunk/plugins/MySimon/Source/SimonSay/MySimon.cs 2007-05-24 16:57:05 UTC (rev 426)
@@ -31,9 +31,11 @@
using MediaPortal.Dialogs;
using MediaPortal.Util;
using MediaPortal.Utils;
+using MediaPortal.Configuration;
namespace MediaPortal.GUI.MySimon
{
+ [PluginIcons("MySimon.simon.png", "MySimon.simonDisabled.png")]
public class MySimonGUI : GUIWindow , ISetupForm
{
#region SkinControl
@@ -63,6 +65,8 @@
int round = 0;
int cnt = 0;
+ bool test = true;
+
private static OnActionHandler ah;
private System.Windows.Forms.Timer _Game = new System.Windows.Forms.Timer();
@@ -177,7 +181,7 @@
{
switch (action.wID)
{
- //normal
+ //normal
case Action.ActionType.ACTION_REMOTE_RED_BUTTON:
Check(0);
break;
@@ -190,7 +194,7 @@
case Action.ActionType.ACTION_REMOTE_YELLOW_BUTTON:
Check(3);
break;
- //my PC
+ //my PC
case Action.ActionType.ACTION_SHOW_GUI:
Check(0);
break;
@@ -203,21 +207,35 @@
case Action.ActionType.ACTION_SHOW_INFO:
Check(3);
break;
- // play with 1 2
- // play with 4 5
+ // for use with arrows
+ case Action.ActionType.ACTION_MOVE_UP:
+ Check(0);
+ break;
+ case Action.ActionType.ACTION_MOVE_RIGHT:
+ Check(1);
+ break;
+ case Action.ActionType.ACTION_MOVE_DOWN:
+ Check(3);
+ break;
+ case Action.ActionType.ACTION_MOVE_LEFT:
+ Check(2);
+ break;
+ // play with 2
+ // play with 4 6
+ // play with 8
case Action.ActionType.ACTION_KEY_PRESSED:
switch (action.m_key.KeyChar)
{
- case '1':
+ case '2':
Check(0);
break;
- case '2':
+ case '6':
Check(1);
break;
case '4':
Check(2);
break;
- case '5':
+ case '8':
Check(3);
break;
}
@@ -226,6 +244,84 @@
break;
}
}
+ else
+ {
+ if (test)
+ {
+ switch (action.wID)
+ {
+ //my PC
+ case Action.ActionType.ACTION_SHOW_GUI:
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso1", "MySimon_Red_Focus.png");
+ timeWait = 30;
+ break;
+ case Action.ActionType.ACTION_ASPECT_RATIO:
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso2", "MySimon_Blue_Focus.png");
+ timeWait = 30;
+ break;
+ case Action.ActionType.ACTION_NEXT_AUDIO:
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso3", "MySimon_Green_Focus.png");
+ timeWait = 30;
+ break;
+ case Action.ActionType.ACTION_SHOW_INFO:
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso4", "MySimon_Yellow_Focus.png");
+ timeWait = 30;
+ break;
+
+ case Action.ActionType.ACTION_MOVE_UP:
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso1", "MySimon_Red_Focus.png");
+ timeWait = 30;
+ break;
+ case Action.ActionType.ACTION_MOVE_RIGHT:
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso2", "MySimon_Blue_Focus.png");
+ timeWait = 30;
+ break;
+ case Action.ActionType.ACTION_MOVE_DOWN:
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso4", "MySimon_Yellow_Focus.png");
+ timeWait = 30;
+ break;
+ case Action.ActionType.ACTION_MOVE_LEFT:
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso3", "MySimon_Green_Focus.png");
+ timeWait = 30;
+ break;
+
+ case Action.ActionType.ACTION_KEY_PRESSED:
+ switch (action.m_key.KeyChar)
+ {
+ case '2':
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso1", "MySimon_Red_Focus.png");
+ timeWait = 30;
+ break;
+ case '6':
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso2", "MySimon_Blue_Focus.png");
+ timeWait = 30;
+ break;
+ case '8':
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso4", "MySimon_Yellow_Focus.png");
+ timeWait = 30;
+ break;
+ case '4':
+ Reset();
+ GUIPropertyManager.SetProperty("#Senso3", "MySimon_Green_Focus.png");
+ timeWait = 30;
+ break;
+ }
+ break;
+ }
+ }
+ }
+
}
#endregion
@@ -259,6 +355,9 @@
GUIPropertyManager.SetProperty("#Round", "Round: 1");
GUIPropertyManager.SetProperty("#Player", "GAME OVER");
+
+ GUIControl.EnableControl(GetID, 6); // what this
+
}
protected override void OnPageDestroy(int new_windowId)
@@ -277,6 +376,10 @@
{ //start game
if ((!PlayerOn) && (!SimonOn))
{
+
+ test = false;
+ GUIControl.DisableControl(GetID, 6); // what this
+
Random randObj = new Random();
for (int i = 0; i <= 99; i++)
{ // do random colors for 100 rounds
@@ -313,6 +416,7 @@
if (controlId == 104) Check(3);
}
}
+
base.OnClicked(controlId, control, actionType);
}
@@ -351,42 +455,43 @@
"tones and colors.\n" +
"Level Amateur/Normal/Professional: Speed is increasing\n\n" +
"Gameboard design by Mikael S\xF6derstr\xF6m.\n\n" +
- "Remote play with the colored buttons or use 1 - 2 - 4 - 5.\n\n" +
- "Good luck\nkroko");
+ "Remote play with the colored buttons or\n" +
+ "use 2 - 4 - 6 - 8 or arrow keys.\n\n" +
+ "Good luck\nMark Koenig (kroko)");
dlg.DoModal(GetID);
}
private void Red()
{ // draw red field on
- GUIPropertyManager.SetProperty("#Senso1", "MySimon_1a.png");
+ GUIPropertyManager.SetProperty("#Senso1", "MySimon_Red_Focus.png");
MediaPortal.Util.Utils.PlaySound ("MySimon_c.wav", false, true);
}
private void Blue()
{ // draw blue field on
- GUIPropertyManager.SetProperty("#Senso2", "MySimon_2a.png");
+ GUIPropertyManager.SetProperty("#Senso2", "MySimon_Blue_Focus.png");
MediaPortal.Util.Utils.PlaySound("MySimon_e.wav", false, true);
}
private void Green()
{ // draw green field on
- GUIPropertyManager.SetProperty("#Senso3", "MySimon_3a.png");
+ GUIPropertyManager.SetProperty("#Senso3", "MySimon_Green_Focus.png");
MediaPortal.Util.Utils.PlaySound("MySimon_g.wav", false, true);
}
private void Yellow()
{ // draw yellow field on
- GUIPropertyManager.SetProperty("#Senso4", "MySimon_4a.png");
+ GUIPropertyManager.SetProperty("#Senso4", "MySimon_Yellow_Focus.png");
MediaPortal.Util.Utils.PlaySound("MySimon_a.wav", false, true);
}
private void Error(int errNo)
{ // draw correct field on
Reset();
if (errNo== 0)
- GUIPropertyManager.SetProperty("#Senso1", "MySimon_1a.png");
+ GUIPropertyManager.SetProperty("#Senso1", "MySimon_Red_Focus.png");
if (errNo == 1)
- GUIPropertyManager.SetProperty("#Senso2", "MySimon_2a.png");
+ GUIPropertyManager.SetProperty("#Senso2", "MySimon_Blue_Focus.png");
if (errNo == 2)
- GUIPropertyManager.SetProperty("#Senso3", "MySimon_3a.png");
+ GUIPropertyManager.SetProperty("#Senso3", "MySimon_Green_Focus.png");
if (errNo == 3)
- GUIPropertyManager.SetProperty("#Senso4", "MySimon_4a.png");
+ GUIPropertyManager.SetProperty("#Senso4", "MySimon_Yellow_Focus.png");
MediaPortal.Util.Utils.PlaySound("MySimon_err.wav", false, true);
@@ -395,10 +500,10 @@
}
private void Reset()
{ // draw all fields off
- GUIPropertyManager.SetProperty("#Senso1", "MySimon_1.png");
- GUIPropertyManager.SetProperty("#Senso2", "MySimon_2.png");
- GUIPropertyManager.SetProperty("#Senso3", "MySimon_3.png");
- GUIPropertyManager.SetProperty("#Senso4", "MySimon_4.png");
+ GUIPropertyManager.SetProperty("#Senso1", "MySimon_Red_noFocus.png");
+ GUIPropertyManager.SetProperty("#Senso2", "MySimon_Blue_noFocus.png");
+ GUIPropertyManager.SetProperty("#Senso3", "MySimon_Green_noFocus.png");
+ GUIPropertyManager.SetProperty("#Senso4", "MySimon_Yellow_noFocus.png");
}
private void Check(int Button)
@@ -426,6 +531,7 @@
{ //wrong color is pressed
PlayerOn = false;
Error(Code[cnt]);
+ GUIControl.EnableControl(GetID, 6); // what this
}
else
{ // color is correct
@@ -509,6 +615,7 @@
{ //Player wait too long
PlayerOn = false;
Error(Code[cnt]);
+ GUIControl.EnableControl(GetID, 6); // what this
//Reset();
}
}
Modified: trunk/plugins/MySimon/Source/SimonSay/MySimon.csproj
===================================================================
--- trunk/plugins/MySimon/Source/SimonSay/MySimon.csproj 2007-05-24 16:36:32 UTC (rev 425)
+++ trunk/plugins/MySimon/Source/SimonSay/MySimon.csproj 2007-05-24 16:57:05 UTC (rev 426)
@@ -7,7 +7,7 @@
<ProjectGuid>{206A81B8-D452-45C2-86C9-CBBECF31C11C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>ClassLibrary1</RootNamespace>
+ <RootNamespace>MySimon</RootNamespace>
<AssemblyName>MySimon</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -22,26 +22,40 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
+ <OutputPath>..\..\..\..\..\Programme\Team MediaPortal\MediaPortal\Plugins\Windows\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Core, Version=1.0.2593.1921, Culture=neutral, processorArchitecture=MSIL">
- <Private>True</Private>
+ <Reference Include="Core, Version=1.0.2546.32606, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\Programme\Team MediaPortal\MediaPortal\Core.DLL</HintPath>
+ <Private>False</Private>
</Reference>
- <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
+ <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\Programme\Team MediaPortal\MediaPortal\Plugins\Windows\Dialogs.DLL</HintPath>
+ <Private>False</Private>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
- <Reference Include="Utils, Version=1.0.2593.1896, Culture=neutral, processorArchitecture=MSIL" />
+ <Reference Include="Utils, Version=1.0.2546.32604, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\..\Programme\Team MediaPortal\MediaPortal\Utils.DLL</HintPath>
+ <Private>False</Private>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="MySimon.cs" />
</ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="simon.png" />
+ <EmbeddedResource Include="simonDisabled.png" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Modified: trunk/plugins/MySimon/Source/SimonSay.sln
===================================================================
--- trunk/plugins/MySimon/Source/SimonSay.sln 2007-05-24 16:36:32 UTC (rev 425)
+++ trunk/plugins/MySimon/Source/SimonSay.sln 2007-05-24 16:57:05 UTC (rev 426)
@@ -9,8 +9,8 @@
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Debug|Any CPU.ActiveCfg = Release|Any CPU
+ {206A81B8-D452-45C2-86C9-CBBECF31C11C}.Debug|Any CPU.Build.0 = Release|Any CPU
{206A81B8-D452-45C2-86C9-CBBECF31C11C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{206A81B8-D452-45C2-86C9-CBBECF31C11C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
Modified: trunk/plugins/MySimon/Source/SimonSay.suo
===================================================================
(Binary files differ)
Modified: trunk/plugins/MySimon/readme.txt
===================================================================
--- trunk/plugins/MySimon/readme.txt 2007-05-24 16:36:32 UTC (rev 425)
+++ trunk/plugins/MySimon/readme.txt 2007-05-24 16:57:05 UTC (rev 426)
@@ -1,52 +1,41 @@
Visit the forum
http://forum.team-mediaportal.com/new_game_simon_say-t19473.html
-Simon Say V0.3.1
-----------------
+V0.4
+----
+-turn design of the board 45 degrees , thanks to Mikael
+-make it possible to test the buttons (before start)
+-playable with arrow keys
+Have fun.
+
+Greetz
+kroko
+
+V0.3.1
+------
-added time display on skin
-modify the skin a little
-enable hover picture
-Simon Say V0.3
---------------
-
+V0.3
+----
-Added the great design from Mikael S\xF6derstr\xF6m.
-Simon Say V0.2
---------------
-
-Simon Say (Senso)
-
+V0.2
+----
-Changed the window ID
-disable level selection during gameplay
-added button help in "what's this"
-Have fun.
-
-Greetz
-kroko
-
-
-Simon Say V0.1
---------------
-
-Simon Say (Senso)
-
+V0.1
+----
Initial release
This nice game from MB as a MP version. You can play with
- the mouse
- remote color buttons
-- 1 2
- 4 5 (action keys)
+- action keys
Copy the plugin and skin files into your favorite skin folder.
I had to adjust my remote a little in the setup. It was to sensitve.
-
-Planed feature: Highscores ?
-
-Have fun.
-
-Greetz
-kroko
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|