From: <che...@us...> - 2007-05-25 23:30:30
|
Revision: 447 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=447&view=rev Author: chef_koch Date: 2007-05-25 16:30:28 -0700 (Fri, 25 May 2007) Log Message: ----------- added option to enable/disable sound effects in GUI, like in Tetris Modified Paths: -------------- trunk/plugins/MySimon/Skin/BlueTwo/MySimon.xml trunk/plugins/MySimon/Skin/MySimon.xml trunk/plugins/MySimon/Source/SimonSay/MySimon.cs trunk/plugins/MySimon/Source/SimonSay/MySimon.csproj trunk/plugins/MySimon/language/MySimon/strings_de.xml trunk/plugins/MySimon/language/MySimon/strings_en.xml Modified: trunk/plugins/MySimon/Skin/BlueTwo/MySimon.xml =================================================================== --- trunk/plugins/MySimon/Skin/BlueTwo/MySimon.xml 2007-05-25 23:28:14 UTC (rev 446) +++ trunk/plugins/MySimon/Skin/BlueTwo/MySimon.xml 2007-05-25 23:30:28 UTC (rev 447) @@ -9,7 +9,7 @@ <control> <description>BackGround</description> <type>image</type> - <id>10</id> + <id>1</id> <posX>0</posX> <posY>0</posY> <width>720</width> @@ -19,7 +19,7 @@ <control> <description>header label</description> <type>label</type> - <id>11</id> + <id>1</id> <posX>250</posX> <posY>70</posY> <label>#header_label</label> @@ -36,59 +36,57 @@ <animation effect="fade" time="500">WindowClose</animation> <animation effect="slide" time="250" start="-300,0">WindowOpen</animation> <animation effect="slide" time="500" end="0,-300">WindowClose</animation> + <posX>60</posX> + <posY>97</posY> + <layout>StackLayout</layout> <control> <description>Start</description> <type>button</type> <id>2</id> - <posX>60</posX> - <posY>97</posY> <onleft>2</onleft> <onright>2</onright> <onup>6</onup> - <ondown>3</ondown> </control> <control> <description>Level</description> <type>button</type> <id>3</id> - <posX>60</posX> - <posY>131</posY> <onleft>3</onleft> <onright>3</onright> - <onup>2</onup> - <ondown>6</ondown> </control> <control> - <description>Round</description> - <type>label</type> + <description>Sounds</description> + <type>togglebutton</type> <id>4</id> - <posX>70</posX> - <posY>170</posY> + <onleft>4</onleft> + <onright>4</onright> + </control> + <control> + <description>Round</description> + <type>button</type> + <id>1</id> <label>#Round</label> <font>font12</font> - <align>Left</align> - <textcolor>White</textcolor> + <enabled>false</enabled> + <textureFocus>-</textureFocus> + <textureNoFocus>-</textureNoFocus> </control> <control> <description>Player: / GameOver</description> - <type>label</type> - <id>5</id> - <posX>70</posX> - <posY>204</posY> + <type>button</type> + <id>1</id> <label>#Player</label> <font>font12</font> - <align>Left</align> - <textcolor>White</textcolor> + <enabled>false</enabled> + <textureFocus>-</textureFocus> + <textureNoFocus>-</textureNoFocus> </control> <control> <description>What is this?</description> <type>button</type> <id>6</id> - <posX>60</posX> - <posY>233</posY> <onleft>6</onleft> <onright>6</onright> - <onup>3</onup> <ondown>2</ondown> </control> </control> Modified: trunk/plugins/MySimon/Skin/MySimon.xml =================================================================== --- trunk/plugins/MySimon/Skin/MySimon.xml 2007-05-25 23:28:14 UTC (rev 446) +++ trunk/plugins/MySimon/Skin/MySimon.xml 2007-05-25 23:30:28 UTC (rev 447) @@ -1,161 +1,153 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <window> - <id>04071975</id> - <defaultcontrol>2</defaultcontrol> + <id>04071975</id> + <defaultcontrol>2</defaultcontrol> <allowoverlay>yes</allowoverlay> <autohidetopbar>yes</autohidetopbar> <controls> - <import>common.time.xml</import> + <import>common.time.xml</import> + <control> + <description>BackGround</description> + <type>image</type> + <id>1</id> + <posX>0</posX> + <posY>0</posY> + <width>720</width> + <height>576</height> + <texture>background.png</texture> + </control> + <control> + <description>header label</description> + <type>label</type> + <id>1</id> + <posX>55</posX> + <posY>20</posY> + <label>#header_label</label> + <font>font48</font> + <align>left</align> + <textcolor>20ffffff</textcolor> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + </control> + <control> + <description>header label</description> + <type>label</type> + <id>1</id> + <posX>60</posX> + <posY>70</posY> + <label>#header_label</label> + <font>font16</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + </control> + <control> + <description>button group</description> + <type>group</type> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + <posX>60</posX> + <posY>97</posY> + <layout>StackLayout</layout> <control> - <description>Simon Say label</description> - <type>label</type> - <posX>55</posX> - <posY>20</posY> - <align>left</align> - <font>font48</font> - <label>Simon Say</label> - <textcolor>20ffffff</textcolor> - <id>1</id> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> + <description>Start</description> + <type>button</type> + <id>2</id> + <onleft>2</onleft> + <onright>2</onright> + <onup>6</onup> </control> - <control> - <description>BackGround</description> - <type>image</type> - <id>1</id> - <posX>0</posX> - <posY>0</posY> - <width>720</width> - <height>576</height> - <texture>background.png</texture> + <control> + <description>Level</description> + <type>button</type> + <id>3</id> + <onleft>3</onleft> + <onright>3</onright> </control> - <control> - <description>text label</description> - <type>label</type> - <id>11</id> - <posX>60</posX> - <posY>70</posY> - <label>Simon Say</label> - <font>font16</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> + <control> + <description>Sounds</description> + <type>togglebutton</type> + <id>4</id> + <onleft>4</onleft> + <onright>4</onright> </control> - <control> - <description>Start</description> - <type>button</type> - <id>2</id> - <posX>60</posX> - <posY>97</posY> - <label>Start</label> - <onleft>2</onleft> - <onright>2</onright> - <onup>6</onup> - <ondown>3</ondown> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - </control> - <control> - <description>Level</description> - <type>button</type> - <id>3</id> - <posX>60</posX> - <posY>131</posY> - <label>Level: Amateur</label> - <onleft>3</onleft> - <onright>3</onright> - <onup>2</onup> - <ondown>6</ondown> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> + <control> + <description>Round</description> + <type>button</type> + <id>1</id> + <label>#Round</label> + <font>font12</font> + <enabled>false</enabled> + <textureFocus>-</textureFocus> + <textureNoFocus>-</textureNoFocus> </control> <control> - <description>text label</description> - <type>label</type> - <id>4</id> - <posX>70</posX> - <posY>170</posY> - <label>#Round</label> - <font>font12</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> + <description>Player: / GameOver</description> + <type>button</type> + <id>1</id> + <label>#Player</label> + <font>font12</font> + <enabled>false</enabled> + <textureFocus>-</textureFocus> + <textureNoFocus>-</textureNoFocus> + </control> + <control> + <description>What is this?</description> + <type>button</type> + <id>6</id> + <onleft>6</onleft> + <onright>6</onright> + <ondown>2</ondown> + </control> + </control> + <control> + <type>button</type> + <id>101</id> + <posX>300</posX> + <posY>80</posY> + <width>172</width> + <height>137</height> + <textureFocus>#Senso1</textureFocus> + <textureNoFocus>#Senso1</textureNoFocus> <animation effect="fade" time="150">WindowOpen</animation> <animation effect="fade" time="150">WindowClose</animation> - </control> - <control> - <description>text label</description> - <type>label</type> - <id>4</id> - <posX>70</posX> - <posY>204</posY> - <label>#Player</label> - <font>font12</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> + </control> + <control> + <type>button</type> + <id>102</id> + <posX>386</posX> + <posY>130</posY> + <width>137</width> + <height>172</height> + <textureFocus>#Senso2</textureFocus> + <textureNoFocus>#Senso2</textureNoFocus> <animation effect="fade" time="150">WindowOpen</animation> <animation effect="fade" time="150">WindowClose</animation> - </control> - <control> - <description>Whatsthis</description> - <type>button</type> - <id>6</id> - <posX>60</posX> - <posY>233</posY> - <label>What's this?</label> - <onleft>6</onleft> - <onright>6</onright> - <onup>3</onup> - <ondown>2</ondown> + </control> + <control> + <type>button</type> + <id>103</id> + <posX>249</posX> + <posY>131</posY> + <width>137</width> + <height>172</height> + <textureFocus>#Senso3</textureFocus> + <textureNoFocus>#Senso3</textureNoFocus> <animation effect="fade" time="150">WindowOpen</animation> <animation effect="fade" time="150">WindowClose</animation> - </control> - <control> - <type>button</type> - <id>101</id> - <posX>300</posX> - <posY>80</posY> - <width>172</width> - <height>137</height> - <textureFocus>#Senso1</textureFocus> - <textureNoFocus>#Senso1</textureNoFocus> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - </control> - <control> - <type>button</type> - <id>102</id> - <posX>386</posX> - <posY>130</posY> - <width>137</width> - <height>172</height> - <textureFocus>#Senso2</textureFocus> - <textureNoFocus>#Senso2</textureNoFocus> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - </control> + </control> <control> - <type>button</type> - <id>103</id> - <posX>249</posX> - <posY>131</posY> - <width>137</width> - <height>172</height> - <textureFocus>#Senso3</textureFocus> - <textureNoFocus>#Senso3</textureNoFocus> + <type>button</type> + <id>104</id> + <posX>300</posX> + <posY>217</posY> + <width>172</width> + <height>137</height> + <textureFocus>#Senso4</textureFocus> + <textureNoFocus>#Senso4</textureNoFocus> <animation effect="fade" time="150">WindowOpen</animation> <animation effect="fade" time="150">WindowClose</animation> - </control> - <control> - <type>button</type> - <id>104</id> - <posX>300</posX> - <posY>217</posY> - <width>172</width> - <height>137</height> - <textureFocus>#Senso4</textureFocus> - <textureNoFocus>#Senso4</textureNoFocus> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - </control> - </controls> -</window> + </control> + </controls> +</window> \ No newline at end of file Modified: trunk/plugins/MySimon/Source/SimonSay/MySimon.cs =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/MySimon.cs 2007-05-25 23:28:14 UTC (rev 446) +++ trunk/plugins/MySimon/Source/SimonSay/MySimon.cs 2007-05-25 23:30:28 UTC (rev 447) @@ -38,28 +38,44 @@ [PluginIcons("MySimon.simon.png", "MySimon.simonDisabled.png")] public class MySimonGUI : GUIWindow, ISetupForm { + #region enums + + private enum Level + { + Easy = 0, + Medium = 1, + Hard = 2 + } + + #endregion + #region SkinControl + [SkinControlAttribute(2)] - protected GUIButtonControl BtnStart = null; + protected GUIButtonControl btnStart = null; [SkinControlAttribute(3)] - protected GUIButtonControl BtnLevel = null; - + protected GUIButtonControl btnLevel = null; + [SkinControlAttribute(4)] + protected GUIToggleButtonControl btnSound = null; [SkinControlAttribute(6)] - protected GUIButtonControl BtnWhatsThis = null; + protected GUIButtonControl btnWhatsThis = null; [SkinControlAttribute(101)] - protected GUIButtonControl BtnRed = null; + protected GUIButtonControl btnRed = null; [SkinControlAttribute(102)] - protected GUIButtonControl BtnBlue = null; + protected GUIButtonControl btnBlue = null; [SkinControlAttribute(103)] - protected GUIButtonControl BtnGreen = null; + protected GUIButtonControl btnGreen = null; [SkinControlAttribute(104)] - protected GUIButtonControl BtnYellow = null; + protected GUIButtonControl btnYellow = null; + #endregion #region Private variables - string Level = "Am"; //Choosen level + Level _currentLevel = Level.Easy; + bool _soundOn = true; + Boolean SimonOn = false; Boolean PlayerOn = false; @@ -152,6 +168,8 @@ #endregion + #region Overrides + public override int GetID { get @@ -174,6 +192,194 @@ return result; } + public override bool OnMessage(GUIMessage message) + { + return base.OnMessage(message); + } + + protected override void OnPageLoad() + { + _Game.Interval = 5; + _Game.Tick += new EventHandler(_Game_Tick); + _Game.Start(); + + SimonOn = false; + PlayerOn = false; + + GUIGraphicsContext.OnNewAction -= ah; + GUIGraphicsContext.OnNewAction += ah; + + base.OnPageLoad(); + + Reset(); + + GUIPropertyManager.SetProperty("#Status", " "); + + GUIPropertyManager.SetProperty("#Round", MySimon.GUILocalizeStrings.Get(5) + "1"); // Round: 1 + GUIPropertyManager.SetProperty("#Player", MySimon.GUILocalizeStrings.Get(6)); // GAME OVER + + GUIControl.EnableControl(GetID, btnWhatsThis.GetID); + + UpdateButtonStates(); + } + + protected override void OnPageDestroy(int new_windowId) + { + _Game.Stop(); + _Game.Tick -= new EventHandler(_Game_Tick); + } + + protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) + { + if (control == btnStart) + OnBtnStart(); + else if (control == btnLevel) + OnBtnLevel(); + else if (control == btnSound) + OnBtnSound(); + else if (control == btnWhatsThis) + OnBtnWhatsThis(); + + if (PlayerOn) + { + if ((controlId >= 101) && (controlId <= 104)) + { //which button has clicked ? + if (controlId == 101) Check(0); + if (controlId == 102) Check(1); + if (controlId == 103) Check(2); + if (controlId == 104) Check(3); + } + } + + base.OnClicked(controlId, control, actionType); + } + + protected override void OnShowContextMenu() + { + base.OnShowContextMenu(); + } + + #endregion + + #region Implementation + + private void OnBtnStart() + { + if ((!PlayerOn) && (!SimonOn)) + { + + test = false; + + Random randObj = new Random(); + for (int i = 0; i <= 99; i++) + { // do random colors for 100 rounds + Code[i] = (int)(randObj.NextDouble() * 4); + } + + // set timebase for game + switch (_currentLevel) + { + case Level.Easy: + timeBase = 20; + break; + case Level.Medium: + timeBase = 10; + break; + case Level.Hard: + timeBase = 4; + break; + } + + + timeActual = timeBase; + Reset(); + + //init round + round = 0; + cnt = 0; + //simonn starts + SimonOn = true; + } + + UpdateButtonStates(); + } + + private void OnBtnLevel() + { + //Choose level for the game + if ((PlayerOn) || (SimonOn)) + return; + + switch (_currentLevel) + { + case Level.Easy: + _currentLevel = Level.Medium; + break; + case Level.Medium: + _currentLevel = Level.Hard; + break; + case Level.Hard: + _currentLevel = Level.Easy; + break; + } + + UpdateButtonStates(); + } + + private void OnBtnSound() + { + _soundOn = btnSound.Selected; + UpdateButtonStates(); + } + + private void OnBtnWhatsThis() + { + GUIDialogText dlg = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); + dlg.SetHeading(MySimon.GUILocalizeStrings.Get(31)); // help dialog heading + dlg.SetText(MySimon.GUILocalizeStrings.Get(32)); // help dialog text + dlg.DoModal(GetID); + } + + private void OnRenderSound(string strFilePath) + { + if (_soundOn) + { + MediaPortal.Util.Utils.PlaySound(strFilePath, false, true); + } + } + + private void UpdateButtonStates() + { + GUIPropertyManager.SetProperty("#header_label", MySimon.GUILocalizeStrings.Get(0)); // My Simon + + GUIControl.SetControlLabel(GetID, btnStart.GetID, MySimon.GUILocalizeStrings.Get(1)); // Start + btnStart.Disabled = (PlayerOn || SimonOn); + + string strLine = MySimon.GUILocalizeStrings.Get(10); // Level: + switch (_currentLevel) + { + case Level.Easy: + strLine += MySimon.GUILocalizeStrings.Get(11); // easy + break; + case Level.Medium: + strLine += MySimon.GUILocalizeStrings.Get(12); // medium + break; + case Level.Hard: + strLine += MySimon.GUILocalizeStrings.Get(13); // difficult + break; + } + GUIControl.SetControlLabel(GetID, btnLevel.GetID, strLine); + btnLevel.Disabled = (PlayerOn || SimonOn); + + GUIControl.SetControlLabel(GetID, btnSound.GetID, MySimon.GUILocalizeStrings.Get(9)); // Sounds + btnSound.Selected = _soundOn; + + GUIControl.SetControlLabel(GetID, btnWhatsThis.GetID, MySimon.GUILocalizeStrings.Get(31)); // What is My Simon? + btnWhatsThis.Disabled = (PlayerOn || SimonOn); + } + + #endregion + #region Actions public override void OnAction(Action action) { @@ -335,175 +541,39 @@ } #endregion - public override bool OnMessage(GUIMessage message) - { - return base.OnMessage(message); - } - public void Dispose() { _Game.Stop(); _Game.Tick -= new EventHandler(_Game_Tick); } - protected override void OnPageLoad() + private void Red() { - _Game.Interval = 5; - _Game.Tick += new EventHandler(_Game_Tick); - _Game.Start(); - - SimonOn = false; - PlayerOn = false; - Level = "Am"; - - GUIGraphicsContext.OnNewAction -= ah; - GUIGraphicsContext.OnNewAction += ah; - - base.OnPageLoad(); - - Reset(); - - - GUIPropertyManager.SetProperty("#header_label", MySimon.GUILocalizeStrings.Get(0)); // My Simon - - GUIControl.SetControlLabel(GetID, BtnStart.GetID, MySimon.GUILocalizeStrings.Get(1)); // Start - GUIControl.SetControlLabel(GetID, BtnWhatsThis.GetID, MySimon.GUILocalizeStrings.Get(31)); // What is My Simon? - - GUIPropertyManager.SetProperty("#Status", " "); - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, - MySimon.GUILocalizeStrings.Get(10) + // Level: - MySimon.GUILocalizeStrings.Get(12)); // Normal - - GUIPropertyManager.SetProperty("#Round", MySimon.GUILocalizeStrings.Get(5) + "1"); // Round: 1 - GUIPropertyManager.SetProperty("#Player", MySimon.GUILocalizeStrings.Get(6)); // GAME OVER - - GUIControl.EnableControl(GetID, 6); // what this - - } - - protected override void OnPageDestroy(int new_windowId) - { - _Game.Stop(); - _Game.Tick -= new EventHandler(_Game_Tick); - } - - protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) - { - if (control == BtnLevel) - OnBtnLevel(); - if (control == BtnWhatsThis) - OnBtnWhatsThis(); - if (control == BtnStart) - { //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 - Code[i] = (int)(randObj.NextDouble() * 4); - } - // set timebase for game - if (Level == "Pro") - timeBase = 4; - if (Level == "Nor") - timeBase = 10; - if (Level == "Am") - timeBase = 20; - - // disable level selection - GUIControl.DisableControl(GetID, 3); - - timeActual = timeBase; - Reset(); - - //init round - round = 0; - cnt = 0; - //simonn starts - SimonOn = true; - } - } - if (PlayerOn) - { - if ((controlId >= 101) && (controlId <= 104)) - { //which button has clicked ? - if (controlId == 101) Check(0); - if (controlId == 102) Check(1); - if (controlId == 103) Check(2); - if (controlId == 104) Check(3); - } - } - - base.OnClicked(controlId, control, actionType); - } - - protected override void OnShowContextMenu() - { - base.OnShowContextMenu(); - } - - private void OnBtnLevel() - { //Choose level for the game - if ((!PlayerOn) && (!SimonOn)) - { - if (Level == "Nor") - { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, - MySimon.GUILocalizeStrings.Get(10) + // Level: - MySimon.GUILocalizeStrings.Get(13)); // Professional - Level = "Pro"; - } - else if (Level == "Pro") - { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, - MySimon.GUILocalizeStrings.Get(10) + // Level: - MySimon.GUILocalizeStrings.Get(11)); // Amateur - Level = "Am"; - } - else - { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, - MySimon.GUILocalizeStrings.Get(10) + // Level: - MySimon.GUILocalizeStrings.Get(12)); // Normal - Level = "Nor"; - } - } - } - - private void OnBtnWhatsThis() - { - GUIDialogText dlg = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); - dlg.SetHeading(MySimon.GUILocalizeStrings.Get(31)); // help dialog heading - dlg.SetText(MySimon.GUILocalizeStrings.Get(32)); // help dialog text - dlg.DoModal(GetID); - } - - private void Red() - { // draw red field on + // draw red field on GUIPropertyManager.SetProperty("#Senso1", "MySimon_Red_Focus.png"); - MediaPortal.Util.Utils.PlaySound("MySimon_c.wav", false, true); + OnRenderSound("MySimon_c.wav"); } private void Blue() - { // draw blue field on + { + // draw blue field on GUIPropertyManager.SetProperty("#Senso2", "MySimon_Blue_Focus.png"); - MediaPortal.Util.Utils.PlaySound("MySimon_e.wav", false, true); + OnRenderSound("MySimon_e.wav"); } private void Green() - { // draw green field on + { + // draw green field on GUIPropertyManager.SetProperty("#Senso3", "MySimon_Green_Focus.png"); - MediaPortal.Util.Utils.PlaySound("MySimon_g.wav", false, true); + OnRenderSound("MySimon_g.wav"); } private void Yellow() - { // draw yellow field on + { + // draw yellow field on GUIPropertyManager.SetProperty("#Senso4", "MySimon_Yellow_Focus.png"); - MediaPortal.Util.Utils.PlaySound("MySimon_a.wav", false, true); + OnRenderSound("MySimon_a.wav"); } private void Error(int errNo) - { // draw correct field on + { + // draw correct field on Reset(); if (errNo == 0) GUIPropertyManager.SetProperty("#Senso1", "MySimon_Red_Focus.png"); @@ -514,13 +584,14 @@ if (errNo == 3) GUIPropertyManager.SetProperty("#Senso4", "MySimon_Yellow_Focus.png"); - MediaPortal.Util.Utils.PlaySound("MySimon_err.wav", false, true); + OnRenderSound("MySimon_err.wav"); // Enable level selection - GUIControl.EnableControl(GetID, 3); + GUIControl.EnableControl(GetID, btnLevel.GetID); } private void Reset() - { // draw all fields off + { + // draw all fields off GUIPropertyManager.SetProperty("#Senso1", "MySimon_Red_noFocus.png"); GUIPropertyManager.SetProperty("#Senso2", "MySimon_Blue_noFocus.png"); GUIPropertyManager.SetProperty("#Senso3", "MySimon_Green_noFocus.png"); @@ -533,26 +604,31 @@ timeActual = timeBase; // set time to base if (Button == 0) - { //red is pressed + { + //red is pressed Red(); } if (Button == 1) - { //blue is pressed + { + //blue is pressed Blue(); } if (Button == 2) - { //green is pressed + { + //green is pressed Green(); } if (Button == 3) - { //yellow is pressed + { + //yellow is pressed Yellow(); } if (Code[cnt] != Button) - { //wrong color is pressed + { + //wrong color is pressed PlayerOn = false; Error(Code[cnt]); - GUIControl.EnableControl(GetID, 6); // what this + UpdateButtonStates(); } else { // color is correct @@ -636,7 +712,7 @@ { //Player wait too long PlayerOn = false; Error(Code[cnt]); - GUIControl.EnableControl(GetID, 6); // what this + UpdateButtonStates(); //Reset(); } } Modified: trunk/plugins/MySimon/Source/SimonSay/MySimon.csproj =================================================================== --- trunk/plugins/MySimon/Source/SimonSay/MySimon.csproj 2007-05-25 23:28:14 UTC (rev 446) +++ trunk/plugins/MySimon/Source/SimonSay/MySimon.csproj 2007-05-25 23:30:28 UTC (rev 447) @@ -22,7 +22,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> - <OutputPath>..\..\..\..\..\Programme\Team MediaPortal\MediaPortal\Plugins\Windows\</OutputPath> + <OutputPath>.\bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> @@ -30,12 +30,12 @@ <ItemGroup> <Reference Include="Core, Version=1.0.2546.32606, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\..\Programme\Team MediaPortal\MediaPortal\Core.DLL</HintPath> + <HintPath>..\..\..\..\mediaportal\xbmc\bin\Release\Core.dll</HintPath> <Private>False</Private> </Reference> <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> + <HintPath>..\..\..\..\mediaportal\xbmc\bin\Release\plugins\Windows\Dialogs.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="System" /> @@ -44,7 +44,7 @@ <Reference Include="System.Xml" /> <Reference Include="Utils, Version=1.0.2546.32604, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\..\Programme\Team MediaPortal\MediaPortal\Utils.DLL</HintPath> + <HintPath>..\..\..\..\mediaportal\xbmc\bin\Release\Utils.dll</HintPath> <Private>False</Private> </Reference> </ItemGroup> Modified: trunk/plugins/MySimon/language/MySimon/strings_de.xml =================================================================== --- trunk/plugins/MySimon/language/MySimon/strings_de.xml 2007-05-25 23:28:14 UTC (rev 446) +++ trunk/plugins/MySimon/language/MySimon/strings_de.xml 2007-05-25 23:30:28 UTC (rev 447) @@ -7,6 +7,7 @@ <String id="3">SIMON</String> <String id="5">Runde: </String> <String id="6">GAME OVER</String> + <String id="9">Spielgeräusche</String> <String id="10">Stufe: </String> <String id="11">leicht</String> <String id="12">mittel</String> Modified: trunk/plugins/MySimon/language/MySimon/strings_en.xml =================================================================== --- trunk/plugins/MySimon/language/MySimon/strings_en.xml 2007-05-25 23:28:14 UTC (rev 446) +++ trunk/plugins/MySimon/language/MySimon/strings_en.xml 2007-05-25 23:30:28 UTC (rev 447) @@ -7,6 +7,7 @@ <String id="3">SIMON</String> <String id="5">Round: </String> <String id="6">GAME OVER</String> + <String id="9">Sounds</String> <String id="10">Level: </String> <String id="11">easy</String> <String id="12">medium</String> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |