From: <kro...@us...> - 2007-04-10 11:54:24
|
Revision: 303 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=303&view=rev Author: kroko_koenig Date: 2007-04-10 04:54:17 -0700 (Tue, 10 Apr 2007) Log Message: ----------- Initial release Added Paths: ----------- trunk/plugins/My Connect4/Connect4.jpg trunk/plugins/My Connect4/Skin/ trunk/plugins/My Connect4/Skin/Media/ trunk/plugins/My Connect4/Skin/Media/MyConn4Cur.png trunk/plugins/My Connect4/Skin/Media/MyConn4Gr.png trunk/plugins/My Connect4/Skin/Media/MyConn4Rd.png trunk/plugins/My Connect4/Skin/Media/MyConn4Wh.png trunk/plugins/My Connect4/Skin/Media/MyConn4Ye.png trunk/plugins/My Connect4/Skin/Media/MyConnBack.png trunk/plugins/My Connect4/Skin/Media/hover_my connect4.png trunk/plugins/My Connect4/Skin/MyConnect4.xml trunk/plugins/My Connect4/Skin/Sounds/ trunk/plugins/My Connect4/Skin/Sounds/MyConnect4_klick.wav trunk/plugins/My Connect4/Source/ trunk/plugins/My Connect4/Source/MyConnect4/ trunk/plugins/My Connect4/Source/MyConnect4/Engine.cs trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.csproj trunk/plugins/My Connect4/Source/MyConnect4/Properties/ trunk/plugins/My Connect4/Source/MyConnect4/Properties/AssemblyInfo.cs trunk/plugins/My Connect4/Source/MyConnect4/State.cs trunk/plugins/My Connect4/Source/MyConnect4.sln trunk/plugins/My Connect4/Source/MyConnect4.suo trunk/plugins/My Connect4/Thumbs.db trunk/plugins/My Connect4/readme.txt Added: trunk/plugins/My Connect4/Connect4.jpg =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Connect4.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Media/MyConn4Cur.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Media/MyConn4Cur.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Media/MyConn4Gr.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Media/MyConn4Gr.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Media/MyConn4Rd.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Media/MyConn4Rd.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Media/MyConn4Wh.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Media/MyConn4Wh.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Media/MyConn4Ye.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Media/MyConn4Ye.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Media/MyConnBack.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Media/MyConnBack.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Media/hover_my connect4.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Media/hover_my connect4.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/MyConnect4.xml (rev 0) +++ trunk/plugins/My Connect4/Skin/MyConnect4.xml 2007-04-10 11:54:17 UTC (rev 303) @@ -0,0 +1,604 @@ +<window> + <id>22031969</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <autohidetopbar>yes</autohidetopbar> + <controls> + <import>common.time.xml</import> + <control> + <description>BackGround</description> + <type>image</type> + <id>10</id> + <posX>0</posX> + <posY>0</posY> + <width>720</width> + <height>576</height> + <texture>background.png</texture> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>11</id> + <posX>60</posX> + <posY>70</posY> + <label>Connect 4</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> + <type>group</type> + <description>group element</description> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + <control> + <description>Start</description> + <type>button</type> + <id>2</id> + <posX>60</posX> + <posY>97</posY> + <label>Start</label> + <onleft>2</onleft> + <onright>301</onright> + <onup>7</onup> + <ondown>3</ondown> + </control> + <control> + <description>Mode</description> + <type>button</type> + <id>3</id> + <posX>60</posX> + <posY>131</posY> + <label>Mode: Play vs Player</label> + <onleft>3</onleft> + <onright>3</onright> + <onup>2</onup> + <ondown>4</ondown> + </control> + <control> + <description>Level</description> + <type>button</type> + <id>4</id> + <posX>60</posX> + <posY>165</posY> + <label>Level: Amateur</label> + <onleft>4</onleft> + <onright>4</onright> + <onup>3</onup> + <ondown>7</ondown> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>5</id> + <posX>70</posX> + <posY>205</posY> + <label>#Round</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>6</id> + <posX>70</posX> + <posY>240</posY> + <label>#Player</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Whatsthis</description> + <type>button</type> + <id>7</id> + <posX>60</posX> + <posY>270</posY> + <label>What's this?</label> + <onleft>7</onleft> + <onright>301</onright> + <onup>4</onup> + <ondown>2</ondown> + </control> + </control> + <control> + <description>BackGround Game</description> + <type>image</type> + <id>15</id> + <posX>260</posX> + <posY>120</posY> + <width>440</width> + <height>380</height> + <texture>MyConnBack.png</texture> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + </control> + <control> + <type>group</type> + <description>group element</description> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + <control> + <type>image</type> + <id>101</id> + <posX>280</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_1</texture> + </control> + <control> + <type>image</type> + <id>102</id> + <posX>340</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_2</texture> + </control> + <control> + <type>image</type> + <id>103</id> + <posX>400</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_3</texture> + </control> + <control> + <type>image</type> + <id>104</id> + <posX>460</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_4</texture> + </control> + <control> + <type>image</type> + <id>105</id> + <posX>520</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_5</texture> + </control> + <control> + <type>image</type> + <id>106</id> + <posX>580</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_6</texture> + </control> + <control> + <type>image</type> + <id>107</id> + <posX>640</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_7</texture> + </control> + + <control> + <type>image</type> + <id>111</id> + <posX>280</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_1</texture> + </control> + <control> + <type>image</type> + <id>112</id> + <posX>340</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_2</texture> + </control> + <control> + <type>image</type> + <id>113</id> + <posX>400</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_3</texture> + </control> + <control> + <type>image</type> + <id>114</id> + <posX>460</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_4</texture> + </control> + <control> + <type>image</type> + <id>115</id> + <posX>520</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_5</texture> + </control> + <control> + <type>image</type> + <id>116</id> + <posX>580</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_6</texture> + </control> + <control> + <type>image</type> + <id>117</id> + <posX>640</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_7</texture> + </control> + + <control> + <type>image</type> + <id>121</id> + <posX>280</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_1</texture> + </control> + <control> + <type>image</type> + <id>122</id> + <posX>340</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_2</texture> + </control> + <control> + <type>image</type> + <id>123</id> + <posX>400</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_3</texture> + </control> + <control> + <type>image</type> + <id>124</id> + <posX>460</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_4</texture> + </control> + <control> + <type>image</type> + <id>125</id> + <posX>520</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_5</texture> + </control> + <control> + <type>image</type> + <id>126</id> + <posX>580</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_6</texture> + </control> + <control> + <type>image</type> + <id>127</id> + <posX>640</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_7</texture> + </control> + + <control> + <type>image</type> + <id>131</id> + <posX>280</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_1</texture> + </control> + <control> + <type>image</type> + <id>132</id> + <posX>340</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_2</texture> + </control> + <control> + <type>image</type> + <id>133</id> + <posX>400</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_3</texture> + </control> + <control> + <type>image</type> + <id>134</id> + <posX>460</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_4</texture> + </control> + <control> + <type>image</type> + <id>135</id> + <posX>520</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_5</texture> + </control> + <control> + <type>image</type> + <id>136</id> + <posX>580</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_6</texture> + </control> + <control> + <type>image</type> + <id>137</id> + <posX>640</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_7</texture> + </control> + + <control> + <type>image</type> + <id>141</id> + <posX>280</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_1</texture> + </control> + <control> + <type>image</type> + <id>142</id> + <posX>340</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_2</texture> + </control> + <control> + <type>image</type> + <id>143</id> + <posX>400</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_3</texture> + </control> + <control> + <type>image</type> + <id>144</id> + <posX>460</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_4</texture> + </control> + <control> + <type>image</type> + <id>145</id> + <posX>520</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_5</texture> + </control> + <control> + <type>image</type> + <id>146</id> + <posX>580</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_6</texture> + </control> + <control> + <type>image</type> + <id>147</id> + <posX>640</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_7</texture> + </control> + + <control> + <type>image</type> + <id>151</id> + <posX>280</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_1</texture> + </control> + <control> + <type>image</type> + <id>152</id> + <posX>340</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_2</texture> + </control> + <control> + <type>image</type> + <id>153</id> + <posX>400</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_3</texture> + </control> + <control> + <type>image</type> + <id>154</id> + <posX>460</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_4</texture> + </control> + <control> + <type>image</type> + <id>155</id> + <posX>520</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_5</texture> + </control> + <control> + <type>image</type> + <id>156</id> + <posX>580</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_6</texture> + </control> + <control> + <type>image</type> + <id>157</id> + <posX>640</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_7</texture> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>18</id> + <posX>260</posX> + <posY>510</posY> + <label>#Status</label> + <font>font16</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Pointer 01</description> + <type>button</type> + <id>301</id> + <posX>280</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>2</onleft> + <onright>302</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 02</description> + <type>button</type> + <id>302</id> + <posX>340</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>301</onleft> + <onright>303</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 03</description> + <type>button</type> + <id>303</id> + <posX>400</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>302</onleft> + <onright>304</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 04</description> + <type>button</type> + <id>304</id> + <posX>460</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>303</onleft> + <onright>305</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 05</description> + <type>button</type> + <id>305</id> + <posX>520</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>304</onleft> + <onright>306</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 06</description> + <type>button</type> + <id>306</id> + <posX>580</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>305</onleft> + <onright>307</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 07</description> + <type>button</type> + <id>307</id> + <posX>640</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>306</onleft> + <onright>307</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + </control> + </controls> +</window> Added: trunk/plugins/My Connect4/Skin/Sounds/MyConnect4_klick.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Sounds/MyConnect4_klick.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Source/MyConnect4/Engine.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/Engine.cs (rev 0) +++ trunk/plugins/My Connect4/Source/MyConnect4/Engine.cs 2007-04-10 11:54:17 UTC (rev 303) @@ -0,0 +1,116 @@ +using System; +using System.Drawing; + +namespace MediaPortal.GUI.MyConnect +{ + /// <summary> + /// Engine class handles the maintenance of player positions + /// on the game board and determines winning sequences of tokens. + /// </summary> + public class Engine + { + private static Random rand = new Random(System.DateTime.Now.Millisecond); + public State state; + + public Engine(int w, int h, int n) + { + state = new State(w, h, n); + } + + public State getState() + { + return state; + } + // drop a 'player' piece in column 'x' + + public Point makeMove(int player, int xPos) + { + int yPos = state.dropPiece(player, xPos); + return (new Point(xPos, yPos)); + } + + // AI algorithm + + public Point computerMove(int player, int level) + { + int bestXPos = -1, goodness = 0, bestWorst = -30000; + int numOfEqual = 0; + + // Simulate a drop in each of the columns + + for (int i = 0; i < state.getW(); i++) + { + State tempState = new State + (state, state.getW(), state.getH(), state.getN()); + + // If column is full, move on to the next column + + if (tempState.dropPiece(player, i) < 0) + continue; + + // If this drop wins the game, then cool + + if (tempState.isWinner(player)) + { + bestWorst = 25000; + bestXPos = i; + } + + // If its not a winner, run evaluate algorithm 'level' times + // to find the best column to drop into. IE level 2 will + // look Columns x 2 drops into the future... etc etc. + + else + goodness = tempState.evaluate(player, level, 1, -30000, + -bestWorst); + + // If this move looks better than the previous move remember it + + if (goodness > bestWorst) + { + bestWorst = goodness; + bestXPos = i; + numOfEqual = 1; + } + + // If two moves are equally good, make a random choice + + if (goodness == bestWorst) + { + numOfEqual++; + if (Math.Abs(rand.NextDouble()) % 10000 < + (10000 / numOfEqual)) + bestXPos = i; + } + } + + // Drop the piece in the best column + + if (bestXPos >= 0) + { + int yPos = state.dropPiece(player, bestXPos); + if (yPos >= 0) + return (new Point(bestXPos, yPos)); + } + return new Point(-1,-1); + } + + // returns the state of the current gameboard + + public int[,] getBoard() + { + return state.board; + } + + public bool isWinner(int player) + { + return state.isWinner(player); + } + + public bool isTie() + { + return state.isTie(); + } + } +} + Added: trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs (rev 0) +++ trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-04-10 11:54:17 UTC (rev 303) @@ -0,0 +1,480 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using System.Drawing; +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; +using MediaPortal.Util; +using MediaPortal.Utils; + +namespace MediaPortal.GUI.MyConnect +{ + public class MyConnect4GUI : GUIWindow , ISetupForm + { + #region SkinControl + [SkinControlAttribute(2)] protected GUIButtonControl BtnStart = null; + [SkinControlAttribute(4)] protected GUIButtonControl BtnLevel = null; + [SkinControlAttribute(3)] protected GUIButtonControl BtnMode = null; + + [SkinControlAttribute(7)] protected GUIButtonControl BtnWhatsThis = null; + #endregion + + #region Private variables + + string Level="Am"; //Choosen level + int AI = 3; + + string Mode = "2p"; //2player + + int Player = 0; + int round = 0; + + int wait = 0; + + private static OnActionHandler ah; + + private System.Windows.Forms.Timer _Game = new System.Windows.Forms.Timer(); + + private Engine gameEngine; + + #endregion + + #region ISetupForm Members + + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "My Connect 4"; + } + + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "Connect 4"; + } + + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "Mark Koenig (kroko)"; + } + + // show the setup dialog + public void ShowPlugin() + { + MessageBox.Show("Nothing to configure, this is just an example"); + } + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return 22031969; + } + + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return true; + } + + // indicates if a plugin has its own setup screen + public bool HasSetup() + { + return false; + } + + /// <summary> + /// If the plugin should have its own button on the main menu of MediaPortal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = PluginName(); + strButtonImage = String.Empty; + strButtonImageFocus = String.Empty; + strPictureImage = "hover_my connect4.png"; + return true; + } + + #endregion + + public override int GetID + { + get + { + return 22031969; + } + set + { + base.GetID = value; + } + } + + public override bool Init() + { + bool result = Load(GUIGraphicsContext.Skin + @"\MyConnect4.xml"); + if (ah == null) ah = new OnActionHandler(OnAction2); + return result; + } + + #region Actions + public override void OnAction(Action action) + { + base.OnAction(action); + } + public void OnAction2(Action action) + { + + if (GUIWindowManager.ActiveWindowEx == (int)GUIWindow.Window.WINDOW_DIALOG_MENU) return; + + //string t = action.wID.ToString(); + //GUIPropertyManager.SetProperty("#Round", t); + + if ((Player == 1) | (Player == 2 && Mode == "2p")) + { + switch (action.wID) + { + case Action.ActionType.ACTION_MOVE_LEFT: + + break; + case Action.ActionType.ACTION_MOVE_RIGHT : + + break; + case Action.ActionType.ACTION_SELECT_ITEM : + + break; + default: + break; + } + } + } + #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() + { + _Game.Interval = 300; + _Game.Tick += new EventHandler(_Game_Tick); + _Game.Start(); + + Player = 0; + Level = "Am"; + Mode = "2p"; + AI = 3; + + GUIPropertyManager.SetProperty("#Status", " "); + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Amateur"); + + // Disable level selection + GUIControl.DisableControl(GetID, 4); + + RelButtons(); + + GUIGraphicsContext.OnNewAction -= ah; + GUIGraphicsContext.OnNewAction += ah; + + base.OnPageLoad(); + + this.gameEngine = null; + this.gameEngine = new Engine(7, 6, 4); + + Drawfield (); + + } + + 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 == BtnMode) + OnBtnMode(); + if (control == BtnWhatsThis) + OnBtnWhatsThis(); + if (control == BtnStart) + { //start game + + if (Player == 0 && wait==0) + { + Player = 1; + round = 0; + GUIPropertyManager.SetProperty("#Status", " "); + + // Disable start button + GUIControl.DisableControl(GetID, 2); + // Disable level selection + GUIControl.DisableControl(GetID, 3); + // Disable mode selection + GUIControl.DisableControl(GetID, 4); + + this.gameEngine = null; + this.gameEngine = new Engine(7, 6, 4); + + Drawfield(); + + wait = 2; + GUIControl.FocusControl(GetID, 15); + } + } + if ((Player==1)|(Player==2 && Mode=="2p")) + { + + if ((controlId >= 301) && (controlId <= 307)) + { + //which button has clicked ? + int col = controlId - 301; + + PlayerClick(col); + wait = 2; + } + } + base.OnClicked(controlId, control, actionType); + } + + protected override void OnShowContextMenu() + { + base.OnShowContextMenu(); + } + + private void OnBtnLevel() + { //Choose level for the game + if (Player==0) + { + if (Level == "Nor") + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Professional"); + Level = "Pro"; + AI = 7; + } + else if (Level == "Pro") + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Amateur"); + Level = "Am"; + AI = 3; + } + else + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Normal"); + Level = "Nor"; + AI = 5; + } + } + } + + private void OnBtnMode() + { //Choose mode for the game + if (Player == 0) + { + if (Mode == "2p") + { + GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Computer"); + Mode = "1p"; + // Enable level selection + GUIControl.EnableControl(GetID, 4); + } + else + { + GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Player"); + Mode = "2p"; + // Disable level selection + GUIControl.DisableControl(GetID, 4); + } + } + } + + private void OnBtnWhatsThis() + { + GUIDialogText dlg = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); + dlg.SetHeading("What's Connect 4 (Vier gewinnt)"); + dlg.SetText("Connect 4 is a game where your object is to get 4 tokens in a row.\n" + + "This could be vertically, horizontal or diagonally.\n\n" + + "Gameboard design by Mikael S\xF6derstr\xF6m.\n\n" + + "AI code has been taken from http://www.Planet-Source-Code.com\n\n" + + "Good luck\nkroko"); + dlg.DoModal(GetID); + } + + private void Drawfield() + { // draw all fields + + int[,] Myboard = gameEngine.getBoard(); + + for (int i = 0; i < 7; i++) + { + for (int j = 0; j < 6; j++) + { + string prop = "#Con_" + (6-j) + "_" + (i+1); + + if (Myboard[i, j] == 2) + GUIPropertyManager.SetProperty(prop, "MyConn4Wh.png"); + if (Myboard[i, j] == 0) + GUIPropertyManager.SetProperty(prop, "MyConn4Ye.png"); + if (Myboard[i, j] == 1) + GUIPropertyManager.SetProperty(prop, "MyConn4Rd.png"); + if (Myboard[i, j] > 2) + GUIPropertyManager.SetProperty(prop, "MyConn4Gr.png"); + } + } + } + + private void PlayerClick(int droppos) + { + Point pos = gameEngine.makeMove(Player - 1, droppos); + if (pos.Y >= 0) + { + round++; + Drawfield(); + MediaPortal.Util.Utils.PlaySound("MyConnect4_klick.wav", false, true); + + + if (gameEngine.isWinner(Player - 1) == true) + { + int tmp = Player; + GUIPropertyManager.SetProperty("#Status", "Player " + tmp + " wins the game !"); + Player = 0; + RelButtons(); + gameEngine.getState().flashit(3); + Drawfield(); + } + if (gameEngine.isTie() == true) + { + GUIPropertyManager.SetProperty("#Status", "Nobody wins the game ! Its a draw !"); + Player = 0; + RelButtons(); + GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); + } + NextPlayer(); + } + + Drawfield(); + } + + private void NextPlayer() + { + if (Player != 0) + { + Player = Player + 1; + if (Player > 2) + Player = 1; + } + } + + private void RelButtons() + { + // Enable start button + GUIControl.EnableControl(GetID, 2); + // Enable mode selection + GUIControl.EnableControl(GetID, 3); + if (Mode == "1p") // Enable level selection + GUIControl.EnableControl(GetID, 4); + // Enable What this + GUIControl.EnableControl(GetID, 7); + + GUIControl.FocusControl(GetID, 2); + } + + void _Game_Tick(object sender, EventArgs e) + { + //display status of the game + if (Player == 0) + GUIPropertyManager.SetProperty("#Player", "GAME OVER"); + if (Player == 1) + GUIPropertyManager.SetProperty("#Player", "PLAYER 1"); + if (Player == 2) + GUIPropertyManager.SetProperty("#Player", "PLAYER 2"); + GUIPropertyManager.SetProperty("#Round", "Round: " + round ); + //wait time + if (wait > 0) + { + wait = wait - 1; + } + + if (Player == 2 && Mode == "1p" && wait==0) + { + Point pos = gameEngine.computerMove(1, AI); + if (pos.Y >= 0) + { + wait = 2; + round++; + Drawfield(); + MediaPortal.Util.Utils.PlaySound("MyConnect4_klick.wav", false, true); + + + if (gameEngine.isWinner(Player - 1) == true) + { + GUIPropertyManager.SetProperty("#Status", "Player 2 wins the game !"); + gameEngine.getState().flashit(3); + Drawfield(); + Player = 0; + RelButtons(); + } + if (gameEngine.isTie() == true) + { + GUIPropertyManager.SetProperty("#Status", "Nobody wins the game ! Its a draw !"); + Player = 0; + RelButtons(); + } + NextPlayer(); + } + Drawfield(); + + } + } + + } +} Added: trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.csproj =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.csproj (rev 0) +++ trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.csproj 2007-04-10 11:54:17 UTC (rev 303) @@ -0,0 +1,54 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{7D1DBAFA-199A-47D9-A19C-9FCBA4B3F1EA}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MyConnect4</RootNamespace> + <AssemblyName>MyConnect4</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="Core, Version=1.0.2593.1921, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=1.0.2593.1896, Culture=neutral, processorArchitecture=MSIL" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Engine.cs" /> + <Compile Include="MyConnect4.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="State.cs" /> + </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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Added: trunk/plugins/My Connect4/Source/MyConnect4/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/Properties/AssemblyInfo.cs (rev 0) +++ trunk/plugins/My Connect4/Source/MyConnect4/Properties/AssemblyInfo.cs 2007-04-10 11:54:17 UTC (rev 303) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die mit einer Assembly verknüpft sind. +[assembly: AssemblyTitle("MyConnect4")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyConnect4")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von +// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("9c36c885-c7f8-460a-a4bf-4b1893faf9bf")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern +// übernehmen, indem Sie "*" eingeben: +[assembly: AssemblyVersion("0.1.0.0")] +[assembly: AssemblyFileVersion("0.1.0.0")] Added: trunk/plugins/My Connect4/Source/MyConnect4/State.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/State.cs (rev 0) +++ trunk/plugins/My Connect4/Source/MyConnect4/State.cs 2007-04-10 11:54:17 UTC (rev 303) @@ -0,0 +1,313 @@ +using System; + +namespace MediaPortal.GUI.MyConnect +{ + /// <summary> + /// Monitors The State of a Game Board of width [columns] w, height [rows] h, + /// and maintains each possible winning combination of places on the + /// game board. + /// </summary> + + public class State + { + + private int winPlaces = 69, maxPieces = 42, Empty = 2; + private static bool[,,] map; + public int[,] board; + private int[,] score; + private int numPieces; + private int w = 7, h = 6, n = 4; + + public int getW() + { + return w; + } + public int getH() + { + return h; + } + public int getN() + { + return n; + } + + public State(int width, int height, int towin) + { + this.w = width; + this.h = height; + this.n = towin; + + winPlaces = (h*(w-n+1))+(w*(h-n+1))+(2*((h-n+1)*(w-n+1))); + maxPieces = w*h; + this.board = new int[w,h]; + this.score = new int[Empty,winPlaces]; + int i, j, k, count = 0; + + if (map == null) + { + map = new bool[w,h,winPlaces]; + for (i = 0; i < w; i++) + for (j = 0; j < h; j++) + for (k = 0; k < winPlaces; k++) + map[i,j,k] = false; + + // Set the horizontal win positions + + for (i = 0; i < h; i++) + for (j = 0; j < (w - n) + 1; j++) + { + for (k = 0; k < n; k++) + map[j + k,i,count] = true; + count++; + } + + // Set the vertical win positions + + for (i = 0; i < w; i++) + for (j = 0; j < (h - n) + 1; j++) + { + for (k = 0; k < n; k++) + map[i,j + k,count] = true; + count++; + } + + // Set the forward diagonal win positions + + for (i = 0; i < (h - n) + 1; i++) //(i = 0; i < h - n; i++) + for (j = 0; j < (w - n) + 1; j++) + { + for (k = 0; k < n; k++) + map[j + k,i + k,count] = true; + count++; + } + + // Set the backward diagonal win positions + /// + /// NOTE: the following nested loop is buggy... + /// one of the limit calculations is wrong... + /// result is that various combinations of + /// column x row sizes will cause either an exception + /// or will let a winning sequence be missed. + /// + + for (i = 0; i < (h - n) + 1; i++)//(i = 0; i < h - n; i++) + for (j = w - 1; j >= w - n; j--) + { // ;j >= w - n + 1; + for (k = 0; k < n; k++) + map[j - k,i + k,count] = true; + count++; + } + } + + // Initialize the board + + for (i = 0; i < w; i++) + for (j = 0; j < h; j++) + board[i,j] = Empty; + + // Initialize the scores + + for (i = 0; i < 2; i++) + for (j = 0; j < winPlaces; j++) + score[i,j] = 1; + + numPieces = 0; + + } + public State(State state, int width, int height, int towin) + { + this.w = width; + this.h = height; + this.n = towin; + + // work out the winning combinations on the given boardsize + // this is the number of times we can fit a unique line of + // length(n) in a board of height(h) by width(w) + + winPlaces = (h*(w-n+1))+(w*(h-n+1))+(2*((h-n+1)*(w-n+1))); + + // work out how many pieces will fill the board + + maxPieces = w*h; + + // create the board with the given height and width + + this.board = new int[w,h]; + + // create an array to track player points for each move + + this.score = new int[Empty,winPlaces]; + + // Copy the current board onto this one + + for (int i = 0; i < w; i++) + for (int j = 0; j < h; j++) + board[i,j] = state.board[i,j]; + + // Copy the current scores onto this one + + for (int i = 0; i < 2; i++) + for (int j = 0; j < winPlaces; j++) + score[i,j] = state.score[i,j]; + numPieces = state.numPieces; + } + + // winscore = 2^n IE. 4 balls in a row to win is 2^4 = 16 + + public bool isWinner(int player) + { + double winscore = Math.Pow(2, n); + for (int i = 0; i < winPlaces; i++) + if (score[player,i] == winscore) + return true; + return false; + } + + public bool isTie() + { + return (numPieces == maxPieces); + } + + public int dropPiece(int player, int xPos) + { + int yPos = 0; + + // drop from the top to the first empty slot + // ******** access an animation simulation routine + // through here... + + while ((board[xPos,yPos] != Empty) && (++yPos < h)); + if (yPos == h) // if the column is full + return -1; + + // otherwise the move is OK + // record the player now in that position + + board[xPos,yPos] = player; + numPieces++; + + // check the game state... + + updateScore(player, xPos, yPos); + return yPos; + } + + // evaluate continues Connect4Engine.computerMove method + // with alternate players + + public int evaluate(int player, int level, int depth, int alpha, int beta) + { + int goodness, best, maxab = alpha; + if (level != depth) + { + best = -30000; + + // drop into each column + + for(int i = 0; i < w; i++) + { + State tempState = new State(this, w, h, n); + + // if the column is full go to the next column... + + if (tempState.dropPiece(getOtherPlayer(player), i) < 0) + continue; + + // if the drop is a winner this is as far as we go in this + // look forward... + + if (tempState.isWinner(getOtherPlayer(player))) + goodness = 25000 - depth; + else + + // otherwise play the other players turn and see what they + // can do. + + goodness = tempState.evaluate(getOtherPlayer(player), + level, depth + 1, -beta, -maxab); + + // if their turn was better than ours, remember it. + + if (goodness > best) + { + best = goodness; + + // if this is the best so far remember it. + + if (best > maxab) + maxab = best; + } + + // logic error occurred - passed int limit + // simulates human error :) + + if (best > beta) + break; + } + return -best; + } + return (calcScore(player) - calcScore(getOtherPlayer(player))); + } + + // total a players score + + private int calcScore(int player) + { + int s = 0; + for (int i = 0; i < winPlaces; i++) + s += score[player,i]; + return s; + } + + // update the score array. If a map array coordinate is true, + // find which player is in that square and add the player number + // to the scoreboard. + + private void updateScore(int player, int x, int y) + { + for (int i = 0; i < winPlaces; i++) + if (map[x,y,i]) + { + score[player,i] <<= 1; + score[getOtherPlayer(player),i] = 0; + } + } + + // swap player focus + + private int getOtherPlayer(int player) + { + return (1 - player); + } + + // replaces game winner with temp value for animation routine + + public int flashit(int lux) + { + double winner = Math.Pow(2, n); + int i, j, k = 0; + int winplayer = 1; + for(i = 0; i < 2; i++) + { + for(j = 0; j < winPlaces; j++) + { + if( score[i,j] == (int)winner ) + k = j; + } + } + for(i = 0; i < w; i ++) + { + for(j = 0; j < h; j++) + { + if (map[i,j,k] == true) + { + winplayer = board[i,j]; + board[i,j] = lux; + } + } + } + return winplayer; + } + } +} + Added: trunk/plugins/My Connect4/Source/MyConnect4.sln =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4.sln (rev 0) +++ trunk/plugins/My Connect4/Source/MyConnect4.sln 2007-04-10 11:54:17 UTC (rev 303) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyConnect4", "MyConnect4\MyConnect4.csproj", "{7D1DBAFA-199A-47D9-A19C-9FCBA4B3F1EA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7D1DBAFA-199A-47D9-A19C-9FCBA4B3F1EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D1DBAFA-199A-47D9-A19C-9FCBA4B3F1EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D1DBAFA-199A-47D9-A19C-9FCBA4B3F1EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D1DBAFA-199A-47D9-A19C-9FCBA4B3F1EA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/My Connect4/Source/MyConnect4.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Source/MyConnect4.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Thumbs.db =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Thumbs.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/readme.txt =================================================================== --- trunk/plugins/My Connect4/readme.txt (rev 0) +++ trunk/plugins/My Connect4/readme.txt 2007-04-10 11:54:17 UTC (rev 303) @@ -0,0 +1,21 @@ +Visit the forum +http://forum.team-mediaportal.com/new_game_connect_4_vier_gewinnt-t20442.html + +Connect 4 (Vier gewinnt) +------------------------ +-Initial release +-1 and 2 player support +-Gameboard design by Mikael S\xF6derstr\xF6m. + +This nice game from MB as a MP version. You can play with +- the mouse +- remote left/right and OK + +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. + + +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. |
From: <kro...@us...> - 2007-05-06 11:37:43
|
Revision: 379 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=379&view=rev Author: kroko_koenig Date: 2007-05-06 04:37:38 -0700 (Sun, 06 May 2007) Log Message: ----------- Update "Connect 4" to Version 0.2 Modified Paths: -------------- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.csproj trunk/plugins/My Connect4/readme.txt Added Paths: ----------- trunk/plugins/My Connect4/Skin/Skin Blue Two/ trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml trunk/plugins/My Connect4/Skin/Skin SimpleMP/ trunk/plugins/My Connect4/Skin/Skin SimpleMP/MyConnect4.xml trunk/plugins/My Connect4/Skin/Skin default/ trunk/plugins/My Connect4/Skin/Skin default/Media/ trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Cur.png trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Gr.png trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Rd.png trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Wh.png trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Ye.png trunk/plugins/My Connect4/Skin/Skin default/Media/MyConnBack.png trunk/plugins/My Connect4/Skin/Skin default/Media/hover_my connect4.png trunk/plugins/My Connect4/Skin/Skin default/Sounds/ trunk/plugins/My Connect4/Skin/Skin default/Sounds/MyConnect4_klick.wav trunk/plugins/My Connect4/Source/MyConnect4/connect4.png trunk/plugins/My Connect4/Source/MyConnect4/connect4Disabled.png Removed Paths: ------------- trunk/plugins/My Connect4/Skin/Media/ trunk/plugins/My Connect4/Skin/MyConnect4.xml trunk/plugins/My Connect4/Skin/Sounds/ Deleted: trunk/plugins/My Connect4/Skin/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/MyConnect4.xml 2007-05-05 16:20:35 UTC (rev 378) +++ trunk/plugins/My Connect4/Skin/MyConnect4.xml 2007-05-06 11:37:38 UTC (rev 379) @@ -1,604 +0,0 @@ -<window> - <id>22031969</id> - <defaultcontrol>2</defaultcontrol> - <allowoverlay>yes</allowoverlay> - <autohidetopbar>yes</autohidetopbar> - <controls> - <import>common.time.xml</import> - <control> - <description>BackGround</description> - <type>image</type> - <id>10</id> - <posX>0</posX> - <posY>0</posY> - <width>720</width> - <height>576</height> - <texture>background.png</texture> - </control> - <control> - <description>text label</description> - <type>label</type> - <id>11</id> - <posX>60</posX> - <posY>70</posY> - <label>Connect 4</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> - <type>group</type> - <description>group element</description> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - <control> - <description>Start</description> - <type>button</type> - <id>2</id> - <posX>60</posX> - <posY>97</posY> - <label>Start</label> - <onleft>2</onleft> - <onright>301</onright> - <onup>7</onup> - <ondown>3</ondown> - </control> - <control> - <description>Mode</description> - <type>button</type> - <id>3</id> - <posX>60</posX> - <posY>131</posY> - <label>Mode: Play vs Player</label> - <onleft>3</onleft> - <onright>3</onright> - <onup>2</onup> - <ondown>4</ondown> - </control> - <control> - <description>Level</description> - <type>button</type> - <id>4</id> - <posX>60</posX> - <posY>165</posY> - <label>Level: Amateur</label> - <onleft>4</onleft> - <onright>4</onright> - <onup>3</onup> - <ondown>7</ondown> - </control> - <control> - <description>text label</description> - <type>label</type> - <id>5</id> - <posX>70</posX> - <posY>205</posY> - <label>#Round</label> - <font>font12</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> - </control> - <control> - <description>text label</description> - <type>label</type> - <id>6</id> - <posX>70</posX> - <posY>240</posY> - <label>#Player</label> - <font>font12</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> - </control> - <control> - <description>Whatsthis</description> - <type>button</type> - <id>7</id> - <posX>60</posX> - <posY>270</posY> - <label>What's this?</label> - <onleft>7</onleft> - <onright>301</onright> - <onup>4</onup> - <ondown>2</ondown> - </control> - </control> - <control> - <description>BackGround Game</description> - <type>image</type> - <id>15</id> - <posX>260</posX> - <posY>120</posY> - <width>440</width> - <height>380</height> - <texture>MyConnBack.png</texture> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - </control> - <control> - <type>group</type> - <description>group element</description> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - <control> - <type>image</type> - <id>101</id> - <posX>280</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_1</texture> - </control> - <control> - <type>image</type> - <id>102</id> - <posX>340</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_2</texture> - </control> - <control> - <type>image</type> - <id>103</id> - <posX>400</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_3</texture> - </control> - <control> - <type>image</type> - <id>104</id> - <posX>460</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_4</texture> - </control> - <control> - <type>image</type> - <id>105</id> - <posX>520</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_5</texture> - </control> - <control> - <type>image</type> - <id>106</id> - <posX>580</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_6</texture> - </control> - <control> - <type>image</type> - <id>107</id> - <posX>640</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_7</texture> - </control> - - <control> - <type>image</type> - <id>111</id> - <posX>280</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_1</texture> - </control> - <control> - <type>image</type> - <id>112</id> - <posX>340</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_2</texture> - </control> - <control> - <type>image</type> - <id>113</id> - <posX>400</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_3</texture> - </control> - <control> - <type>image</type> - <id>114</id> - <posX>460</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_4</texture> - </control> - <control> - <type>image</type> - <id>115</id> - <posX>520</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_5</texture> - </control> - <control> - <type>image</type> - <id>116</id> - <posX>580</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_6</texture> - </control> - <control> - <type>image</type> - <id>117</id> - <posX>640</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_7</texture> - </control> - - <control> - <type>image</type> - <id>121</id> - <posX>280</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_1</texture> - </control> - <control> - <type>image</type> - <id>122</id> - <posX>340</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_2</texture> - </control> - <control> - <type>image</type> - <id>123</id> - <posX>400</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_3</texture> - </control> - <control> - <type>image</type> - <id>124</id> - <posX>460</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_4</texture> - </control> - <control> - <type>image</type> - <id>125</id> - <posX>520</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_5</texture> - </control> - <control> - <type>image</type> - <id>126</id> - <posX>580</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_6</texture> - </control> - <control> - <type>image</type> - <id>127</id> - <posX>640</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_7</texture> - </control> - - <control> - <type>image</type> - <id>131</id> - <posX>280</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_1</texture> - </control> - <control> - <type>image</type> - <id>132</id> - <posX>340</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_2</texture> - </control> - <control> - <type>image</type> - <id>133</id> - <posX>400</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_3</texture> - </control> - <control> - <type>image</type> - <id>134</id> - <posX>460</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_4</texture> - </control> - <control> - <type>image</type> - <id>135</id> - <posX>520</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_5</texture> - </control> - <control> - <type>image</type> - <id>136</id> - <posX>580</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_6</texture> - </control> - <control> - <type>image</type> - <id>137</id> - <posX>640</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_7</texture> - </control> - - <control> - <type>image</type> - <id>141</id> - <posX>280</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_1</texture> - </control> - <control> - <type>image</type> - <id>142</id> - <posX>340</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_2</texture> - </control> - <control> - <type>image</type> - <id>143</id> - <posX>400</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_3</texture> - </control> - <control> - <type>image</type> - <id>144</id> - <posX>460</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_4</texture> - </control> - <control> - <type>image</type> - <id>145</id> - <posX>520</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_5</texture> - </control> - <control> - <type>image</type> - <id>146</id> - <posX>580</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_6</texture> - </control> - <control> - <type>image</type> - <id>147</id> - <posX>640</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_7</texture> - </control> - - <control> - <type>image</type> - <id>151</id> - <posX>280</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_1</texture> - </control> - <control> - <type>image</type> - <id>152</id> - <posX>340</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_2</texture> - </control> - <control> - <type>image</type> - <id>153</id> - <posX>400</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_3</texture> - </control> - <control> - <type>image</type> - <id>154</id> - <posX>460</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_4</texture> - </control> - <control> - <type>image</type> - <id>155</id> - <posX>520</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_5</texture> - </control> - <control> - <type>image</type> - <id>156</id> - <posX>580</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_6</texture> - </control> - <control> - <type>image</type> - <id>157</id> - <posX>640</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_7</texture> - </control> - <control> - <description>text label</description> - <type>label</type> - <id>18</id> - <posX>260</posX> - <posY>510</posY> - <label>#Status</label> - <font>font16</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> - </control> - <control> - <description>Pointer 01</description> - <type>button</type> - <id>301</id> - <posX>280</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>2</onleft> - <onright>302</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 02</description> - <type>button</type> - <id>302</id> - <posX>340</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>301</onleft> - <onright>303</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 03</description> - <type>button</type> - <id>303</id> - <posX>400</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>302</onleft> - <onright>304</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 04</description> - <type>button</type> - <id>304</id> - <posX>460</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>303</onleft> - <onright>305</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 05</description> - <type>button</type> - <id>305</id> - <posX>520</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>304</onleft> - <onright>306</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 06</description> - <type>button</type> - <id>306</id> - <posX>580</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>305</onleft> - <onright>307</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 07</description> - <type>button</type> - <id>307</id> - <posX>640</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>306</onleft> - <onright>307</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - </control> - </controls> -</window> Added: trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml (rev 0) +++ trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml 2007-05-06 11:37:38 UTC (rev 379) @@ -0,0 +1,604 @@ +<window> + <id>22031969</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <autohidetopbar>yes</autohidetopbar> + <controls> + <import>common.time.xml</import> + <control> + <description>BackGround</description> + <type>image</type> + <id>10</id> + <posX>0</posX> + <posY>0</posY> + <width>720</width> + <height>576</height> + <texture>background.png</texture> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>11</id> + <posX>60</posX> + <posY>70</posY> + <label>Connect 4</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> + <type>group</type> + <description>group element</description> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + <control> + <description>Start</description> + <type>button</type> + <id>2</id> + <posX>60</posX> + <posY>97</posY> + <label>Start</label> + <onleft>2</onleft> + <onright>301</onright> + <onup>7</onup> + <ondown>3</ondown> + </control> + <control> + <description>Mode</description> + <type>button</type> + <id>3</id> + <posX>60</posX> + <posY>131</posY> + <label>Mode: Play vs Player</label> + <onleft>3</onleft> + <onright>3</onright> + <onup>2</onup> + <ondown>4</ondown> + </control> + <control> + <description>Level</description> + <type>button</type> + <id>4</id> + <posX>60</posX> + <posY>165</posY> + <label>Level: Amateur</label> + <onleft>4</onleft> + <onright>4</onright> + <onup>3</onup> + <ondown>7</ondown> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>5</id> + <posX>70</posX> + <posY>205</posY> + <label>#Round</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>6</id> + <posX>70</posX> + <posY>240</posY> + <label>#Player</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Whatsthis</description> + <type>button</type> + <id>7</id> + <posX>60</posX> + <posY>270</posY> + <label>What's this?</label> + <onleft>7</onleft> + <onright>301</onright> + <onup>4</onup> + <ondown>2</ondown> + </control> + </control> + <control> + <description>BackGround Game</description> + <type>image</type> + <id>15</id> + <posX>260</posX> + <posY>120</posY> + <width>440</width> + <height>380</height> + <texture>MyConnBack.png</texture> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + </control> + <control> + <type>group</type> + <description>group element</description> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + <control> + <type>image</type> + <id>101</id> + <posX>280</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_1</texture> + </control> + <control> + <type>image</type> + <id>102</id> + <posX>340</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_2</texture> + </control> + <control> + <type>image</type> + <id>103</id> + <posX>400</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_3</texture> + </control> + <control> + <type>image</type> + <id>104</id> + <posX>460</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_4</texture> + </control> + <control> + <type>image</type> + <id>105</id> + <posX>520</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_5</texture> + </control> + <control> + <type>image</type> + <id>106</id> + <posX>580</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_6</texture> + </control> + <control> + <type>image</type> + <id>107</id> + <posX>640</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_7</texture> + </control> + + <control> + <type>image</type> + <id>111</id> + <posX>280</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_1</texture> + </control> + <control> + <type>image</type> + <id>112</id> + <posX>340</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_2</texture> + </control> + <control> + <type>image</type> + <id>113</id> + <posX>400</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_3</texture> + </control> + <control> + <type>image</type> + <id>114</id> + <posX>460</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_4</texture> + </control> + <control> + <type>image</type> + <id>115</id> + <posX>520</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_5</texture> + </control> + <control> + <type>image</type> + <id>116</id> + <posX>580</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_6</texture> + </control> + <control> + <type>image</type> + <id>117</id> + <posX>640</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_7</texture> + </control> + + <control> + <type>image</type> + <id>121</id> + <posX>280</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_1</texture> + </control> + <control> + <type>image</type> + <id>122</id> + <posX>340</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_2</texture> + </control> + <control> + <type>image</type> + <id>123</id> + <posX>400</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_3</texture> + </control> + <control> + <type>image</type> + <id>124</id> + <posX>460</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_4</texture> + </control> + <control> + <type>image</type> + <id>125</id> + <posX>520</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_5</texture> + </control> + <control> + <type>image</type> + <id>126</id> + <posX>580</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_6</texture> + </control> + <control> + <type>image</type> + <id>127</id> + <posX>640</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_7</texture> + </control> + + <control> + <type>image</type> + <id>131</id> + <posX>280</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_1</texture> + </control> + <control> + <type>image</type> + <id>132</id> + <posX>340</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_2</texture> + </control> + <control> + <type>image</type> + <id>133</id> + <posX>400</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_3</texture> + </control> + <control> + <type>image</type> + <id>134</id> + <posX>460</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_4</texture> + </control> + <control> + <type>image</type> + <id>135</id> + <posX>520</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_5</texture> + </control> + <control> + <type>image</type> + <id>136</id> + <posX>580</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_6</texture> + </control> + <control> + <type>image</type> + <id>137</id> + <posX>640</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_7</texture> + </control> + + <control> + <type>image</type> + <id>141</id> + <posX>280</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_1</texture> + </control> + <control> + <type>image</type> + <id>142</id> + <posX>340</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_2</texture> + </control> + <control> + <type>image</type> + <id>143</id> + <posX>400</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_3</texture> + </control> + <control> + <type>image</type> + <id>144</id> + <posX>460</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_4</texture> + </control> + <control> + <type>image</type> + <id>145</id> + <posX>520</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_5</texture> + </control> + <control> + <type>image</type> + <id>146</id> + <posX>580</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_6</texture> + </control> + <control> + <type>image</type> + <id>147</id> + <posX>640</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_7</texture> + </control> + + <control> + <type>image</type> + <id>151</id> + <posX>280</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_1</texture> + </control> + <control> + <type>image</type> + <id>152</id> + <posX>340</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_2</texture> + </control> + <control> + <type>image</type> + <id>153</id> + <posX>400</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_3</texture> + </control> + <control> + <type>image</type> + <id>154</id> + <posX>460</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_4</texture> + </control> + <control> + <type>image</type> + <id>155</id> + <posX>520</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_5</texture> + </control> + <control> + <type>image</type> + <id>156</id> + <posX>580</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_6</texture> + </control> + <control> + <type>image</type> + <id>157</id> + <posX>640</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_7</texture> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>18</id> + <posX>260</posX> + <posY>510</posY> + <label>#Status</label> + <font>font16</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Pointer 01</description> + <type>button</type> + <id>301</id> + <posX>280</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>2</onleft> + <onright>302</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 02</description> + <type>button</type> + <id>302</id> + <posX>340</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>301</onleft> + <onright>303</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 03</description> + <type>button</type> + <id>303</id> + <posX>400</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>302</onleft> + <onright>304</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 04</description> + <type>button</type> + <id>304</id> + <posX>460</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>303</onleft> + <onright>305</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 05</description> + <type>button</type> + <id>305</id> + <posX>520</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>304</onleft> + <onright>306</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 06</description> + <type>button</type> + <id>306</id> + <posX>580</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>305</onleft> + <onright>307</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 07</description> + <type>button</type> + <id>307</id> + <posX>640</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>306</onleft> + <onright>307</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + </control> + </controls> +</window> Added: trunk/plugins/My Connect4/Skin/Skin SimpleMP/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/Skin SimpleMP/MyConnect4.xml (rev 0) +++ trunk/plugins/My Connect4/Skin/Skin SimpleMP/MyConnect4.xml 2007-05-06 11:37:38 UTC (rev 379) @@ -0,0 +1,618 @@ +<window> + <id>22031969</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <autohidetopbar>yes</autohidetopbar> + <controls> + <import>common.time.xml</import> + <control> + <description>Connect4 label</description> + <type>label</type> + <posX>55</posX> + <posY>20</posY> + <align>left</align> + <font>font48</font> + <label>Connect 4</label> + <textcolor>20ffffff</textcolor> + <id>1</id> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + </control> + + <control> + <description>BackGround</description> + <type>image</type> + <id>10</id> + <posX>0</posX> + <posY>0</posY> + <width>720</width> + <height>576</height> + <texture>background.png</texture> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>11</id> + <posX>60</posX> + <posY>70</posY> + <label>Connect 4</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> + <type>group</type> + <description>group element</description> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + <control> + <description>Start</description> + <type>button</type> + <id>2</id> + <posX>60</posX> + <posY>97</posY> + <label>Start</label> + <onleft>2</onleft> + <onright>301</onright> + <onup>7</onup> + <ondown>3</ondown> + </control> + <control> + <description>Mode</description> + <type>button</type> + <id>3</id> + <posX>60</posX> + <posY>131</posY> + <label>Mode: Play vs Player</label> + <onleft>3</onleft> + <onright>3</onright> + <onup>2</onup> + <ondown>4</ondown> + </control> + <control> + <description>Level</description> + <type>button</type> + <id>4</id> + <posX>60</posX> + <posY>165</posY> + <label>Level: Amateur</label> + <onleft>4</onleft> + <onright>4</onright> + <onup>3</onup> + <ondown>7</ondown> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>5</id> + <posX>70</posX> + <posY>205</posY> + <label>#Round</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>6</id> + <posX>70</posX> + <posY>240</posY> + <label>#Player</label> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Whatsthis</description> + <type>button</type> + <id>7</id> + <posX>60</posX> + <posY>270</posY> + <label>What's this?</label> + <onleft>7</onleft> + <onright>301</onright> + <onup>4</onup> + <ondown>2</ondown> + </control> + </control> + <control> + <description>BackGround Game</description> + <type>image</type> + <id>15</id> + <posX>260</posX> + <posY>120</posY> + <width>440</width> + <height>380</height> + <texture>MyConnBack.png</texture> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + </control> + <control> + <type>group</type> + <description>group element</description> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> + <control> + <type>image</type> + <id>101</id> + <posX>280</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_1</texture> + </control> + <control> + <type>image</type> + <id>102</id> + <posX>340</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_2</texture> + </control> + <control> + <type>image</type> + <id>103</id> + <posX>400</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_3</texture> + </control> + <control> + <type>image</type> + <id>104</id> + <posX>460</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_4</texture> + </control> + <control> + <type>image</type> + <id>105</id> + <posX>520</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_5</texture> + </control> + <control> + <type>image</type> + <id>106</id> + <posX>580</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_6</texture> + </control> + <control> + <type>image</type> + <id>107</id> + <posX>640</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_7</texture> + </control> + + <control> + <type>image</type> + <id>111</id> + <posX>280</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_1</texture> + </control> + <control> + <type>image</type> + <id>112</id> + <posX>340</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_2</texture> + </control> + <control> + <type>image</type> + <id>113</id> + <posX>400</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_3</texture> + </control> + <control> + <type>image</type> + <id>114</id> + <posX>460</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_4</texture> + </control> + <control> + <type>image</type> + <id>115</id> + <posX>520</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_5</texture> + </control> + <control> + <type>image</type> + <id>116</id> + <posX>580</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_6</texture> + </control> + <control> + <type>image</type> + <id>117</id> + <posX>640</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_7</texture> + </control> + + <control> + <type>image</type> + <id>121</id> + <posX>280</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_1</texture> + </control> + <control> + <type>image</type> + <id>122</id> + <posX>340</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_2</texture> + </control> + <control> + <type>image</type> + <id>123</id> + <posX>400</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_3</texture> + </control> + <control> + <type>image</type> + <id>124</id> + <posX>460</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_4</texture> + </control> + <control> + <type>image</type> + <id>125</id> + <posX>520</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_5</texture> + </control> + <control> + <type>image</type> + <id>126</id> + <posX>580</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_6</texture> + </control> + <control> + <type>image</type> + <id>127</id> + <posX>640</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_7</texture> + </control> + + <control> + <type>image</type> + <id>131</id> + <posX>280</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_1</texture> + </control> + <control> + <type>image</type> + <id>132</id> + <posX>340</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_2</texture> + </control> + <control> + <type>image</type> + <id>133</id> + <posX>400</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_3</texture> + </control> + <control> + <type>image</type> + <id>134</id> + <posX>460</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_4</texture> + </control> + <control> + <type>image</type> + <id>135</id> + <posX>520</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_5</texture> + </control> + <control> + <type>image</type> + <id>136</id> + <posX>580</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_6</texture> + </control> + <control> + <type>image</type> + <id>137</id> + <posX>640</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_7</texture> + </control> + + <control> + <type>image</type> + <id>141</id> + <posX>280</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_1</texture> + </control> + <control> + <type>image</type> + <id>142</id> + <posX>340</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_2</texture> + </control> + <control> + <type>image</type> + <id>143</id> + <posX>400</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_3</texture> + </control> + <control> + <type>image</type> + <id>144</id> + <posX>460</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_4</texture> + </control> + <control> + <type>image</type> + <id>145</id> + <posX>520</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_5</texture> + </control> + <control> + <type>image</type> + <id>146</id> + <posX>580</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_6</texture> + </control> + <control> + <type>image</type> + <id>147</id> + <posX>640</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_7</texture> + </control> + + <control> + <type>image</type> + <id>151</id> + <posX>280</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_1</texture> + </control> + <control> + <type>image</type> + <id>152</id> + <posX>340</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_2</texture> + </control> + <control> + <type>image</type> + <id>153</id> + <posX>400</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_3</texture> + </control> + <control> + <type>image</type> + <id>154</id> + <posX>460</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_4</texture> + </control> + <control> + <type>image</type> + <id>155</id> + <posX>520</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_5</texture> + </control> + <control> + <type>image</type> + <id>156</id> + <posX>580</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_6</texture> + </control> + <control> + <type>image</type> + <id>157</id> + <posX>640</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_7</texture> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>18</id> + <posX>260</posX> + <posY>510</posY> + <label>#Status</label> + <font>font16</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Pointer 01</description> + <type>button</type> + <id>301</id> + <posX>280</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>2</onleft> + <onright>302</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 02</description> + <type>button</type> + <id>302</id> + <posX>340</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>301</onleft> + <onright>303</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 03</description> + <type>button</type> + <id>303</id> + <posX>400</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>302</onleft> + <onright>304</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 04</description> + <type>button</type> + <id>304</id> + <posX>460</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>303</onleft> + <onright>305</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 05</description> + <type>button</type> + <id>305</id> + <posX>520</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>304</onleft> + <onright>306</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 06</description> + <type>button</type> + <id>306</id> + <posX>580</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>305</onleft> + <onright>307</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 07</description> + <type>button</type> + <id>307</id> + <posX>640</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>306</onleft> + <onright>307</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + </control> + </controls> +</window> Added: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Cur.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Cur.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Gr.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Gr.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Rd.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Rd.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Wh.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Wh.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Ye.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConn4Ye.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConnBack.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Skin default/Media/MyConnBack.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Skin default/Media/hover_my connect4.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Skin default/Media/hover_my connect4.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Skin/Skin default/Sounds/MyConnect4_klick.wav =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Skin/Skin default/Sounds/MyConnect4_klick.wav ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-05 16:20:35 UTC (rev 378) +++ trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-06 11:37:38 UTC (rev 379) @@ -32,10 +32,12 @@ using MediaPortal.Dialogs; using MediaPortal.Util; using MediaPortal.Utils; +using MediaPortal.Configuration; namespace MediaPortal.GUI.MyConnect { - public class MyConnect4GUI : GUIWindow , ISetupForm + [PluginIcons("MyConnect4.connect4.png", "MyConnect4.connect4Disabled.png")] + public class MyConnect4GUI : GUIWindow, ISetupForm { #region SkinControl [SkinControlAttribute(2)] protected GUIButtonControl BtnStart = null; @@ -47,10 +49,10 @@ #region Private variables - string Level="Am"; //Choosen level - int AI = 3; + string Level="Nor"; //Choosen level + int AI = 5; - string Mode = "2p"; //2player + string Mode = "1p"; //2player int Player = 0; int round = 0; @@ -128,7 +130,7 @@ /// false : plugin does not need its own button on home</returns> public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) - { + { strButtonText = PluginName(); strButtonImage = String.Empty; strButtonImageFocus = String.Empty; @@ -208,12 +210,13 @@ _Game.Start(); Player = 0; - Level = "Am"; - Mode = "2p"; - AI = 3; + Level = "Nor"; + Mode = "1p"; + AI = 5; GUIPropertyManager.SetProperty("#Status", " "); - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Amateur"); + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Normal"); + GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Comp"); // Disable level selection GUIControl.DisableControl(GetID, 4); @@ -299,7 +302,7 @@ { GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Professional"); Level = "Pro"; - AI = 7; + AI = 8; } else if (Level == "Pro") { @@ -322,7 +325,7 @@ { if (Mode == "2p") { - GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Computer"); + GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Comp"); Mode = "1p"; // Enable level selection GUIControl.EnableControl(GetID, 4); @@ -345,7 +348,7 @@ "This could be vertically, horizontal or diagonally.\n\n" + "Gameboard design by Mikael S\xF6derstr\xF6m.\n\n" + "AI code has been taken from http://www.Planet-Source-Code.com\n\n" + - "Good luck\nkroko"); + "Good luck\nMark Koenig (kroko)"); dlg.DoModal(GetID); } @@ -425,7 +428,7 @@ // Enable What this GUIControl.EnableControl(GetID, 7); - GUIControl.FocusControl(GetID, 2); + //GUIControl.FocusControl(GetID, 2); } void _Game_Tick(object sender, EventArgs e) Modified: trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.csproj =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.csproj 2007-05-05 16:20:35 UTC (rev 378) +++ trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.csproj 2007-05-06 11:37:38 UTC (rev 379) @@ -28,14 +28,26 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.2593.1921, Culture=neutral, processorArchitecture=MSIL" /> - <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <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=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.Drawing" /> <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="Engine.cs" /> @@ -43,6 +55,10 @@ <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="State.cs" /> </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="connect4.png" /> + <EmbeddedResource Include="connect4Disabled.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. Added: trunk/plugins/My Connect4/Source/MyConnect4/connect4.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Source/MyConnect4/connect4.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/My Connect4/Source/MyConnect4/connect4Disabled.png =================================================================== (Binary files differ) Property changes on: trunk/plugins/My Connect4/Source/MyConnect4/connect4Disabled.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/plugins/My Connect4/readme.txt =================================================================== --- trunk/plugins/My Connect4/readme.txt 2007-05-05 16:20:35 UTC (rev 378) +++ trunk/plugins/My Connect4/readme.txt 2007-05-06 11:37:38 UTC (rev 379) @@ -3,19 +3,38 @@ Connect 4 (Vier gewinnt) ------------------------ --Initial release --1 and 2 player support --Gameboard design by Mikael S\xF6derstr\xF6m. -This nice game from MB as a MP version. You can play with -- the mouse -- remote left/right and OK +v0.2 -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. +-nice icons for the config +-short the text to "play vs comp" +-standard AI is now play vs comp and level normal +-focus if game ends do not jumo from form +-add the Simple MP skin file to the release +Design of the board by +Mikael S\xF6derstr\xF6m +Install: +Copy the skin default files for gfx and sound +Copy the skin blue two or Simple MP +Copy the dll into the plugin window + +Play: +- with mouse +- remote left/right and OK + Have fun. Greetz -kroko \ No newline at end of file +kroko + +------------------------------------------ + +v0.1 + +-Initial release +-1 and 2 player support + +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. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-05-24 15:35:15
|
Revision: 422 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=422&view=rev Author: chef_koch Date: 2007-05-24 08:35:07 -0700 (Thu, 24 May 2007) Log Message: ----------- deleted obsolete Thumbs.db added german and english languageFiles added multilanguage support cleanup for B2skin file Modified Paths: -------------- trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.csproj Added Paths: ----------- trunk/plugins/My Connect4/Source/MyConnect4/LocalizeStrings.cs trunk/plugins/My Connect4/language/ trunk/plugins/My Connect4/language/MyConnect4/ trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml Removed Paths: ------------- trunk/plugins/My Connect4/Thumbs.db Modified: trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml 2007-05-23 16:45:51 UTC (rev 421) +++ trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml 2007-05-24 15:35:07 UTC (rev 422) @@ -1,604 +1,601 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> <window> - <id>22031969</id> - <defaultcontrol>2</defaultcontrol> - <allowoverlay>yes</allowoverlay> - <autohidetopbar>yes</autohidetopbar> - <controls> - <import>common.time.xml</import> - <control> - <description>BackGround</description> - <type>image</type> - <id>10</id> - <posX>0</posX> - <posY>0</posY> - <width>720</width> - <height>576</height> - <texture>background.png</texture> - </control> - <control> - <description>text label</description> - <type>label</type> - <id>11</id> - <posX>60</posX> - <posY>70</posY> - <label>Connect 4</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> + <id>22031969</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <autohidetopbar>yes</autohidetopbar> + <controls> + <import>common.time.xml</import> + <control> + <description>BackGround</description> + <type>image</type> + <id>10</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>11</id> + <posX>250</posX> + <posY>70</posY> + <font>font16</font> + <align>right</align> + <textcolor>White</textcolor> + <animation effect="fade" time="200">WindowOpen</animation> + <animation effect="fade" time="200">WindowClose</animation> + </control> + <control> + <description>button group</description> <type>group</type> - <description>group element</description> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - <control> - <description>Start</description> - <type>button</type> - <id>2</id> - <posX>60</posX> - <posY>97</posY> - <label>Start</label> - <onleft>2</onleft> - <onright>301</onright> - <onup>7</onup> - <ondown>3</ondown> - </control> - <control> - <description>Mode</description> - <type>button</type> - <id>3</id> - <posX>60</posX> + <animation effect="fade" time="250">WindowOpen</animation> + <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> + <control> + <description>Start</description> + <type>button</type> + <id>2</id> + <posX>60</posX> + <posY>97</posY> + <onleft>2</onleft> + <onright>301</onright> + <onup>7</onup> + <ondown>3</ondown> + </control> + <control> + <description>Mode</description> + <type>button</type> + <id>3</id> + <posX>60</posX> <posY>131</posY> - <label>Mode: Play vs Player</label> - <onleft>3</onleft> - <onright>3</onright> - <onup>2</onup> - <ondown>4</ondown> - </control> - <control> - <description>Level</description> - <type>button</type> - <id>4</id> - <posX>60</posX> + <onleft>3</onleft> + <onright>301</onright> + <onup>2</onup> + <ondown>4</ondown> + </control> + <control> + <description>Level</description> + <type>button</type> + <id>4</id> + <posX>60</posX> <posY>165</posY> - <label>Level: Amateur</label> - <onleft>4</onleft> - <onright>4</onright> - <onup>3</onup> - <ondown>7</ondown> - </control> - <control> - <description>text label</description> + <onleft>4</onleft> + <onright>301</onright> + <onup>3</onup> + <ondown>7</ondown> + </control> + <control> + <description>Round</description> <type>label</type> <id>5</id> <posX>70</posX> <posY>205</posY> <label>#Round</label> - <font>font12</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> - </control> - <control> - <description>text label</description> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Player: / GameOver</description> <type>label</type> <id>6</id> <posX>70</posX> <posY>240</posY> <label>#Player</label> - <font>font12</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> - </control> - <control> - <description>Whatsthis</description> + <font>font12</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>What is this?</description> <type>button</type> <id>7</id> <posX>60</posX> <posY>270</posY> - <label>What's this?</label> <onleft>7</onleft> <onright>301</onright> <onup>4</onup> <ondown>2</ondown> - </control> - </control> - <control> - <description>BackGround Game</description> - <type>image</type> - <id>15</id> - <posX>260</posX> - <posY>120</posY> - <width>440</width> - <height>380</height> - <texture>MyConnBack.png</texture> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> </control> - <control> - <type>group</type> - <description>group element</description> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - <control> - <type>image</type> - <id>101</id> - <posX>280</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_1</texture> - </control> - <control> - <type>image</type> - <id>102</id> - <posX>340</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_2</texture> - </control> - <control> - <type>image</type> - <id>103</id> - <posX>400</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_3</texture> - </control> - <control> - <type>image</type> - <id>104</id> - <posX>460</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_4</texture> - </control> - <control> - <type>image</type> - <id>105</id> - <posX>520</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_5</texture> - </control> - <control> - <type>image</type> - <id>106</id> - <posX>580</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_6</texture> - </control> - <control> - <type>image</type> - <id>107</id> - <posX>640</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_7</texture> - </control> - - <control> - <type>image</type> - <id>111</id> - <posX>280</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_1</texture> - </control> - <control> - <type>image</type> - <id>112</id> - <posX>340</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_2</texture> - </control> - <control> - <type>image</type> - <id>113</id> - <posX>400</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_3</texture> - </control> - <control> - <type>image</type> - <id>114</id> - <posX>460</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_4</texture> - </control> - <control> - <type>image</type> - <id>115</id> - <posX>520</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_5</texture> - </control> - <control> - <type>image</type> - <id>116</id> - <posX>580</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_6</texture> - </control> - <control> - <type>image</type> - <id>117</id> - <posX>640</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_7</texture> - </control> - - <control> - <type>image</type> - <id>121</id> - <posX>280</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_1</texture> - </control> - <control> - <type>image</type> - <id>122</id> - <posX>340</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_2</texture> - </control> - <control> - <type>image</type> - <id>123</id> - <posX>400</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_3</texture> - </control> - <control> - <type>image</type> - <id>124</id> - <posX>460</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_4</texture> - </control> - <control> - <type>image</type> - <id>125</id> - <posX>520</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_5</texture> - </control> - <control> - <type>image</type> - <id>126</id> - <posX>580</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_6</texture> - </control> - <control> - <type>image</type> - <id>127</id> - <posX>640</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_7</texture> - </control> - - <control> - <type>image</type> - <id>131</id> - <posX>280</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_1</texture> - </control> - <control> - <type>image</type> - <id>132</id> - <posX>340</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_2</texture> - </control> - <control> - <type>image</type> - <id>133</id> - <posX>400</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_3</texture> - </control> - <control> - <type>image</type> - <id>134</id> - <posX>460</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_4</texture> - </control> - <control> - <type>image</type> - <id>135</id> - <posX>520</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_5</texture> - </control> - <control> - <type>image</type> - <id>136</id> - <posX>580</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_6</texture> - </control> - <control> - <type>image</type> - <id>137</id> - <posX>640</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_7</texture> - </control> - - <control> - <type>image</type> - <id>141</id> - <posX>280</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_1</texture> - </control> - <control> - <type>image</type> - <id>142</id> - <posX>340</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_2</texture> - </control> - <control> - <type>image</type> - <id>143</id> - <posX>400</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_3</texture> - </control> - <control> - <type>image</type> - <id>144</id> - <posX>460</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_4</texture> - </control> - <control> - <type>image</type> - <id>145</id> - <posX>520</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_5</texture> - </control> - <control> - <type>image</type> - <id>146</id> - <posX>580</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_6</texture> - </control> - <control> - <type>image</type> - <id>147</id> - <posX>640</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_7</texture> - </control> - - <control> - <type>image</type> - <id>151</id> - <posX>280</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_1</texture> - </control> - <control> - <type>image</type> - <id>152</id> - <posX>340</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_2</texture> - </control> - <control> - <type>image</type> - <id>153</id> - <posX>400</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_3</texture> - </control> - <control> - <type>image</type> - <id>154</id> - <posX>460</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_4</texture> - </control> - <control> - <type>image</type> - <id>155</id> - <posX>520</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_5</texture> - </control> - <control> - <type>image</type> - <id>156</id> - <posX>580</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_6</texture> - </control> - <control> - <type>image</type> - <id>157</id> - <posX>640</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_7</texture> - </control> - <control> - <description>text label</description> - <type>label</type> - <id>18</id> - <posX>260</posX> - <posY>510</posY> - <label>#Status</label> - <font>font16</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> - </control> - <control> - <description>Pointer 01</description> - <type>button</type> - <id>301</id> - <posX>280</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>2</onleft> - <onright>302</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 02</description> - <type>button</type> - <id>302</id> - <posX>340</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>301</onleft> - <onright>303</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 03</description> - <type>button</type> - <id>303</id> - <posX>400</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>302</onleft> - <onright>304</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 04</description> - <type>button</type> - <id>304</id> - <posX>460</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>303</onleft> - <onright>305</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 05</description> - <type>button</type> - <id>305</id> - <posX>520</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>304</onleft> - <onright>306</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 06</description> - <type>button</type> - <id>306</id> - <posX>580</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>305</onleft> - <onright>307</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 07</description> - <type>button</type> - <id>307</id> - <posX>640</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>306</onleft> - <onright>307</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - </control> - </controls> + </control> + <control> + <description>BackGround Game</description> + <type>image</type> + <id>15</id> + <posX>260</posX> + <posY>120</posY> + <width>440</width> + <height>380</height> + <texture>MyConnBack.png</texture> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> + <animation effect="slide" time="400" end="800,0">WindowClose</animation> + </control> + <control> + <description>game group</description> + <type>group</type> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> + <animation effect="slide" time="400" end="800,0">WindowClose</animation> + <control> + <type>image</type> + <id>101</id> + <posX>280</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_1</texture> + </control> + <control> + <type>image</type> + <id>102</id> + <posX>340</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_2</texture> + </control> + <control> + <type>image</type> + <id>103</id> + <posX>400</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_3</texture> + </control> + <control> + <type>image</type> + <id>104</id> + <posX>460</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_4</texture> + </control> + <control> + <type>image</type> + <id>105</id> + <posX>520</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_5</texture> + </control> + <control> + <type>image</type> + <id>106</id> + <posX>580</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_6</texture> + </control> + <control> + <type>image</type> + <id>107</id> + <posX>640</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_7</texture> + </control> + <control> + <type>image</type> + <id>111</id> + <posX>280</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_1</texture> + </control> + <control> + <type>image</type> + <id>112</id> + <posX>340</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_2</texture> + </control> + <control> + <type>image</type> + <id>113</id> + <posX>400</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_3</texture> + </control> + <control> + <type>image</type> + <id>114</id> + <posX>460</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_4</texture> + </control> + <control> + <type>image</type> + <id>115</id> + <posX>520</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_5</texture> + </control> + <control> + <type>image</type> + <id>116</id> + <posX>580</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_6</texture> + </control> + <control> + <type>image</type> + <id>117</id> + <posX>640</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_7</texture> + </control> + <control> + <type>image</type> + <id>121</id> + <posX>280</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_1</texture> + </control> + <control> + <type>image</type> + <id>122</id> + <posX>340</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_2</texture> + </control> + <control> + <type>image</type> + <id>123</id> + <posX>400</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_3</texture> + </control> + <control> + <type>image</type> + <id>124</id> + <posX>460</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_4</texture> + </control> + <control> + <type>image</type> + <id>125</id> + <posX>520</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_5</texture> + </control> + <control> + <type>image</type> + <id>126</id> + <posX>580</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_6</texture> + </control> + <control> + <type>image</type> + <id>127</id> + <posX>640</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_7</texture> + </control> + <control> + <type>image</type> + <id>131</id> + <posX>280</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_1</texture> + </control> + <control> + <type>image</type> + <id>132</id> + <posX>340</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_2</texture> + </control> + <control> + <type>image</type> + <id>133</id> + <posX>400</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_3</texture> + </control> + <control> + <type>image</type> + <id>134</id> + <posX>460</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_4</texture> + </control> + <control> + <type>image</type> + <id>135</id> + <posX>520</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_5</texture> + </control> + <control> + <type>image</type> + <id>136</id> + <posX>580</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_6</texture> + </control> + <control> + <type>image</type> + <id>137</id> + <posX>640</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_7</texture> + </control> + <control> + <type>image</type> + <id>141</id> + <posX>280</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_1</texture> + </control> + <control> + <type>image</type> + <id>142</id> + <posX>340</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_2</texture> + </control> + <control> + <type>image</type> + <id>143</id> + <posX>400</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_3</texture> + </control> + <control> + <type>image</type> + <id>144</id> + <posX>460</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_4</texture> + </control> + <control> + <type>image</type> + <id>145</id> + <posX>520</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_5</texture> + </control> + <control> + <type>image</type> + <id>146</id> + <posX>580</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_6</texture> + </control> + <control> + <type>image</type> + <id>147</id> + <posX>640</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_7</texture> + </control> + <control> + <type>image</type> + <id>151</id> + <posX>280</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_1</texture> + </control> + <control> + <type>image</type> + <id>152</id> + <posX>340</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_2</texture> + </control> + <control> + <type>image</type> + <id>153</id> + <posX>400</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_3</texture> + </control> + <control> + <type>image</type> + <id>154</id> + <posX>460</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_4</texture> + </control> + <control> + <type>image</type> + <id>155</id> + <posX>520</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_5</texture> + </control> + <control> + <type>image</type> + <id>156</id> + <posX>580</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_6</texture> + </control> + <control> + <type>image</type> + <id>157</id> + <posX>640</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_7</texture> + </control> + <control> + <description>text label</description> + <type>label</type> + <id>18</id> + <posX>260</posX> + <posY>510</posY> + <label>#Status</label> + <font>font16</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Pointer 01</description> + <type>button</type> + <id>301</id> + <posX>280</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>2</onleft> + <onright>302</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 02</description> + <type>button</type> + <id>302</id> + <posX>340</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>301</onleft> + <onright>303</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 03</description> + <type>button</type> + <id>303</id> + <posX>400</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>302</onleft> + <onright>304</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 04</description> + <type>button</type> + <id>304</id> + <posX>460</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>303</onleft> + <onright>305</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 05</description> + <type>button</type> + <id>305</id> + <posX>520</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>304</onleft> + <onright>306</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 06</description> + <type>button</type> + <id>306</id> + <posX>580</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>305</onleft> + <onright>307</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 07</description> + <type>button</type> + <id>307</id> + <posX>640</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>306</onleft> + <onright>307</onright> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + </control> + </controls> </window> Added: trunk/plugins/My Connect4/Source/MyConnect4/LocalizeStrings.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/LocalizeStrings.cs (rev 0) +++ trunk/plugins/My Connect4/Source/MyConnect4/LocalizeStrings.cs 2007-05-24 15:35:07 UTC (rev 422) @@ -0,0 +1,260 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.IO; +using System.Globalization; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using MediaPortal.Util; +using MediaPortal.GUI.Library; +using MediaPortal.Configuration; +using MediaPortal.Localisation; + +namespace MediaPortal.GUI.MyConnect +{ + /// <summary> + /// This class will hold all text used in the application + /// The text is loaded for the current language from + /// the file language/[language]/strings.xml + /// </summary> + public class GUILocalizeStrings + { + #region Variables + static LocalisationProvider _stringProvider; + static Dictionary<string, string> _cultures; + static string[] _languages; + #endregion + + #region Constructors/Destructors + // singleton. Dont allow any instance of this class + private GUILocalizeStrings() + { + } + + static public void Dispose() + { + if (_stringProvider != null) + _stringProvider.Dispose(); + } + #endregion + + #region Public Methods + /// <summary> + /// Public method to load the text from a strings/xml file into memory + /// </summary> + /// <param name="strFileName">Contains the filename+path for the string.xml file</param> + /// <returns> + /// true when text is loaded + /// false when it was unable to load the text + /// </returns> + //[Obsolete("This method has changed", true)] + static public bool Load(string language) + { + bool isPrefixEnabled = true; + + using (MediaPortal.Profile.Settings reader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + isPrefixEnabled = reader.GetValueAsBool("general", "myprefix", true); + + string directory = Config.GetSubFolder(Config.Dir.Language, "MyConnect4"); + string cultureName = null; + if (language != null) + cultureName = GetCultureName(language); + + Log.Info(" Loading localised Strings - Path: {0} Culture: {1} Language: {2} Prefix: {3}", directory, cultureName, language, isPrefixEnabled); + + _stringProvider = new LocalisationProvider(directory, cultureName, isPrefixEnabled); + + GUIGraphicsContext.CharsInCharacterSet = _stringProvider.Characters; + + return true; + } + + static public string CurrentLanguage() + { + if (_stringProvider == null) + Load(null); + + return _stringProvider.CurrentLanguage.EnglishName; + } + + static public void ChangeLanguage(string language) + { + if (_stringProvider == null) + Load(language); + else + _stringProvider.ChangeLanguage(GetCultureName(language)); + } + + /// <summary> + /// Get the translation for a given id and format the sting with + /// the given parameters + /// </summary> + /// <param name="dwCode">id of text</param> + /// <param name="parameters">parameters used in the formating</param> + /// <returns> + /// string containing the translated text + /// </returns> + static public string Get(int dwCode, object[] parameters) + { + if (_stringProvider == null) + Load(null); + + string translation = _stringProvider.GetString("unmapped", dwCode); + // if parameters or the translation is null, return the translation. + if ((translation == null) || (parameters == null)) + { + return translation; + } + // return the formatted string. If formatting fails, log the error + // and return the unformatted string. + try + { + return String.Format(translation, parameters); + } + catch (System.FormatException e) + { + Log.Error("Error formatting translation with id {0}", dwCode); + Log.Error("Unformatted translation: {0}", translation); + Log.Error(e); + return translation; + } + } + + /// <summary> + /// Get the translation for a given id + /// </summary> + /// <param name="dwCode">id of text</param> + /// <returns> + /// string containing the translated text + /// </returns> + static public string Get(int dwCode) + { + if (_stringProvider == null) + Load(null); + + string translation = _stringProvider.GetString("unmapped", dwCode); + + if (translation == null) + { + Log.Error("No translation found for id {0}", dwCode); + return String.Empty; + } + + return translation; + } + + static public void LocalizeLabel(ref string strLabel) + { + if (_stringProvider == null) + Load(null); + + if (strLabel == null) strLabel = String.Empty; + if (strLabel == "-") strLabel = ""; + if (strLabel == "") return; + // This can't be a valid string code if the first character isn't a number. + // This check will save us from catching unnecessary exceptions. + if (!char.IsNumber(strLabel, 0)) + return; + + int dwLabelID; + + try + { + dwLabelID = System.Int32.Parse(strLabel); + } + catch (FormatException e) + { + Log.Error(e); + strLabel = String.Empty; + return; + } + + strLabel = _stringProvider.GetString("unmapped", dwLabelID); + if (strLabel == null) + { + Log.Error("No translation found for id {0}", dwLabelID); + strLabel = String.Empty; + } + } + + public static string LocalSupported() + { + if (_stringProvider == null) + Load(null); + + CultureInfo culture = _stringProvider.GetBestLanguage(); + + return culture.EnglishName; + } + + public static string[] SupportedLanguages() + { + if (_languages == null) + { + if (_stringProvider == null) + Load(null); + + CultureInfo[] cultures = _stringProvider.AvailableLanguages(); + + SortedList sortedLanguages = new SortedList(); + foreach (CultureInfo culture in cultures) + sortedLanguages.Add(culture.EnglishName, culture.EnglishName); + + _languages = new string[sortedLanguages.Count]; + + for (int i = 0; i < sortedLanguages.Count; i++) + { + _languages[i] = (string)sortedLanguages.GetByIndex(i); + } + } + + return _languages; + } + + static public string GetCultureName(string language) + { + if (_cultures == null) + { + _cultures = new Dictionary<string, string>(); + + CultureInfo[] cultureList = CultureInfo.GetCultures(CultureTypes.AllCultures); + + for (int i = 0; i < cultureList.Length; i++) + { + _cultures.Add(cultureList[i].EnglishName, cultureList[i].Name); + } + } + + if (_cultures.ContainsKey(language)) + return _cultures[language]; + + return null; + } + #endregion + } +} \ No newline at end of file Modified: trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-23 16:45:51 UTC (rev 421) +++ trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-24 15:35:07 UTC (rev 422) @@ -36,448 +36,458 @@ namespace MediaPortal.GUI.MyConnect { - [PluginIcons("MyConnect4.connect4.png", "MyConnect4.connect4Disabled.png")] - public class MyConnect4GUI : GUIWindow, ISetupForm - { - #region SkinControl - [SkinControlAttribute(2)] protected GUIButtonControl BtnStart = null; - [SkinControlAttribute(4)] protected GUIButtonControl BtnLevel = null; - [SkinControlAttribute(3)] protected GUIButtonControl BtnMode = null; - - [SkinControlAttribute(7)] protected GUIButtonControl BtnWhatsThis = null; - #endregion + [PluginIcons("MyConnect4.connect4.png", "MyConnect4.connect4Disabled.png")] + public class MyConnect4GUI : GUIWindow, ISetupForm + { + #region SkinControl + [SkinControlAttribute(11)] + protected GUILabelControl lblHeader = null; - #region Private variables + [SkinControlAttribute(2)] + protected GUIButtonControl BtnStart = null; + [SkinControlAttribute(4)] + protected GUIButtonControl BtnLevel = null; + [SkinControlAttribute(3)] + protected GUIButtonControl BtnMode = null; - string Level="Nor"; //Choosen level - int AI = 5; + [SkinControlAttribute(7)] + protected GUIButtonControl BtnWhatsThis = null; + #endregion - string Mode = "1p"; //2player + #region Private variables - int Player = 0; - int round = 0; + string Level = "Nor"; //Choosen level + int AI = 5; - int wait = 0; + string Mode = "1p"; //2player - private static OnActionHandler ah; + int Player = 0; + int round = 0; - private System.Windows.Forms.Timer _Game = new System.Windows.Forms.Timer(); + int wait = 0; - private Engine gameEngine; + private static OnActionHandler ah; - #endregion + private System.Windows.Forms.Timer _Game = new System.Windows.Forms.Timer(); - #region ISetupForm Members + private Engine gameEngine; - // Returns the name of the plugin which is shown in the plugin menu - public string PluginName() - { - return "My Connect 4"; - } + #endregion - // Returns the description of the plugin is shown in the plugin menu - public string Description() - { - return "Connect 4"; - } + #region ISetupForm Members - // Returns the author of the plugin which is shown in the plugin menu - public string Author() - { - return "Mark Koenig (kroko)"; - } + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "My Connect 4"; + } - // show the setup dialog - public void ShowPlugin() - { - MessageBox.Show("Nothing to configure, this is just an example"); - } + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "Connect 4"; + } - // Indicates whether plugin can be enabled/disabled - public bool CanEnable() + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "Mark Koenig (kroko)"; + } + + // show the setup dialog + public void ShowPlugin() + { + MessageBox.Show("Nothing to configure, this is just an example"); + } + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return 22031969; + } + + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return true; + } + + // indicates if a plugin has its own setup screen + public bool HasSetup() + { + return false; + } + + /// <summary> + /// If the plugin should have its own button on the main menu of MediaPortal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = PluginName(); + strButtonImage = String.Empty; + strButtonImageFocus = String.Empty; + strPictureImage = "hover_my connect4.png"; + return true; + } + + #endregion + + public override int GetID + { + get { - return true; + return 22031969; } - - // get ID of windowplugin belonging to this setup - public int GetWindowId() + set { - return 22031969; + base.GetID = value; } + } - // Indicates if plugin is enabled by default; - public bool DefaultEnabled() - { - return true; - } + public override bool Init() + { + MyConnect.GUILocalizeStrings.Load(GUI.Library.GUILocalizeStrings.CurrentLanguage()); - // indicates if a plugin has its own setup screen - public bool HasSetup() - { - return false; - } + bool result = Load(GUIGraphicsContext.Skin + @"\MyConnect4.xml"); + if (ah == null) ah = new OnActionHandler(OnAction2); - /// <summary> - /// If the plugin should have its own button on the main menu of MediaPortal then it - /// should return true to this method, otherwise if it should not be on home - /// it should return false - /// </summary> - /// <param name="strButtonText">text the button should have</param> - /// <param name="strButtonImage">image for the button, or empty for default</param> - /// <param name="strButtonImageFocus">image for the button, or empty for default</param> - /// <param name="strPictureImage">subpicture for the button or empty for none</param> - /// <returns>true : plugin needs its own button on home - /// false : plugin does not need its own button on home</returns> + return result; + } - public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) - { - strButtonText = PluginName(); - strButtonImage = String.Empty; - strButtonImageFocus = String.Empty; - strPictureImage = "hover_my connect4.png"; - return true; - } + #region Actions + public override void OnAction(Action action) + { + base.OnAction(action); + } + public void OnAction2(Action action) + { - #endregion + if (GUIWindowManager.ActiveWindowEx == (int)GUIWindow.Window.WINDOW_DIALOG_MENU) return; - public override int GetID + //string t = action.wID.ToString(); + //GUIPropertyManager.SetProperty("#Round", t); + + if ((Player == 1) | (Player == 2 && Mode == "2p")) { - get - { - return 22031969; - } - set - { - base.GetID = value; - } + switch (action.wID) + { + case Action.ActionType.ACTION_MOVE_LEFT: + + break; + case Action.ActionType.ACTION_MOVE_RIGHT: + + break; + case Action.ActionType.ACTION_SELECT_ITEM: + + break; + default: + break; + } } - - public override bool Init() - { - bool result = Load(GUIGraphicsContext.Skin + @"\MyConnect4.xml"); - if (ah == null) ah = new OnActionHandler(OnAction2); - return result; - } + } + #endregion - #region Actions - public override void OnAction(Action action) - { - base.OnAction(action); - } - public void OnAction2(Action action) - { + public override bool OnMessage(GUIMessage message) + { + return base.OnMessage(message); + } - if (GUIWindowManager.ActiveWindowEx == (int)GUIWindow.Window.WINDOW_DIALOG_MENU) return; + public void Dispose() + { + _Game.Stop(); + _Game.Tick -= new EventHandler(_Game_Tick); + } - //string t = action.wID.ToString(); - //GUIPropertyManager.SetProperty("#Round", t); + protected override void OnPageLoad() + { + _Game.Interval = 300; + _Game.Tick += new EventHandler(_Game_Tick); + _Game.Start(); - if ((Player == 1) | (Player == 2 && Mode == "2p")) - { - switch (action.wID) - { - case Action.ActionType.ACTION_MOVE_LEFT: - - break; - case Action.ActionType.ACTION_MOVE_RIGHT : - - break; - case Action.ActionType.ACTION_SELECT_ITEM : - - break; - default: - break; - } - } - } - #endregion + Player = 0; + Level = "Nor"; + Mode = "1p"; + AI = 5; - public override bool OnMessage(GUIMessage message) - { - return base.OnMessage(message); - } + GUIControl.SetControlLabel(GetID, 11, MyConnect.GUILocalizeStrings.Get(0)); // My Connect 4 + GUIControl.SetControlLabel(GetID, BtnStart.GetID, MyConnect.GUILocalizeStrings.Get(1)); // Start + GUIControl.SetControlLabel(GetID, BtnWhatsThis.GetID, MyConnect.GUILocalizeStrings.Get(31)); // What is Connect4? - public void Dispose() - { - _Game.Stop(); - _Game.Tick -= new EventHandler(_Game_Tick); - } + GUIPropertyManager.SetProperty("#Status", " "); + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, MyConnect.GUILocalizeStrings.Get(12)); // Level: Normal + GUIControl.SetControlLabel(GetID, BtnMode.GetID, MyConnect.GUILocalizeStrings.Get(21)); // Mode: Play vs Comp - protected override void OnPageLoad() - { - _Game.Interval = 300; - _Game.Tick += new EventHandler(_Game_Tick); - _Game.Start(); + // Disable level selection + GUIControl.DisableControl(GetID, 4); - Player = 0; - Level = "Nor"; - Mode = "1p"; - AI = 5; + RelButtons(); - GUIPropertyManager.SetProperty("#Status", " "); - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Normal"); - GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Comp"); - - // Disable level selection - GUIControl.DisableControl(GetID, 4); + GUIGraphicsContext.OnNewAction -= ah; + GUIGraphicsContext.OnNewAction += ah; - RelButtons(); + base.OnPageLoad(); - GUIGraphicsContext.OnNewAction -= ah; - GUIGraphicsContext.OnNewAction += ah; + this.gameEngine = null; + this.gameEngine = new Engine(7, 6, 4); - base.OnPageLoad(); + Drawfield(); - this.gameEngine = null; - this.gameEngine = new Engine(7, 6, 4); + } - Drawfield (); - - } + protected override void OnPageDestroy(int new_windowId) + { + _Game.Stop(); + _Game.Tick -= new EventHandler(_Game_Tick); + } - 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 == BtnMode) + OnBtnMode(); + if (control == BtnWhatsThis) + OnBtnWhatsThis(); + if (control == BtnStart) + { //start game - protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) - { - if (control == BtnLevel) - OnBtnLevel(); - if (control == BtnMode) - OnBtnMode(); - if (control == BtnWhatsThis) - OnBtnWhatsThis(); - if (control == BtnStart) - { //start game + if (Player == 0 && wait == 0) + { + Player = 1; + round = 0; + GUIPropertyManager.SetProperty("#Status", " "); - if (Player == 0 && wait==0) - { - Player = 1; - round = 0; - GUIPropertyManager.SetProperty("#Status", " "); + // Disable start button + GUIControl.DisableControl(GetID, 2); + // Disable level selection + GUIControl.DisableControl(GetID, 3); + // Disable mode selection + GUIControl.DisableControl(GetID, 4); - // Disable start button - GUIControl.DisableControl(GetID, 2); - // Disable level selection - GUIControl.DisableControl(GetID, 3); - // Disable mode selection - GUIControl.DisableControl(GetID, 4); + this.gameEngine = null; + this.gameEngine = new Engine(7, 6, 4); - this.gameEngine = null; - this.gameEngine = new Engine(7, 6, 4); + Drawfield(); - Drawfield(); - - wait = 2; - GUIControl.FocusControl(GetID, 15); - } - } - if ((Player==1)|(Player==2 && Mode=="2p")) - { - - if ((controlId >= 301) && (controlId <= 307)) - { - //which button has clicked ? - int col = controlId - 301; - - PlayerClick(col); - wait = 2; - } - } - base.OnClicked(controlId, control, actionType); + wait = 2; + GUIControl.FocusControl(GetID, 15); + } } + if ((Player == 1) | (Player == 2 && Mode == "2p")) + { - protected override void OnShowContextMenu() - { - base.OnShowContextMenu(); - } + if ((controlId >= 301) && (controlId <= 307)) + { + //which button has clicked ? + int col = controlId - 301; - private void OnBtnLevel() - { //Choose level for the game - if (Player==0) - { - if (Level == "Nor") - { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Professional"); - Level = "Pro"; - AI = 8; - } - else if (Level == "Pro") - { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Amateur"); - Level = "Am"; - AI = 3; - } - else - { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Normal"); - Level = "Nor"; - AI = 5; - } - } + PlayerClick(col); + wait = 2; + } } + base.OnClicked(controlId, control, actionType); + } - private void OnBtnMode() - { //Choose mode for the game - if (Player == 0) - { - if (Mode == "2p") - { - GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Comp"); - Mode = "1p"; - // Enable level selection - GUIControl.EnableControl(GetID, 4); - } - else - { - GUIControl.SetControlLabel(GetID, BtnMode.GetID, "Mode: Play vs Player"); - Mode = "2p"; - // Disable level selection - GUIControl.DisableControl(GetID, 4); - } - } - } + protected override void OnShowContextMenu() + { + base.OnShowContextMenu(); + } - private void OnBtnWhatsThis() + private void OnBtnLevel() + { //Choose level for the game + if (Player == 0) { - GUIDialogText dlg = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); - dlg.SetHeading("What's Connect 4 (Vier gewinnt)"); - dlg.SetText("Connect 4 is a game where your object is to get 4 tokens in a row.\n" + - "This could be vertically, horizontal or diagonally.\n\n" + - "Gameboard design by Mikael S\xF6derstr\xF6m.\n\n" + - "AI code has been taken from http://www.Planet-Source-Code.com\n\n" + - "Good luck\nMark Koenig (kroko)"); - dlg.DoModal(GetID); + if (Level == "Nor") + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, MyConnect.GUILocalizeStrings.Get(13)); // Level: Professional + Level = "Pro"; + AI = 8; + } + else if (Level == "Pro") + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, MyConnect.GUILocalizeStrings.Get(11)); // Level: Amateur + Level = "Am"; + AI = 3; + } + else + { + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, MyConnect.GUILocalizeStrings.Get(12)); // Level: Normal + Level = "Nor"; + AI = 5; + } } + } - private void Drawfield() - { // draw all fields + private void OnBtnMode() + { //Choose mode for the game + if (Player == 0) + { + if (Mode == "2p") + { + GUIControl.SetControlLabel(GetID, BtnMode.GetID, MyConnect.GUILocalizeStrings.Get(21)); // Mode: Play vs Comp + Mode = "1p"; + // Enable level selection + GUIControl.EnableControl(GetID, 4); + } + else + { + GUIControl.SetControlLabel(GetID, BtnMode.GetID, MyConnect.GUILocalizeStrings.Get(22)); // Mode: Play vs Player + Mode = "2p"; + // Disable level selection + GUIControl.DisableControl(GetID, 4); + } + } + } - int[,] Myboard = gameEngine.getBoard(); - - for (int i = 0; i < 7; i++) - { - for (int j = 0; j < 6; j++) - { - string prop = "#Con_" + (6-j) + "_" + (i+1); + private void OnBtnWhatsThis() + { + GUIDialogText dlg = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); + dlg.SetHeading(MyConnect.GUILocalizeStrings.Get(31)); // help dialog heading + dlg.SetText(MyConnect.GUILocalizeStrings.Get(32)); // help dialog text + dlg.DoModal(GetID); + } - if (Myboard[i, j] == 2) - GUIPropertyManager.SetProperty(prop, "MyConn4Wh.png"); - if (Myboard[i, j] == 0) - GUIPropertyManager.SetProperty(prop, "MyConn4Ye.png"); - if (Myboard[i, j] == 1) - GUIPropertyManager.SetProperty(prop, "MyConn4Rd.png"); - if (Myboard[i, j] > 2) - GUIPropertyManager.SetProp... [truncated message content] |
From: <che...@us...> - 2007-05-24 16:15:58
|
Revision: 423 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=423&view=rev Author: chef_koch Date: 2007-05-24 09:15:49 -0700 (Thu, 24 May 2007) Log Message: ----------- fixed some strings, now all should be translatable Modified Paths: -------------- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml Modified: trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-24 15:35:07 UTC (rev 422) +++ trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-24 16:15:49 UTC (rev 423) @@ -138,7 +138,7 @@ public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { - strButtonText = PluginName(); + strButtonText = MyConnect.GUILocalizeStrings.Get(0); strButtonImage = String.Empty; strButtonImageFocus = String.Empty; strPictureImage = "hover_my connect4.png"; @@ -229,8 +229,12 @@ GUIControl.SetControlLabel(GetID, BtnWhatsThis.GetID, MyConnect.GUILocalizeStrings.Get(31)); // What is Connect4? GUIPropertyManager.SetProperty("#Status", " "); - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, MyConnect.GUILocalizeStrings.Get(12)); // Level: Normal - GUIControl.SetControlLabel(GetID, BtnMode.GetID, MyConnect.GUILocalizeStrings.Get(21)); // Mode: Play vs Comp + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, + MyConnect.GUILocalizeStrings.Get(10) + // Level: + MyConnect.GUILocalizeStrings.Get(12)); // Normal + GUIControl.SetControlLabel(GetID, BtnMode.GetID, + MyConnect.GUILocalizeStrings.Get(20) + // Mode: Play vs + MyConnect.GUILocalizeStrings.Get(21)); // Comp // Disable level selection GUIControl.DisableControl(GetID, 4); @@ -314,19 +318,25 @@ { if (Level == "Nor") { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, MyConnect.GUILocalizeStrings.Get(13)); // Level: Professional + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, + MyConnect.GUILocalizeStrings.Get(10) + // Level: + MyConnect.GUILocalizeStrings.Get(13)); // Professional Level = "Pro"; AI = 8; } else if (Level == "Pro") { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, MyConnect.GUILocalizeStrings.Get(11)); // Level: Amateur + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, + MyConnect.GUILocalizeStrings.Get(10) + // Level: + MyConnect.GUILocalizeStrings.Get(11)); // Amateur Level = "Am"; AI = 3; } else { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, MyConnect.GUILocalizeStrings.Get(12)); // Level: Normal + GUIControl.SetControlLabel(GetID, BtnLevel.GetID, + MyConnect.GUILocalizeStrings.Get(10) + // Level: + MyConnect.GUILocalizeStrings.Get(12)); // Normal Level = "Nor"; AI = 5; } @@ -339,14 +349,18 @@ { if (Mode == "2p") { - GUIControl.SetControlLabel(GetID, BtnMode.GetID, MyConnect.GUILocalizeStrings.Get(21)); // Mode: Play vs Comp + GUIControl.SetControlLabel(GetID, BtnMode.GetID, + MyConnect.GUILocalizeStrings.Get(20) + // Mode: Play vs + MyConnect.GUILocalizeStrings.Get(21)); // Comp Mode = "1p"; // Enable level selection GUIControl.EnableControl(GetID, 4); } else { - GUIControl.SetControlLabel(GetID, BtnMode.GetID, MyConnect.GUILocalizeStrings.Get(22)); // Mode: Play vs Player + GUIControl.SetControlLabel(GetID, BtnMode.GetID, + MyConnect.GUILocalizeStrings.Get(20) + // Mode: Play vs + MyConnect.GUILocalizeStrings.Get(22)); // Player Mode = "2p"; // Disable level selection GUIControl.DisableControl(GetID, 4); @@ -398,7 +412,11 @@ if (gameEngine.isWinner(Player - 1) == true) { int tmp = Player; - GUIPropertyManager.SetProperty("#Status", "Player " + tmp + " wins the game !"); + GUIPropertyManager.SetProperty("#Status", + MyConnect.GUILocalizeStrings.Get(2) + // Player + " " + tmp + " " + + MyConnect.GUILocalizeStrings.Get(3) // wins the game! + ); Player = 0; RelButtons(); gameEngine.getState().flashit(3); @@ -406,7 +424,7 @@ } if (gameEngine.isTie() == true) { - GUIPropertyManager.SetProperty("#Status", "Nobody wins the game ! Its a draw !"); + GUIPropertyManager.SetProperty("#Status", MyConnect.GUILocalizeStrings.Get(4)); // Nobody wins the game ! Its a draw ! Player = 0; RelButtons(); GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); @@ -445,12 +463,14 @@ { //display status of the game if (Player == 0) - GUIPropertyManager.SetProperty("#Player", "GAME OVER"); + GUIPropertyManager.SetProperty("#Player", MyConnect.GUILocalizeStrings.Get(6)); // GAME OVER if (Player == 1) - GUIPropertyManager.SetProperty("#Player", "PLAYER 1"); + GUIPropertyManager.SetProperty("#Player", MyConnect.GUILocalizeStrings.Get(2) + " 1"); // PLAYER 1 if (Player == 2) - GUIPropertyManager.SetProperty("#Player", "PLAYER 2"); - GUIPropertyManager.SetProperty("#Round", "Round: " + round); + GUIPropertyManager.SetProperty("#Player", MyConnect.GUILocalizeStrings.Get(2) + " 2"); // PLAYER 2 + GUIPropertyManager.SetProperty("#Round", MyConnect.GUILocalizeStrings.Get(5) + round); // Round: + + //wait time if (wait > 0) { @@ -470,7 +490,11 @@ if (gameEngine.isWinner(Player - 1) == true) { - GUIPropertyManager.SetProperty("#Status", "Player 2 wins the game !"); + GUIPropertyManager.SetProperty("#Status", + MyConnect.GUILocalizeStrings.Get(2) + // Player + " 2 " + + MyConnect.GUILocalizeStrings.Get(3) // wins the game! + ); gameEngine.getState().flashit(3); Drawfield(); Player = 0; @@ -478,7 +502,7 @@ } if (gameEngine.isTie() == true) { - GUIPropertyManager.SetProperty("#Status", "Nobody wins the game ! Its a draw !"); + GUIPropertyManager.SetProperty("#Status", MyConnect.GUILocalizeStrings.Get(4)); // Nobody wins the game ! Its a draw ! Player = 0; RelButtons(); } Modified: trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml =================================================================== --- trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml 2007-05-24 15:35:07 UTC (rev 422) +++ trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml 2007-05-24 16:15:49 UTC (rev 423) @@ -2,12 +2,19 @@ <Language name="German" characters="255"> <Section name="unmapped"> <String id="0" prefix="Mein ">Vier gewinnt</String> - <String id="1">Start</String> - <String id="11">Stufe: Anfänger</String> - <String id="12">Stufe: Normal</String> - <String id="13">Stufe: Profi</String> - <String id="21">Modus: Play vs Comp</String> - <String id="22">Modus: Play vs Player</String> + <String id="1">Neues Spiel</String> + <String id="2">Spieler</String> + <String id="3">gewinnt das Spiel!</String> + <String id="4">Unentschieden! Keiner hat gewonnen!</String> + <String id="5">Runde: </String> + <String id="6">GAME OVER</String> + <String id="10">Stufe: </String> + <String id="11">leicht</String> + <String id="12">mittel</String> + <String id="13">schwer</String> + <String id="20">Spieler vs. </String> + <String id="21">Computer</String> + <String id="22">Spieler</String> <String id="31">Was ist Vier gewinnt?</String> <String id="32">Connect 4 is a game where your object is to get 4 tokens in a row. This could be vertically, horizontal or diagonally. Modified: trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml =================================================================== --- trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml 2007-05-24 15:35:07 UTC (rev 422) +++ trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml 2007-05-24 16:15:49 UTC (rev 423) @@ -3,11 +3,18 @@ <Section name="unmapped"> <String id="0" prefix="My ">Connect 4</String> <String id="1">Start</String> - <String id="11">Level: Amateur</String> - <String id="12">Level: Normal</String> - <String id="13">Level: Professional</String> - <String id="21">Mode: Play vs Comp</String> - <String id="22">Mode: Play vs Player</String> + <String id="2">Player</String> + <String id="3">wins the game!</String> + <String id="4">Nobody wins the game ! Its a draw !</String> + <String id="5">Round: </String> + <String id="6">GAME OVER</String> + <String id="10">Level: </String> + <String id="11">easy</String> + <String id="12">medium</String> + <String id="13">difficult</String> + <String id="20">Player vs. </String> + <String id="21">Computer</String> + <String id="22">Player</String> <String id="31">What's Connect 4</String> <String id="32">Connect 4 is a game where your object is to get 4 tokens in a row. This could be vertically, horizontal or diagonally. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-05-24 16:27:28
|
Revision: 424 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=424&view=rev Author: chef_koch Date: 2007-05-24 09:27:10 -0700 (Thu, 24 May 2007) Log Message: ----------- header label is now set by setproperty (#header_label), no more by setcontrollabel(11) Modified Paths: -------------- trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs Modified: trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml 2007-05-24 16:15:49 UTC (rev 423) +++ trunk/plugins/My Connect4/Skin/Skin Blue Two/MyConnect4.xml 2007-05-24 16:27:10 UTC (rev 424) @@ -22,6 +22,7 @@ <id>11</id> <posX>250</posX> <posY>70</posY> + <label>#header_label</label> <font>font16</font> <align>right</align> <textcolor>White</textcolor> Modified: trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-24 16:15:49 UTC (rev 423) +++ trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-24 16:27:10 UTC (rev 424) @@ -224,7 +224,8 @@ Mode = "1p"; AI = 5; - GUIControl.SetControlLabel(GetID, 11, MyConnect.GUILocalizeStrings.Get(0)); // My Connect 4 + GUIPropertyManager.SetProperty("#header_label", MyConnect.GUILocalizeStrings.Get(0)); // My Connect 4 + GUIControl.SetControlLabel(GetID, BtnStart.GetID, MyConnect.GUILocalizeStrings.Get(1)); // Start GUIControl.SetControlLabel(GetID, BtnWhatsThis.GetID, MyConnect.GUILocalizeStrings.Get(31)); // What is Connect4? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-05-26 07:14:29
|
Revision: 452 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=452&view=rev Author: chef_koch Date: 2007-05-26 00:14:27 -0700 (Sat, 26 May 2007) Log Message: ----------- added option to enable/disable sound effects fixed some navi issues when buttons are disabled Modified Paths: -------------- trunk/plugins/My Connect4/Skin/Blue Two/MyConnect4.xml trunk/plugins/My Connect4/Skin/SimpleMP/MyConnect4.xml trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml Modified: trunk/plugins/My Connect4/Skin/Blue Two/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/Blue Two/MyConnect4.xml 2007-05-26 07:11:42 UTC (rev 451) +++ trunk/plugins/My Connect4/Skin/Blue Two/MyConnect4.xml 2007-05-26 07:14:27 UTC (rev 452) @@ -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,23 +36,22 @@ <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>301</onright> - <onup>7</onup> + <onup>6</onup> <ondown>3</ondown> </control> <control> <description>Mode</description> <type>button</type> <id>3</id> - <posX>60</posX> - <posY>131</posY> <onleft>3</onleft> <onright>301</onright> <onup>2</onup> @@ -62,44 +61,47 @@ <description>Level</description> <type>button</type> <id>4</id> - <posX>60</posX> - <posY>165</posY> <onleft>4</onleft> <onright>301</onright> <onup>3</onup> - <ondown>7</ondown> + <ondown>5</ondown> </control> <control> + <description>Sounds</description> + <type>togglebutton</type> + <id>5</id> + <onleft>5</onleft> + <onright>301</onright> + <onup>4</onup> + <ondown>6</ondown> + </control> + <control> <description>Round</description> - <type>label</type> - <id>5</id> - <posX>70</posX> - <posY>205</posY> + <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>6</id> - <posX>70</posX> - <posY>240</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>7</id> - <posX>60</posX> - <posY>270</posY> - <onleft>7</onleft> + <id>6</id> + <onleft>6</onleft> <onright>301</onright> - <onup>4</onup> + <onup>5</onup> <ondown>2</ondown> </control> </control> Modified: trunk/plugins/My Connect4/Skin/SimpleMP/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/SimpleMP/MyConnect4.xml 2007-05-26 07:11:42 UTC (rev 451) +++ trunk/plugins/My Connect4/Skin/SimpleMP/MyConnect4.xml 2007-05-26 07:14:27 UTC (rev 452) @@ -47,27 +47,24 @@ <description>group element</description> <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>Start</description> <type>button</type> <id>2</id> - <posX>60</posX> - <posY>97</posY> - <label>Start</label> <onleft>2</onleft> <onright>301</onright> - <onup>7</onup> + <onup>6</onup> <ondown>3</ondown> </control> <control> <description>Mode</description> <type>button</type> <id>3</id> - <posX>60</posX> - <posY>131</posY> - <label>Mode: Play vs Player</label> <onleft>3</onleft> - <onright>3</onright> + <onright>301</onright> <onup>2</onup> <ondown>4</ondown> </control> @@ -75,46 +72,47 @@ <description>Level</description> <type>button</type> <id>4</id> - <posX>60</posX> - <posY>165</posY> - <label>Level: Amateur</label> <onleft>4</onleft> - <onright>4</onright> + <onright>301</onright> <onup>3</onup> - <ondown>7</ondown> + <ondown>5</ondown> </control> <control> - <description>text label</description> - <type>label</type> + <description>Sounds</description> + <type>togglebutton</type> <id>5</id> - <posX>70</posX> - <posY>205</posY> + <onleft>5</onleft> + <onright>301</onright> + <onup>4</onup> + <ondown>6</ondown> + </control> + <control> + <description>Round</description> + <type>button</type> + <id>1</id> <label>#Round</label> <font>font12</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> + <enabled>false</enabled> + <textureFocus>-</textureFocus> + <textureNoFocus>-</textureNoFocus> </control> <control> - <description>text label</description> - <type>label</type> - <id>6</id> - <posX>70</posX> - <posY>240</posY> + <description>Player: / GameOver</description> + <type>button</type> + <id>1</id> <label>#Player</label> <font>font12</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> + <enabled>false</enabled> + <textureFocus>-</textureFocus> + <textureNoFocus>-</textureNoFocus> </control> <control> <description>Whatsthis</description> <type>button</type> - <id>7</id> - <posX>60</posX> - <posY>270</posY> - <label>What's this?</label> - <onleft>7</onleft> + <id>6</id> + <onleft>6</onleft> <onright>301</onright> - <onup>4</onup> + <onup>5</onup> <ondown>2</ondown> </control> </control> Modified: trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs =================================================================== --- trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-26 07:11:42 UTC (rev 451) +++ trunk/plugins/My Connect4/Source/MyConnect4/MyConnect4.cs 2007-05-26 07:14:27 UTC (rev 452) @@ -39,28 +39,46 @@ [PluginIcons("MyConnect4.connect4.png", "MyConnect4.connect4Disabled.png")] public class MyConnect4GUI : GUIWindow, ISetupForm { + #region enums + + private enum Level + { + Easy = 0, + Medium = 1, + Hard = 2 + } + + private enum Mode + { + PlayerVsComputer = 0, + PlayerVsPlayer = 1 + } + + #endregion + #region SkinControl - [SkinControlAttribute(11)] - protected GUILabelControl lblHeader = null; [SkinControlAttribute(2)] - protected GUIButtonControl BtnStart = null; + protected GUIButtonControl btnStart = null; + [SkinControlAttribute(3)] + protected GUIButtonControl btnMode = null; [SkinControlAttribute(4)] - protected GUIButtonControl BtnLevel = null; - [SkinControlAttribute(3)] - protected GUIButtonControl BtnMode = null; + protected GUIButtonControl btnLevel = null; + [SkinControlAttribute(5)] + protected GUIToggleButtonControl btnSound = null; + [SkinControlAttribute(6)] + protected GUIButtonControl btnWhatsThis = null; - [SkinControlAttribute(7)] - protected GUIButtonControl BtnWhatsThis = null; #endregion #region Private variables - string Level = "Nor"; //Choosen level + Level _currentLevel = Level.Easy; + Mode _currentMode = Mode.PlayerVsComputer; + bool _soundOn = true; + int AI = 5; - string Mode = "1p"; //2player - int Player = 0; int round = 0; @@ -147,6 +165,8 @@ #endregion + #region Overrides + public override int GetID { get @@ -169,50 +189,11 @@ return result; } - #region Actions - public override void OnAction(Action action) - { - base.OnAction(action); - } - public void OnAction2(Action action) - { - - if (GUIWindowManager.ActiveWindowEx == (int)GUIWindow.Window.WINDOW_DIALOG_MENU) return; - - //string t = action.wID.ToString(); - //GUIPropertyManager.SetProperty("#Round", t); - - if ((Player == 1) | (Player == 2 && Mode == "2p")) - { - switch (action.wID) - { - case Action.ActionType.ACTION_MOVE_LEFT: - - break; - case Action.ActionType.ACTION_MOVE_RIGHT: - - break; - case Action.ActionType.ACTION_SELECT_ITEM: - - break; - default: - break; - } - } - } - #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() { _Game.Interval = 300; @@ -220,28 +201,9 @@ _Game.Start(); Player = 0; - Level = "Nor"; - Mode = "1p"; - AI = 5; - GUIPropertyManager.SetProperty("#header_label", MyConnect.GUILocalizeStrings.Get(0)); // My Connect 4 - - GUIControl.SetControlLabel(GetID, BtnStart.GetID, MyConnect.GUILocalizeStrings.Get(1)); // Start - GUIControl.SetControlLabel(GetID, BtnWhatsThis.GetID, MyConnect.GUILocalizeStrings.Get(31)); // What is Connect4? - GUIPropertyManager.SetProperty("#Status", " "); - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, - MyConnect.GUILocalizeStrings.Get(10) + // Level: - MyConnect.GUILocalizeStrings.Get(12)); // Normal - GUIControl.SetControlLabel(GetID, BtnMode.GetID, - MyConnect.GUILocalizeStrings.Get(20) + // Mode: Play vs - MyConnect.GUILocalizeStrings.Get(21)); // Comp - // Disable level selection - GUIControl.DisableControl(GetID, 4); - - RelButtons(); - GUIGraphicsContext.OnNewAction -= ah; GUIGraphicsContext.OnNewAction += ah; @@ -252,6 +214,7 @@ Drawfield(); + UpdateButtonStates(); } protected override void OnPageDestroy(int new_windowId) @@ -262,38 +225,18 @@ protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { - if (control == BtnLevel) + if (control == btnStart) + OnBtnStart(); + else if (control == btnLevel) OnBtnLevel(); - if (control == BtnMode) + else if (control == btnMode) OnBtnMode(); - if (control == BtnWhatsThis) + else if (control == btnSound) + OnBtnSound(); + else if (control == btnWhatsThis) OnBtnWhatsThis(); - if (control == BtnStart) - { //start game - if (Player == 0 && wait == 0) - { - Player = 1; - round = 0; - GUIPropertyManager.SetProperty("#Status", " "); - - // Disable start button - GUIControl.DisableControl(GetID, 2); - // Disable level selection - GUIControl.DisableControl(GetID, 3); - // Disable mode selection - GUIControl.DisableControl(GetID, 4); - - this.gameEngine = null; - this.gameEngine = new Engine(7, 6, 4); - - Drawfield(); - - wait = 2; - GUIControl.FocusControl(GetID, 15); - } - } - if ((Player == 1) | (Player == 2 && Mode == "2p")) + if ((Player == 1) | (Player == 2 && _currentMode == Mode.PlayerVsPlayer)) { if ((controlId >= 301) && (controlId <= 307)) @@ -313,62 +256,80 @@ base.OnShowContextMenu(); } + #endregion + + #region Implementation + + private void OnBtnStart() + { + //start game + if (Player != 0) + return; + if (wait != 0) + return; + + Player = 1; + round = 0; + GUIPropertyManager.SetProperty("#Status", " "); + + this.gameEngine = null; + this.gameEngine = new Engine(7, 6, 4); + + Drawfield(); + + wait = 2; + GUIControl.FocusControl(GetID, 15); + + UpdateButtonStates(); + } + private void OnBtnLevel() - { //Choose level for the game - if (Player == 0) + { + //Choose level for the game + if (Player != 0) + return; + + switch (_currentLevel) { - if (Level == "Nor") - { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, - MyConnect.GUILocalizeStrings.Get(10) + // Level: - MyConnect.GUILocalizeStrings.Get(13)); // Professional - Level = "Pro"; - AI = 8; - } - else if (Level == "Pro") - { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, - MyConnect.GUILocalizeStrings.Get(10) + // Level: - MyConnect.GUILocalizeStrings.Get(11)); // Amateur - Level = "Am"; - AI = 3; - } - else - { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, - MyConnect.GUILocalizeStrings.Get(10) + // Level: - MyConnect.GUILocalizeStrings.Get(12)); // Normal - Level = "Nor"; - AI = 5; - } + case Level.Easy: + _currentLevel = Level.Medium; + break; + case Level.Medium: + _currentLevel = Level.Hard; + break; + case Level.Hard: + _currentLevel = Level.Easy; + break; } + + UpdateButtonStates(); } private void OnBtnMode() - { //Choose mode for the game - if (Player == 0) + { + //Choose mode for the game + if (Player != 0) + return; + + switch (_currentMode) { - if (Mode == "2p") - { - GUIControl.SetControlLabel(GetID, BtnMode.GetID, - MyConnect.GUILocalizeStrings.Get(20) + // Mode: Play vs - MyConnect.GUILocalizeStrings.Get(21)); // Comp - Mode = "1p"; - // Enable level selection - GUIControl.EnableControl(GetID, 4); - } - else - { - GUIControl.SetControlLabel(GetID, BtnMode.GetID, - MyConnect.GUILocalizeStrings.Get(20) + // Mode: Play vs - MyConnect.GUILocalizeStrings.Get(22)); // Player - Mode = "2p"; - // Disable level selection - GUIControl.DisableControl(GetID, 4); - } + case Mode.PlayerVsComputer: + _currentMode = Mode.PlayerVsPlayer; + break; + case Mode.PlayerVsPlayer: + _currentMode = Mode.PlayerVsComputer; + break; } + + UpdateButtonStates(); } + private void OnBtnSound() + { + _soundOn = btnSound.Selected; + UpdateButtonStates(); + } + private void OnBtnWhatsThis() { GUIDialogText dlg = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); @@ -377,6 +338,100 @@ dlg.DoModal(GetID); } + private void OnRenderSound(string strFilePath) + { + if (_soundOn) + { + MediaPortal.Util.Utils.PlaySound(strFilePath, false, true); + } + } + + private void UpdateButtonStates() + { + GUIPropertyManager.SetProperty("#header_label", MyConnect.GUILocalizeStrings.Get(0)); // MyConnect + + GUIControl.SetControlLabel(GetID, btnStart.GetID, MyConnect.GUILocalizeStrings.Get(1)); // Start + btnStart.Disabled = (Player != 0); + + string strLine = MyConnect.GUILocalizeStrings.Get(10); // Level: + switch (_currentLevel) + { + case Level.Easy: + strLine += MyConnect.GUILocalizeStrings.Get(11); // easy + AI = 3; + break; + case Level.Medium: + strLine += MyConnect.GUILocalizeStrings.Get(12); // medium + AI = 5; + break; + case Level.Hard: + strLine += MyConnect.GUILocalizeStrings.Get(13); // difficult + AI = 8; + break; + } + GUIControl.SetControlLabel(GetID, btnLevel.GetID, strLine); + btnLevel.Disabled = ((Player != 0) || (_currentMode == Mode.PlayerVsPlayer)); + + strLine = MyConnect.GUILocalizeStrings.Get(20); // Mode: Play vs + switch (_currentMode) + { + case Mode.PlayerVsComputer: + strLine += MyConnect.GUILocalizeStrings.Get(21); // Comp + break; + case Mode.PlayerVsPlayer: + strLine += MyConnect.GUILocalizeStrings.Get(22); // Player + break; + } + GUIControl.SetControlLabel(GetID, btnMode.GetID, strLine); + btnMode.Disabled = (Player != 0); + + GUIControl.SetControlLabel(GetID, btnSound.GetID, MyConnect.GUILocalizeStrings.Get(9)); // Sounds + btnSound.Selected = _soundOn; + + GUIControl.SetControlLabel(GetID, btnWhatsThis.GetID, MyConnect.GUILocalizeStrings.Get(31)); // What is MyConnect? + } + + #endregion + + #region Actions + public override void OnAction(Action action) + { + base.OnAction(action); + } + public void OnAction2(Action action) + { + + if (GUIWindowManager.ActiveWindowEx == (int)GUIWindow.Window.WINDOW_DIALOG_MENU) return; + + //string t = action.wID.ToString(); + //GUIPropertyManager.SetProperty("#Round", t); + + if ((Player == 1) | (Player == 2 && _currentMode == Mode.PlayerVsPlayer)) + { + switch (action.wID) + { + case Action.ActionType.ACTION_MOVE_LEFT: + + break; + case Action.ActionType.ACTION_MOVE_RIGHT: + + break; + case Action.ActionType.ACTION_SELECT_ITEM: + + break; + default: + break; + } + } + } + #endregion + + public void Dispose() + { + _Game.Stop(); + _Game.Tick -= new EventHandler(_Game_Tick); + } + private void Drawfield() { // draw all fields @@ -407,9 +462,8 @@ { round++; Drawfield(); - MediaPortal.Util.Utils.PlaySound("MyConnect4_klick.wav", false, true); + OnRenderSound("MyConnect4_klick.wav"); - if (gameEngine.isWinner(Player - 1) == true) { int tmp = Player; @@ -419,7 +473,7 @@ MyConnect.GUILocalizeStrings.Get(3) // wins the game! ); Player = 0; - RelButtons(); + UpdateButtonStates(); gameEngine.getState().flashit(3); Drawfield(); } @@ -427,7 +481,7 @@ { GUIPropertyManager.SetProperty("#Status", MyConnect.GUILocalizeStrings.Get(4)); // Nobody wins the game ! Its a draw ! Player = 0; - RelButtons(); + UpdateButtonStates(); GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); } NextPlayer(); @@ -446,20 +500,6 @@ } } - private void RelButtons() - { - // Enable start button - GUIControl.EnableControl(GetID, 2); - // Enable mode selection - GUIControl.EnableControl(GetID, 3); - if (Mode == "1p") // Enable level selection - GUIControl.EnableControl(GetID, 4); - // Enable What this - GUIControl.EnableControl(GetID, 7); - - //GUIControl.FocusControl(GetID, 2); - } - void _Game_Tick(object sender, EventArgs e) { //display status of the game @@ -478,7 +518,7 @@ wait = wait - 1; } - if (Player == 2 && Mode == "1p" && wait == 0) + if (Player == 2 && _currentMode == Mode.PlayerVsComputer && wait == 0) { Point pos = gameEngine.computerMove(1, AI); if (pos.Y >= 0) @@ -486,7 +526,7 @@ wait = 2; round++; Drawfield(); - MediaPortal.Util.Utils.PlaySound("MyConnect4_klick.wav", false, true); + OnRenderSound("MyConnect4_klick.wav"); if (gameEngine.isWinner(Player - 1) == true) @@ -499,13 +539,13 @@ gameEngine.getState().flashit(3); Drawfield(); Player = 0; - RelButtons(); + UpdateButtonStates(); } if (gameEngine.isTie() == true) { GUIPropertyManager.SetProperty("#Status", MyConnect.GUILocalizeStrings.Get(4)); // Nobody wins the game ! Its a draw ! Player = 0; - RelButtons(); + UpdateButtonStates(); } NextPlayer(); } @@ -513,6 +553,5 @@ } } - } } \ No newline at end of file Modified: trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml =================================================================== --- trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml 2007-05-26 07:11:42 UTC (rev 451) +++ trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml 2007-05-26 07:14:27 UTC (rev 452) @@ -8,6 +8,7 @@ <String id="4">Unentschieden! Keiner hat gewonnen!</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/My Connect4/language/MyConnect4/strings_en.xml =================================================================== --- trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml 2007-05-26 07:11:42 UTC (rev 451) +++ trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml 2007-05-26 07:14:27 UTC (rev 452) @@ -2,12 +2,13 @@ <Language name="English" characters="255"> <Section name="unmapped"> <String id="0" prefix="My ">Connect 4</String> - <String id="1">Start</String> + <String id="1">New Game</String> <String id="2">Player</String> <String id="3">wins the game!</String> <String id="4">Nobody wins the game ! Its a draw !</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. |
From: <che...@us...> - 2007-05-27 08:48:42
|
Revision: 468 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=468&view=rev Author: chef_koch Date: 2007-05-27 01:48:08 -0700 (Sun, 27 May 2007) Log Message: ----------- added release folder, for easier svn export, when release new version Added Paths: ----------- trunk/plugins/My Connect4/Release/ trunk/plugins/My Connect4/Release/language/ trunk/plugins/My Connect4/Release/plugins/ trunk/plugins/My Connect4/Release/plugins/Windows/ trunk/plugins/My Connect4/Release/skin/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <che...@us...> - 2007-05-27 08:53:21
|
Revision: 469 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=469&view=rev Author: chef_koch Date: 2007-05-27 01:53:05 -0700 (Sun, 27 May 2007) Log Message: ----------- moved language and skin files to release folder Added Paths: ----------- trunk/plugins/My Connect4/Release/language/MyConnect4/ trunk/plugins/My Connect4/Release/language/MyConnect4/strings_de.xml trunk/plugins/My Connect4/Release/language/MyConnect4/strings_en.xml trunk/plugins/My Connect4/Release/skin/BlueTwo/ trunk/plugins/My Connect4/Release/skin/BlueTwo/MyConnect4.xml trunk/plugins/My Connect4/Release/skin/SimpleMP/ trunk/plugins/My Connect4/Release/skin/SimpleMP/MyConnect4.xml trunk/plugins/My Connect4/Release/skin/_default/ trunk/plugins/My Connect4/Release/skin/_default/Media/ trunk/plugins/My Connect4/Release/skin/_default/Sounds/ Removed Paths: ------------- trunk/plugins/My Connect4/Release/language/MyConnect4/strings_de.xml trunk/plugins/My Connect4/Release/language/MyConnect4/strings_en.xml trunk/plugins/My Connect4/Release/skin/BlueTwo/MyConnect4.xml trunk/plugins/My Connect4/Release/skin/SimpleMP/MyConnect4.xml trunk/plugins/My Connect4/Release/skin/_default/Media/ trunk/plugins/My Connect4/Release/skin/_default/Sounds/ trunk/plugins/My Connect4/Skin/BlueTwo/ trunk/plugins/My Connect4/Skin/SimpleMP/ trunk/plugins/My Connect4/Skin/_default/ trunk/plugins/My Connect4/language/MyConnect4/ Copied: trunk/plugins/My Connect4/Release/language/MyConnect4 (from rev 464, trunk/plugins/My Connect4/language/MyConnect4) Deleted: trunk/plugins/My Connect4/Release/language/MyConnect4/strings_de.xml =================================================================== --- trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml 2007-05-27 02:26:19 UTC (rev 464) +++ trunk/plugins/My Connect4/Release/language/MyConnect4/strings_de.xml 2007-05-27 08:53:05 UTC (rev 469) @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Language name="German" characters="255"> - <Section name="unmapped"> - <String id="0" prefix="Mein ">Vier gewinnt</String> - <String id="1">Neues Spiel</String> - <String id="2">Spieler</String> - <String id="3">gewinnt das Spiel!</String> - <String id="4">Unentschieden! Keiner hat gewonnen!</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> - <String id="13">schwer</String> - <String id="20">Spieler vs. </String> - <String id="21">Computer</String> - <String id="22">Spieler</String> - <String id="31">Was ist Vier gewinnt?</String> - <String id="32">Connect 4 is a game where your object is to get 4 tokens in a row. -This could be vertically, horizontal or diagonally. - -Gameboard design by Mikael Söderström. - -AI code has been taken from http://www.Planet-Source-Code.com - -Good luck -Mark Koenig (kroko)</String> - </Section> -</Language> \ No newline at end of file Copied: trunk/plugins/My Connect4/Release/language/MyConnect4/strings_de.xml (from rev 468, trunk/plugins/My Connect4/language/MyConnect4/strings_de.xml) =================================================================== --- trunk/plugins/My Connect4/Release/language/MyConnect4/strings_de.xml (rev 0) +++ trunk/plugins/My Connect4/Release/language/MyConnect4/strings_de.xml 2007-05-27 08:53:05 UTC (rev 469) @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Language name="German" characters="255"> + <Section name="unmapped"> + <String id="0" prefix="Mein ">Vier gewinnt</String> + <String id="1">Neues Spiel</String> + <String id="2">Spieler</String> + <String id="3">gewinnt das Spiel!</String> + <String id="4">Unentschieden! Keiner hat gewonnen!</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> + <String id="13">schwer</String> + <String id="20">Spieler vs. </String> + <String id="21">Computer</String> + <String id="22">Spieler</String> + <String id="31">Was ist Vier gewinnt?</String> + <String id="32">Connect 4 is a game where your object is to get 4 tokens in a row. +This could be vertically, horizontal or diagonally. + +Gameboard design by Mikael Söderström. + +AI code has been taken from http://www.Planet-Source-Code.com + +Good luck +Mark Koenig (kroko)</String> + </Section> +</Language> \ No newline at end of file Deleted: trunk/plugins/My Connect4/Release/language/MyConnect4/strings_en.xml =================================================================== --- trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml 2007-05-27 02:26:19 UTC (rev 464) +++ trunk/plugins/My Connect4/Release/language/MyConnect4/strings_en.xml 2007-05-27 08:53:05 UTC (rev 469) @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Language name="English" characters="255"> - <Section name="unmapped"> - <String id="0" prefix="My ">Connect 4</String> - <String id="1">New Game</String> - <String id="2">Player</String> - <String id="3">wins the game!</String> - <String id="4">Nobody wins the game ! Its a draw !</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> - <String id="13">difficult</String> - <String id="20">Player vs. </String> - <String id="21">Computer</String> - <String id="22">Player</String> - <String id="31">What's Connect 4</String> - <String id="32">Connect 4 is a game where your object is to get 4 tokens in a row. -This could be vertically, horizontal or diagonally. - -Gameboard design by Mikael Söderström. - -AI code has been taken from http://www.Planet-Source-Code.com - -Good luck -Mark Koenig (kroko)</String> - </Section> -</Language> \ No newline at end of file Copied: trunk/plugins/My Connect4/Release/language/MyConnect4/strings_en.xml (from rev 468, trunk/plugins/My Connect4/language/MyConnect4/strings_en.xml) =================================================================== --- trunk/plugins/My Connect4/Release/language/MyConnect4/strings_en.xml (rev 0) +++ trunk/plugins/My Connect4/Release/language/MyConnect4/strings_en.xml 2007-05-27 08:53:05 UTC (rev 469) @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Language name="English" characters="255"> + <Section name="unmapped"> + <String id="0" prefix="My ">Connect 4</String> + <String id="1">New Game</String> + <String id="2">Player</String> + <String id="3">wins the game!</String> + <String id="4">Nobody wins the game ! Its a draw !</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> + <String id="13">difficult</String> + <String id="20">Player vs. </String> + <String id="21">Computer</String> + <String id="22">Player</String> + <String id="31">What's Connect 4</String> + <String id="32">Connect 4 is a game where your object is to get 4 tokens in a row. +This could be vertically, horizontal or diagonally. + +Gameboard design by Mikael Söderström. + +AI code has been taken from http://www.Planet-Source-Code.com + +Good luck +Mark Koenig (kroko)</String> + </Section> +</Language> \ No newline at end of file Copied: trunk/plugins/My Connect4/Release/skin/BlueTwo (from rev 464, trunk/plugins/My Connect4/Skin/BlueTwo) Deleted: trunk/plugins/My Connect4/Release/skin/BlueTwo/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/BlueTwo/MyConnect4.xml 2007-05-27 02:26:19 UTC (rev 464) +++ trunk/plugins/My Connect4/Release/skin/BlueTwo/MyConnect4.xml 2007-05-27 08:53:05 UTC (rev 469) @@ -1,604 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<window> - <id>22031969</id> - <defaultcontrol>2</defaultcontrol> - <allowoverlay>yes</allowoverlay> - <autohidetopbar>yes</autohidetopbar> - <controls> - <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>250</posX> - <posY>70</posY> - <label>#header_label</label> - <font>font16</font> - <align>right</align> - <textcolor>White</textcolor> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> - <control> - <description>button group</description> - <type>group</type> - <animation effect="fade" time="250">WindowOpen</animation> - <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> - <onleft>2</onleft> - <onright>301</onright> - <onup>6</onup> - <ondown>3</ondown> - </control> - <control> - <description>Mode</description> - <type>button</type> - <id>3</id> - <onleft>3</onleft> - <onright>301</onright> - <onup>2</onup> - <ondown>4</ondown> - </control> - <control> - <description>Level</description> - <type>button</type> - <id>4</id> - <onleft>4</onleft> - <onright>301</onright> - <onup>3</onup> - <ondown>5</ondown> - </control> - <control> - <description>Sounds</description> - <type>togglebutton</type> - <id>5</id> - <onleft>5</onleft> - <onright>301</onright> - <onup>4</onup> - <ondown>6</ondown> - </control> - <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>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>301</onright> - <onup>5</onup> - <ondown>2</ondown> - </control> - </control> - <control> - <description>BackGround Game</description> - <type>image</type> - <id>15</id> - <posX>260</posX> - <posY>120</posY> - <width>440</width> - <height>380</height> - <texture>MyConnBack.png</texture> - <animation effect="fade" time="250">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> - <animation effect="slide" time="400" end="800,0">WindowClose</animation> - </control> - <control> - <description>game group</description> - <type>group</type> - <animation effect="fade" time="250">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> - <animation effect="slide" time="400" end="800,0">WindowClose</animation> - <control> - <type>image</type> - <id>101</id> - <posX>280</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_1</texture> - </control> - <control> - <type>image</type> - <id>102</id> - <posX>340</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_2</texture> - </control> - <control> - <type>image</type> - <id>103</id> - <posX>400</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_3</texture> - </control> - <control> - <type>image</type> - <id>104</id> - <posX>460</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_4</texture> - </control> - <control> - <type>image</type> - <id>105</id> - <posX>520</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_5</texture> - </control> - <control> - <type>image</type> - <id>106</id> - <posX>580</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_6</texture> - </control> - <control> - <type>image</type> - <id>107</id> - <posX>640</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_7</texture> - </control> - <control> - <type>image</type> - <id>111</id> - <posX>280</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_1</texture> - </control> - <control> - <type>image</type> - <id>112</id> - <posX>340</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_2</texture> - </control> - <control> - <type>image</type> - <id>113</id> - <posX>400</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_3</texture> - </control> - <control> - <type>image</type> - <id>114</id> - <posX>460</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_4</texture> - </control> - <control> - <type>image</type> - <id>115</id> - <posX>520</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_5</texture> - </control> - <control> - <type>image</type> - <id>116</id> - <posX>580</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_6</texture> - </control> - <control> - <type>image</type> - <id>117</id> - <posX>640</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_7</texture> - </control> - <control> - <type>image</type> - <id>121</id> - <posX>280</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_1</texture> - </control> - <control> - <type>image</type> - <id>122</id> - <posX>340</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_2</texture> - </control> - <control> - <type>image</type> - <id>123</id> - <posX>400</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_3</texture> - </control> - <control> - <type>image</type> - <id>124</id> - <posX>460</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_4</texture> - </control> - <control> - <type>image</type> - <id>125</id> - <posX>520</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_5</texture> - </control> - <control> - <type>image</type> - <id>126</id> - <posX>580</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_6</texture> - </control> - <control> - <type>image</type> - <id>127</id> - <posX>640</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_7</texture> - </control> - <control> - <type>image</type> - <id>131</id> - <posX>280</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_1</texture> - </control> - <control> - <type>image</type> - <id>132</id> - <posX>340</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_2</texture> - </control> - <control> - <type>image</type> - <id>133</id> - <posX>400</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_3</texture> - </control> - <control> - <type>image</type> - <id>134</id> - <posX>460</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_4</texture> - </control> - <control> - <type>image</type> - <id>135</id> - <posX>520</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_5</texture> - </control> - <control> - <type>image</type> - <id>136</id> - <posX>580</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_6</texture> - </control> - <control> - <type>image</type> - <id>137</id> - <posX>640</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_7</texture> - </control> - <control> - <type>image</type> - <id>141</id> - <posX>280</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_1</texture> - </control> - <control> - <type>image</type> - <id>142</id> - <posX>340</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_2</texture> - </control> - <control> - <type>image</type> - <id>143</id> - <posX>400</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_3</texture> - </control> - <control> - <type>image</type> - <id>144</id> - <posX>460</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_4</texture> - </control> - <control> - <type>image</type> - <id>145</id> - <posX>520</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_5</texture> - </control> - <control> - <type>image</type> - <id>146</id> - <posX>580</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_6</texture> - </control> - <control> - <type>image</type> - <id>147</id> - <posX>640</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_7</texture> - </control> - <control> - <type>image</type> - <id>151</id> - <posX>280</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_1</texture> - </control> - <control> - <type>image</type> - <id>152</id> - <posX>340</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_2</texture> - </control> - <control> - <type>image</type> - <id>153</id> - <posX>400</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_3</texture> - </control> - <control> - <type>image</type> - <id>154</id> - <posX>460</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_4</texture> - </control> - <control> - <type>image</type> - <id>155</id> - <posX>520</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_5</texture> - </control> - <control> - <type>image</type> - <id>156</id> - <posX>580</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_6</texture> - </control> - <control> - <type>image</type> - <id>157</id> - <posX>640</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_7</texture> - </control> - <control> - <description>text label</description> - <type>label</type> - <id>18</id> - <posX>260</posX> - <posY>510</posY> - <label>#Status</label> - <font>font16</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> - </control> - <control> - <description>Pointer 01</description> - <type>button</type> - <id>301</id> - <posX>280</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>2</onleft> - <onright>302</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 02</description> - <type>button</type> - <id>302</id> - <posX>340</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>301</onleft> - <onright>303</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 03</description> - <type>button</type> - <id>303</id> - <posX>400</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>302</onleft> - <onright>304</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 04</description> - <type>button</type> - <id>304</id> - <posX>460</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>303</onleft> - <onright>305</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 05</description> - <type>button</type> - <id>305</id> - <posX>520</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>304</onleft> - <onright>306</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 06</description> - <type>button</type> - <id>306</id> - <posX>580</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>305</onleft> - <onright>307</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 07</description> - <type>button</type> - <id>307</id> - <posX>640</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>306</onleft> - <onright>307</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - </control> - </controls> -</window> \ No newline at end of file Copied: trunk/plugins/My Connect4/Release/skin/BlueTwo/MyConnect4.xml (from rev 468, trunk/plugins/My Connect4/Skin/BlueTwo/MyConnect4.xml) =================================================================== --- trunk/plugins/My Connect4/Release/skin/BlueTwo/MyConnect4.xml (rev 0) +++ trunk/plugins/My Connect4/Release/skin/BlueTwo/MyConnect4.xml 2007-05-27 08:53:05 UTC (rev 469) @@ -0,0 +1,617 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <id>22031969</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <autohidetopbar>yes</autohidetopbar> + <controls> + <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>250</posX> + <posY>70</posY> + <label>#header_label</label> + <font>font16</font> + <align>right</align> + <textcolor>White</textcolor> + <animation effect="fade" time="200">WindowOpen</animation> + <animation effect="fade" time="200">WindowClose</animation> + </control> + <control> + <description>button group</description> + <type>group</type> + <animation effect="fade" time="250">WindowOpen</animation> + <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> + <onleft>2</onleft> + <onright>301</onright> + <onup>6</onup> + <ondown>3</ondown> + </control> + <control> + <description>Mode</description> + <type>button</type> + <id>3</id> + <onleft>3</onleft> + <onright>301</onright> + <onup>2</onup> + <ondown>4</ondown> + </control> + <control> + <description>Level</description> + <type>button</type> + <id>4</id> + <onleft>4</onleft> + <onright>301</onright> + <onup>3</onup> + <ondown>5</ondown> + </control> + <control> + <description>Sounds</description> + <type>togglebutton</type> + <id>5</id> + <onleft>5</onleft> + <onright>301</onright> + <onup>4</onup> + <ondown>6</ondown> + </control> + <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>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>301</onright> + <onup>5</onup> + <ondown>2</ondown> + </control> + </control> + <control> + <description>BackGround Game</description> + <type>image</type> + <id>15</id> + <posX>260</posX> + <posY>120</posY> + <width>440</width> + <height>380</height> + <texture>MyConnBack.png</texture> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> + <animation effect="slide" time="400" end="800,0">WindowClose</animation> + </control> + <control> + <description>game group</description> + <type>group</type> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> + <animation effect="slide" time="400" end="800,0">WindowClose</animation> + <control> + <description>text label</description> + <type>label</type> + <id>18</id> + <posX>260</posX> + <posY>510</posY> + <label>#Status</label> + <font>font16</font> + <align>Left</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <description>Pointer 01</description> + <type>button</type> + <id>301</id> + <posX>280</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onright>302</onright> + <onup>301</onup> + <ondown>301</ondown> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 02</description> + <type>button</type> + <id>302</id> + <posX>340</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>301</onleft> + <onright>303</onright> + <onup>302</onup> + <ondown>302</ondown> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 03</description> + <type>button</type> + <id>303</id> + <posX>400</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>302</onleft> + <onright>304</onright> + <onup>303</onup> + <ondown>303</ondown> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 04</description> + <type>button</type> + <id>304</id> + <posX>460</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>303</onleft> + <onright>305</onright> + <onup>304</onup> + <ondown>304</ondown> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 05</description> + <type>button</type> + <id>305</id> + <posX>520</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>304</onleft> + <onright>306</onright> + <onup>305</onup> + <ondown>305</ondown> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 06</description> + <type>button</type> + <id>306</id> + <posX>580</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>305</onleft> + <onright>307</onright> + <onup>306</onup> + <ondown>306</ondown> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <description>Pointer 07</description> + <type>button</type> + <id>307</id> + <posX>640</posX> + <posY>70</posY> + <width>40</width> + <height>40</height> + <onleft>306</onleft> + <onright>301</onright> + <onup>307</onup> + <ondown>307</ondown> + <textureFocus>MyConn4Cur.png</textureFocus> + </control> + <control> + <type>image</type> + <id>101</id> + <posX>280</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_1</texture> + </control> + <control> + <type>image</type> + <id>102</id> + <posX>340</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_2</texture> + </control> + <control> + <type>image</type> + <id>103</id> + <posX>400</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_3</texture> + </control> + <control> + <type>image</type> + <id>104</id> + <posX>460</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_4</texture> + </control> + <control> + <type>image</type> + <id>105</id> + <posX>520</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_5</texture> + </control> + <control> + <type>image</type> + <id>106</id> + <posX>580</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_6</texture> + </control> + <control> + <type>image</type> + <id>107</id> + <posX>640</posX> + <posY>140</posY> + <width>40</width> + <height>40</height> + <texture>#Con_1_7</texture> + </control> + <control> + <type>image</type> + <id>111</id> + <posX>280</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_1</texture> + </control> + <control> + <type>image</type> + <id>112</id> + <posX>340</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_2</texture> + </control> + <control> + <type>image</type> + <id>113</id> + <posX>400</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_3</texture> + </control> + <control> + <type>image</type> + <id>114</id> + <posX>460</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_4</texture> + </control> + <control> + <type>image</type> + <id>115</id> + <posX>520</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_5</texture> + </control> + <control> + <type>image</type> + <id>116</id> + <posX>580</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_6</texture> + </control> + <control> + <type>image</type> + <id>117</id> + <posX>640</posX> + <posY>200</posY> + <width>40</width> + <height>40</height> + <texture>#Con_2_7</texture> + </control> + <control> + <type>image</type> + <id>121</id> + <posX>280</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_1</texture> + </control> + <control> + <type>image</type> + <id>122</id> + <posX>340</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_2</texture> + </control> + <control> + <type>image</type> + <id>123</id> + <posX>400</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_3</texture> + </control> + <control> + <type>image</type> + <id>124</id> + <posX>460</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_4</texture> + </control> + <control> + <type>image</type> + <id>125</id> + <posX>520</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_5</texture> + </control> + <control> + <type>image</type> + <id>126</id> + <posX>580</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_6</texture> + </control> + <control> + <type>image</type> + <id>127</id> + <posX>640</posX> + <posY>260</posY> + <width>40</width> + <height>40</height> + <texture>#Con_3_7</texture> + </control> + <control> + <type>image</type> + <id>131</id> + <posX>280</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_1</texture> + </control> + <control> + <type>image</type> + <id>132</id> + <posX>340</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_2</texture> + </control> + <control> + <type>image</type> + <id>133</id> + <posX>400</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_3</texture> + </control> + <control> + <type>image</type> + <id>134</id> + <posX>460</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_4</texture> + </control> + <control> + <type>image</type> + <id>135</id> + <posX>520</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_5</texture> + </control> + <control> + <type>image</type> + <id>136</id> + <posX>580</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_6</texture> + </control> + <control> + <type>image</type> + <id>137</id> + <posX>640</posX> + <posY>320</posY> + <width>40</width> + <height>40</height> + <texture>#Con_4_7</texture> + </control> + <control> + <type>image</type> + <id>141</id> + <posX>280</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_1</texture> + </control> + <control> + <type>image</type> + <id>142</id> + <posX>340</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_2</texture> + </control> + <control> + <type>image</type> + <id>143</id> + <posX>400</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_3</texture> + </control> + <control> + <type>image</type> + <id>144</id> + <posX>460</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_4</texture> + </control> + <control> + <type>image</type> + <id>145</id> + <posX>520</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_5</texture> + </control> + <control> + <type>image</type> + <id>146</id> + <posX>580</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_6</texture> + </control> + <control> + <type>image</type> + <id>147</id> + <posX>640</posX> + <posY>380</posY> + <width>40</width> + <height>40</height> + <texture>#Con_5_7</texture> + </control> + <control> + <type>image</type> + <id>151</id> + <posX>280</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_1</texture> + </control> + <control> + <type>image</type> + <id>152</id> + <posX>340</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_2</texture> + </control> + <control> + <type>image</type> + <id>153</id> + <posX>400</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_3</texture> + </control> + <control> + <type>image</type> + <id>154</id> + <posX>460</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_4</texture> + </control> + <control> + <type>image</type> + <id>155</id> + <posX>520</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_5</texture> + </control> + <control> + <type>image</type> + <id>156</id> + <posX>580</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_6</texture> + </control> + <control> + <type>image</type> + <id>157</id> + <posX>640</posX> + <posY>440</posY> + <width>40</width> + <height>40</height> + <texture>#Con_6_7</texture> + </control> + </control> + </controls> +</window> \ No newline at end of file Copied: trunk/plugins/My Connect4/Release/skin/SimpleMP (from rev 464, trunk/plugins/My Connect4/Skin/SimpleMP) Deleted: trunk/plugins/My Connect4/Release/skin/SimpleMP/MyConnect4.xml =================================================================== --- trunk/plugins/My Connect4/Skin/SimpleMP/MyConnect4.xml 2007-05-27 02:26:19 UTC (rev 464) +++ trunk/plugins/My Connect4/Release/skin/SimpleMP/MyConnect4.xml 2007-05-27 08:53:05 UTC (rev 469) @@ -1,611 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<window> - <id>22031969</id> - <defaultcontrol>2</defaultcontrol> - <allowoverlay>yes</allowoverlay> - <autohidetopbar>yes</autohidetopbar> - <controls> - <import>common.time.xml</import> - <control> - <description>BackGround</description> - <type>image</type> - <id>10</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>11</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> - <type>group</type> - <description>group element</description> - <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>Start</description> - <type>button</type> - <id>2</id> - <onleft>2</onleft> - <onright>301</onright> - <onup>6</onup> - <ondown>3</ondown> - </control> - <control> - <description>Mode</description> - <type>button</type> - <id>3</id> - <onleft>3</onleft> - <onright>301</onright> - <onup>2</onup> - <ondown>4</ondown> - </control> - <control> - <description>Level</description> - <type>button</type> - <id>4</id> - <onleft>4</onleft> - <onright>301</onright> - <onup>3</onup> - <ondown>5</ondown> - </control> - <control> - <description>Sounds</description> - <type>togglebutton</type> - <id>5</id> - <onleft>5</onleft> - <onright>301</onright> - <onup>4</onup> - <ondown>6</ondown> - </control> - <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>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>Whatsthis</description> - <type>button</type> - <id>6</id> - <onleft>6</onleft> - <onright>301</onright> - <onup>5</onup> - <ondown>2</ondown> - </control> - </control> - <control> - <description>BackGround Game</description> - <type>image</type> - <id>15</id> - <posX>260</posX> - <posY>120</posY> - <width>440</width> - <height>380</height> - <texture>MyConnBack.png</texture> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - </control> - <control> - <type>group</type> - <description>group element</description> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> - <control> - <type>image</type> - <id>101</id> - <posX>280</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_1</texture> - </control> - <control> - <type>image</type> - <id>102</id> - <posX>340</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_2</texture> - </control> - <control> - <type>image</type> - <id>103</id> - <posX>400</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_3</texture> - </control> - <control> - <type>image</type> - <id>104</id> - <posX>460</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_4</texture> - </control> - <control> - <type>image</type> - <id>105</id> - <posX>520</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_5</texture> - </control> - <control> - <type>image</type> - <id>106</id> - <posX>580</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_6</texture> - </control> - <control> - <type>image</type> - <id>107</id> - <posX>640</posX> - <posY>140</posY> - <width>40</width> - <height>40</height> - <texture>#Con_1_7</texture> - </control> - <control> - <type>image</type> - <id>111</id> - <posX>280</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_1</texture> - </control> - <control> - <type>image</type> - <id>112</id> - <posX>340</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_2</texture> - </control> - <control> - <type>image</type> - <id>113</id> - <posX>400</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_3</texture> - </control> - <control> - <type>image</type> - <id>114</id> - <posX>460</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_4</texture> - </control> - <control> - <type>image</type> - <id>115</id> - <posX>520</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_5</texture> - </control> - <control> - <type>image</type> - <id>116</id> - <posX>580</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_6</texture> - </control> - <control> - <type>image</type> - <id>117</id> - <posX>640</posX> - <posY>200</posY> - <width>40</width> - <height>40</height> - <texture>#Con_2_7</texture> - </control> - <control> - <type>image</type> - <id>121</id> - <posX>280</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_1</texture> - </control> - <control> - <type>image</type> - <id>122</id> - <posX>340</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_2</texture> - </control> - <control> - <type>image</type> - <id>123</id> - <posX>400</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_3</texture> - </control> - <control> - <type>image</type> - <id>124</id> - <posX>460</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_4</texture> - </control> - <control> - <type>image</type> - <id>125</id> - <posX>520</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_5</texture> - </control> - <control> - <type>image</type> - <id>126</id> - <posX>580</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_6</texture> - </control> - <control> - <type>image</type> - <id>127</id> - <posX>640</posX> - <posY>260</posY> - <width>40</width> - <height>40</height> - <texture>#Con_3_7</texture> - </control> - <control> - <type>image</type> - <id>131</id> - <posX>280</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_1</texture> - </control> - <control> - <type>image</type> - <id>132</id> - <posX>340</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_2</texture> - </control> - <control> - <type>image</type> - <id>133</id> - <posX>400</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_3</texture> - </control> - <control> - <type>image</type> - <id>134</id> - <posX>460</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_4</texture> - </control> - <control> - <type>image</type> - <id>135</id> - <posX>520</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_5</texture> - </control> - <control> - <type>image</type> - <id>136</id> - <posX>580</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_6</texture> - </control> - <control> - <type>image</type> - <id>137</id> - <posX>640</posX> - <posY>320</posY> - <width>40</width> - <height>40</height> - <texture>#Con_4_7</texture> - </control> - <control> - <type>image</type> - <id>141</id> - <posX>280</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_1</texture> - </control> - <control> - <type>image</type> - <id>142</id> - <posX>340</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_2</texture> - </control> - <control> - <type>image</type> - <id>143</id> - <posX>400</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_3</texture> - </control> - <control> - <type>image</type> - <id>144</id> - <posX>460</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_4</texture> - </control> - <control> - <type>image</type> - <id>145</id> - <posX>520</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_5</texture> - </control> - <control> - <type>image</type> - <id>146</id> - <posX>580</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_6</texture> - </control> - <control> - <type>image</type> - <id>147</id> - <posX>640</posX> - <posY>380</posY> - <width>40</width> - <height>40</height> - <texture>#Con_5_7</texture> - </control> - <control> - <type>image</type> - <id>151</id> - <posX>280</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_1</texture> - </control> - <control> - <type>image</type> - <id>152</id> - <posX>340</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_2</texture> - </control> - <control> - <type>image</type> - <id>153</id> - <posX>400</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_3</texture> - </control> - <control> - <type>image</type> - <id>154</id> - <posX>460</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_4</texture> - </control> - <control> - <type>image</type> - <id>155</id> - <posX>520</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_5</texture> - </control> - <control> - <type>image</type> - <id>156</id> - <posX>580</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_6</texture> - </control> - <control> - <type>image</type> - <id>157</id> - <posX>640</posX> - <posY>440</posY> - <width>40</width> - <height>40</height> - <texture>#Con_6_7</texture> - </control> - <control> - <description>text label</description> - <type>label</type> - <id>18</id> - <posX>260</posX> - <posY>510</posY> - <label>#Status</label> - <font>font16</font> - <align>Left</align> - <textcolor>ffffffff</textcolor> - </control> - <control> - <description>Pointer 01</description> - <type>button</type> - <id>301</id> - <posX>280</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>2</onleft> - <onright>302</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 02</description> - <type>button</type> - <id>302</id> - <posX>340</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>301</onleft> - <onright>303</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 03</description> - <type>button</type> - <id>303</id> - <posX>400</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>302</onleft> - <onright>304</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 04</description> - <type>button</type> - <id>304</id> - <posX>460</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>303</onleft> - <onright>305</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 05</description> - <type>button</type> - <id>305</id> - <posX>520</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>304</onleft> - <onright>306</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 06</description> - <type>button</type> - <id>306</id> - <posX>580</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>305</onleft> - <onright>307</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - <control> - <description>Pointer 07</description> - <type>button</type> - <id>307</id> - <posX>640</posX> - <posY>70</posY> - <width>40</width> - <height>40</height> - <onleft>306</onleft> - <onright>307</onright> - <textureFocus>MyConn4Cur.png</textureFocus> - </control> - </control> - </controls> -</window> Copied: trunk/plugins/My Connect4/Release/skin/SimpleMP/MyConnect4.xml (from rev 468, trunk/plugins/My Connect4/Skin/SimpleMP/MyConnect4.xml) =================================================================== --- trunk/plugins/My Connect4/Release/skin/SimpleMP/MyConnect4.xml (rev 0) +++ trunk/plugins/My Connect4/Release/skin/SimpleMP/MyConnect4.xml 2007-05-27 08:53:05 UTC (rev 469) @@ -0,0 +1,611 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <id>22031969</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <autohidetopbar>yes</autohidetopbar> + <controls> + <import>common.time.xml</import> + <control> + <description>BackGround</description> + <type>image</type> + <id>10</id> + <posX>0</posX> + <posY>0</pos... [truncated message content] |
From: <che...@us...> - 2007-05-27 08:57:18
|
Revision: 470 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=470&view=rev Author: chef_koch Date: 2007-05-27 01:57:17 -0700 (Sun, 27 May 2007) Log Message: ----------- removed obsolete folders Removed Paths: ------------- trunk/plugins/My Connect4/Skin/ trunk/plugins/My Connect4/language/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |