mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2002-08-09 Duncan Mak <duncan@ximian.com>
* sample/Fifteen.cs (Position): Made it a property instead of a public field. * sample/pixmaps/gnome-color-browser.png: Icon for Fifteen#. svn path=/trunk/gtk-sharp/; revision=6560
This commit is contained in:
parent
2d733eacb6
commit
03a91f8672
@ -1,3 +1,10 @@
|
|||||||
|
2002-08-09 Duncan Mak <duncan@ximian.com>
|
||||||
|
|
||||||
|
* sample/Fifteen.cs (Position): Made it a property instead of a
|
||||||
|
public field.
|
||||||
|
|
||||||
|
* sample/pixmaps/gnome-color-browser.png: Icon for Fifteen#.
|
||||||
|
|
||||||
2002-08-09 Mike Kestner <mkestner@speakeasy.net>
|
2002-08-09 Mike Kestner <mkestner@speakeasy.net>
|
||||||
|
|
||||||
* generator/SymbolTable.cs : make GLib.Value a manually_wrapped_type
|
* generator/SymbolTable.cs : make GLib.Value a manually_wrapped_type
|
||||||
|
@ -121,12 +121,13 @@ public class Fifteen
|
|||||||
|
|
||||||
string [] documenters = new string [] {};
|
string [] documenters = new string [] {};
|
||||||
string translaters = null;
|
string translaters = null;
|
||||||
|
Pixbuf pixbuf = new Pixbuf ("pixmaps/gnome-color-browser.png");
|
||||||
|
|
||||||
Gnome.About about = new Gnome.About ("Fifteen #", "0.1",
|
Gnome.About about = new Gnome.About ("Fifteen #", "0.1",
|
||||||
"Copyright (C) 2002, Ximian Inc.",
|
"Copyright (C) 2002, Ximian Inc.",
|
||||||
"A C# port of Fifteen, a gnomecanvas demo",
|
"A C# port of Fifteen, a gnomecanvas demo",
|
||||||
authors, documenters, translaters,
|
authors, documenters, translaters,
|
||||||
new Gdk.Pixbuf ());
|
pixbuf);
|
||||||
about.Show ();
|
about.Show ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,7 +180,7 @@ public class BoardPiece : Gnome.CanvasGroup
|
|||||||
{
|
{
|
||||||
public static int PIECE_SIZE = 50;
|
public static int PIECE_SIZE = 50;
|
||||||
public int Number;
|
public int Number;
|
||||||
public int Position;
|
int position;
|
||||||
public CanvasText Text;
|
public CanvasText Text;
|
||||||
public BoardPiece [] Board;
|
public BoardPiece [] Board;
|
||||||
public static bool Debug = false;
|
public static bool Debug = false;
|
||||||
@ -226,7 +227,17 @@ public class BoardPiece : Gnome.CanvasGroup
|
|||||||
return String.Format ("#{0:x2}{1:x2}{2:x2}", r, g, b);
|
return String.Format ("#{0:x2}{1:x2}{2:x2}", r, g, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int Position {
|
||||||
|
get {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
set {
|
||||||
|
Board [value] = this;
|
||||||
|
position = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void Piece_Event (object o, CanvasEventArgs args)
|
static void Piece_Event (object o, CanvasEventArgs args)
|
||||||
{
|
{
|
||||||
@ -272,8 +283,7 @@ public class BoardPiece : Gnome.CanvasGroup
|
|||||||
if (toMove) {
|
if (toMove) {
|
||||||
int new_position = y * 4 + x;
|
int new_position = y * 4 + x;
|
||||||
Print_Position ("to", new_position, false);
|
Print_Position ("to", new_position, false);
|
||||||
piece.Board [piece.Position] = null;
|
piece.Board [piece.Position] = null;
|
||||||
piece.Board [new_position] = piece;
|
|
||||||
piece.Position = new_position;
|
piece.Position = new_position;
|
||||||
piece.Move (dx * PIECE_SIZE, dy * PIECE_SIZE);
|
piece.Move (dx * PIECE_SIZE, dy * PIECE_SIZE);
|
||||||
} else
|
} else
|
||||||
|
BIN
sample/pixmaps/gnome-color-browser.png
Normal file
BIN
sample/pixmaps/gnome-color-browser.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Loading…
Reference in New Issue
Block a user