From: Marek Moeckel Date: Sat, 17 Sep 2005 20:14:25 +0000 (+0000) Subject: added Hidden Flag to Tile Manager X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=b263b994978e461dba8f41871fe72b514098ce21;p=supertux.git added Hidden Flag to Tile Manager SVN-Revision: 2768 --- diff --git a/tools/tilemanager/Application.cs b/tools/tilemanager/Application.cs index 389e9b62e..280b72593 100644 --- a/tools/tilemanager/Application.cs +++ b/tools/tilemanager/Application.cs @@ -24,6 +24,8 @@ public class Application { [Glade.Widget] private Gtk.CheckButton DontUseCheckButton; [Glade.Widget] + private Gtk.CheckButton HiddenCheckButton; + [Glade.Widget] private Gtk.Entry DataEntry; [Glade.Widget] private Gtk.Entry AnimFpsEntry; @@ -174,8 +176,7 @@ public class Application { try { pixbuf = new Pixbuf(tilesetdir + "/" + file); if(pixbuf.Width % 32 != 0 || pixbuf.Height % 32 != 0) - throw new Exception( - "Image Width or Height is not a multiple of 32"); + Console.WriteLine("Warning: Image Width or Height is not a multiple of 32"); } catch(Exception e) { ShowException(e); return; @@ -338,6 +339,8 @@ public class Application { tile.Water = WaterCheckButton.Active; if(sender == SlopeCheckButton) tile.Slope = SlopeCheckButton.Active; + if(sender == HiddenCheckButton) + tile.Hidden = HiddenCheckButton.Active; if(sender == DontUseCheckButton) tile.ID = DontUseCheckButton.Active ? -1 : 0; } @@ -388,6 +391,7 @@ public class Application { IceCheckButton.Active = tile.Ice; WaterCheckButton.Active = tile.Water; SlopeCheckButton.Active = tile.Slope; + HiddenCheckButton.Active = tile.Hidden; DontUseCheckButton.Active = tile.ID == -1; DataEntry.Text = tile.Data.ToString(); AnimFpsEntry.Text = tile.AnimFps.ToString(); diff --git a/tools/tilemanager/Tile.cs b/tools/tilemanager/Tile.cs index 86259087c..9c52b6089 100644 --- a/tools/tilemanager/Tile.cs +++ b/tools/tilemanager/Tile.cs @@ -16,6 +16,7 @@ public class Tile { public bool Ice; public bool Water; public bool Slope; + public bool Hidden; public bool Spike; public bool FullBox; public bool Brick; @@ -68,6 +69,8 @@ public class Tile { writer.Write("slope-type", Data); if(Spike) writer.Write("spike", true); + if(Hidden) + writer.Write("hidden", true); if(Coin) writer.Write("coin", true); if(FullBox) @@ -130,6 +133,9 @@ public class Tile { case "spike": Spike = parser.BoolValue; break; + case "hidden": + Hidden = parser.BoolValue; + break; case "data": Data = parser.IntegerValue; break; diff --git a/tools/tilemanager/tiler.glade b/tools/tilemanager/tiler.glade index 07302c8d8..94eead6d6 100644 --- a/tools/tilemanager/tiler.glade +++ b/tools/tilemanager/tiler.glade @@ -582,6 +582,28 @@ + + + True + True + Hidden + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 2 + 3 + 0 + 1 + fill + + + 0