Added checkboxes for attributes defined in supertux/src/tile.hpp
authorMiloš Klouček <m.kloucek.m@atlas.cz>
Mon, 27 Oct 2008 18:26:18 +0000 (18:26 +0000)
committerMiloš Klouček <m.kloucek.m@atlas.cz>
Mon, 27 Oct 2008 18:26:18 +0000 (18:26 +0000)
SVN-Revision: 5814

tools/tilemanager/Application.cs
tools/tilemanager/tiler.glade

index bbb7387..deaf73b 100644 (file)
@@ -14,6 +14,7 @@ public class Application {
     [Glade.Widget]
     private Gtk.DrawingArea DrawingArea;
     [Glade.Widget]
+       //Flags CheckButtons
     private Gtk.CheckButton SolidCheckButton;
     [Glade.Widget]
     private Gtk.CheckButton UniSolidCheckButton;
@@ -22,12 +23,25 @@ public class Application {
     [Glade.Widget]
     private Gtk.CheckButton WaterCheckButton;
     [Glade.Widget]
+    private Gtk.CheckButton HurtsCheckButton;
+    [Glade.Widget]
+    private Gtk.CheckButton FireCheckButton;
+    [Glade.Widget]
+    private Gtk.CheckButton BrickCheckButton;
+    [Glade.Widget]
+    private Gtk.CheckButton CoinCheckButton;
+    [Glade.Widget]
+    private Gtk.CheckButton FullBoxCheckButton;
+    [Glade.Widget]
     private Gtk.CheckButton SlopeCheckButton;
     [Glade.Widget]
+    private Gtk.CheckButton GoalCheckButton;
+    [Glade.Widget]
     private Gtk.CheckButton DontUseCheckButton;
     [Glade.Widget]
     private Gtk.CheckButton HiddenCheckButton;
     [Glade.Widget]
+
     private Gtk.Entry DataEntry;
     [Glade.Widget]
     private Gtk.Entry AnimFpsEntry;
@@ -414,8 +428,20 @@ public class Application {
                 tile.SetAttribute(Attribute.ICE, IceCheckButton.Active);
             if(sender == WaterCheckButton)
                 tile.SetAttribute(Attribute.WATER, WaterCheckButton.Active);
+            if(sender == HurtsCheckButton)
+                tile.SetAttribute(Attribute.HURTS, HurtsCheckButton.Active);
+            if(sender == FireCheckButton)
+                tile.SetAttribute(Attribute.FIRE, FireCheckButton.Active);
+            if(sender == BrickCheckButton)
+                tile.SetAttribute(Attribute.BRICK, BrickCheckButton.Active);
+            if(sender == CoinCheckButton)
+                tile.SetAttribute(Attribute.COIN, CoinCheckButton.Active);
+            if(sender == FullBoxCheckButton)
+                tile.SetAttribute(Attribute.FULLBOX, FullBoxCheckButton.Active);
             if(sender == SlopeCheckButton)
                 tile.SetAttribute(Attribute.SLOPE, SlopeCheckButton.Active);
+            if(sender == GoalCheckButton)
+                tile.SetAttribute(Attribute.GOAL, GoalCheckButton.Active);
             if(sender == HiddenCheckButton)
                 tile.Hidden = HiddenCheckButton.Active;
             if(sender == DontUseCheckButton)
@@ -467,7 +493,13 @@ public class Application {
                 UniSolidCheckButton.Active = tile.HasAttribute(Attribute.UNISOLID);
                 IceCheckButton.Active = tile.HasAttribute(Attribute.ICE);
                 WaterCheckButton.Active = tile.HasAttribute(Attribute.WATER);
+                HurtsCheckButton.Active = tile.HasAttribute(Attribute.HURTS);
+                FireCheckButton.Active = tile.HasAttribute(Attribute.FIRE);
+                BrickCheckButton.Active = tile.HasAttribute(Attribute.BRICK);
+                CoinCheckButton.Active = tile.HasAttribute(Attribute.COIN);
+                FullBoxCheckButton.Active = tile.HasAttribute(Attribute.FULLBOX);
                 SlopeCheckButton.Active = tile.HasAttribute(Attribute.SLOPE);
+                GoalCheckButton.Active = tile.HasAttribute(Attribute.GOAL);
                 HiddenCheckButton.Active = tile.Hidden;
                 DontUseCheckButton.Active = tile.ID == -1;
                 DataEntry.Text = tile.Data.ToString();
index 5f54f84..518b75e 100644 (file)
                <widget class="GtkTable" id="table1">
                  <property name="border_width">6</property>
                  <property name="visible">True</property>
-                 <property name="n_rows">6</property>
+                 <property name="n_rows">9</property>
                  <property name="n_columns">3</property>
                  <property name="homogeneous">False</property>
                  <property name="row_spacing">6</property>
                  </child>
 
                  <child>
-                   <widget class="GtkCheckButton" id="SlopeCheckButton">
-                     <property name="visible">True</property>
-                     <property name="can_focus">True</property>
-                     <property name="label" translatable="yes">Slope</property>
-                     <property name="use_underline">True</property>
-                     <property name="relief">GTK_RELIEF_NORMAL</property>
-                     <property name="focus_on_click">True</property>
-                     <property name="active">False</property>
-                     <property name="inconsistent">False</property>
-                     <property name="draw_indicator">True</property>
-                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Sun, 21 Nov 2004 13:42:25 GMT"/>
-                   </widget>
-                   <packing>
-                     <property name="left_attach">0</property>
-                     <property name="right_attach">1</property>
-                     <property name="top_attach">2</property>
-                     <property name="bottom_attach">3</property>
-                     <property name="x_options">fill</property>
-                     <property name="y_options"></property>
-                   </packing>
-                 </child>
-
-                 <child>
                    <widget class="GtkLabel" id="label3">
                      <property name="visible">True</property>
                      <property name="label" translatable="yes">Data:</property>
                    <packing>
                      <property name="left_attach">0</property>
                      <property name="right_attach">1</property>
-                     <property name="top_attach">3</property>
-                     <property name="bottom_attach">4</property>
+                     <property name="top_attach">6</property>
+                     <property name="bottom_attach">7</property>
                      <property name="x_options">fill</property>
                      <property name="y_options"></property>
                    </packing>
                    <packing>
                      <property name="left_attach">1</property>
                      <property name="right_attach">2</property>
-                     <property name="top_attach">3</property>
-                     <property name="bottom_attach">4</property>
+                     <property name="top_attach">6</property>
+                     <property name="bottom_attach">7</property>
                      <property name="y_options"></property>
                    </packing>
                  </child>
                    <packing>
                      <property name="left_attach">0</property>
                      <property name="right_attach">1</property>
-                     <property name="top_attach">4</property>
-                     <property name="bottom_attach">5</property>
+                     <property name="top_attach">7</property>
+                     <property name="bottom_attach">8</property>
                      <property name="x_options">fill</property>
                      <property name="y_options"></property>
                    </packing>
                    <packing>
                      <property name="left_attach">1</property>
                      <property name="right_attach">2</property>
-                     <property name="top_attach">4</property>
-                     <property name="bottom_attach">5</property>
+                     <property name="top_attach">7</property>
+                     <property name="bottom_attach">8</property>
                      <property name="y_options"></property>
                    </packing>
                  </child>
                    <packing>
                      <property name="left_attach">0</property>
                      <property name="right_attach">1</property>
-                     <property name="top_attach">5</property>
-                     <property name="bottom_attach">6</property>
+                     <property name="top_attach">8</property>
+                     <property name="bottom_attach">9</property>
                      <property name="x_options">fill</property>
                      <property name="y_options"></property>
                    </packing>
                    <packing>
                      <property name="left_attach">1</property>
                      <property name="right_attach">2</property>
-                     <property name="top_attach">5</property>
-                     <property name="bottom_attach">6</property>
+                     <property name="top_attach">8</property>
+                     <property name="bottom_attach">9</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="HiddenCheckButton">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Hidden</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Sun, 21 Nov 2004 13:42:00 GMT"/>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">2</property>
+                     <property name="right_attach">3</property>
+                     <property name="top_attach">0</property>
+                     <property name="bottom_attach">1</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="FullBoxCheckButton">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">FullBox</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Mon, 27 Oct 2008 18:08:17 GMT"/>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">4</property>
+                     <property name="bottom_attach">5</property>
+                     <property name="x_options">fill</property>
                      <property name="y_options"></property>
                    </packing>
                  </child>
                    <packing>
                      <property name="left_attach">1</property>
                      <property name="right_attach">2</property>
+                     <property name="top_attach">5</property>
+                     <property name="bottom_attach">6</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="HurtsCheckButton">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Hurts</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Mon, 27 Oct 2008 18:06:12 GMT"/>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">2</property>
+                     <property name="bottom_attach">3</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="BrickCheckButton">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Brick</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Mon, 27 Oct 2008 18:08:06 GMT"/>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">3</property>
+                     <property name="bottom_attach">4</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="FireCheckButton">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Fire</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Mon, 27 Oct 2008 18:09:23 GMT"/>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">1</property>
+                     <property name="right_attach">2</property>
                      <property name="top_attach">2</property>
                      <property name="bottom_attach">3</property>
                      <property name="x_options">fill</property>
                  </child>
 
                  <child>
-                   <widget class="GtkCheckButton" id="HiddenCheckButton">
+                   <widget class="GtkCheckButton" id="SlopeCheckButton">
                      <property name="visible">True</property>
                      <property name="can_focus">True</property>
-                     <property name="label" translatable="yes">Hidden</property>
+                     <property name="label" translatable="yes">Slope</property>
                      <property name="use_underline">True</property>
                      <property name="relief">GTK_RELIEF_NORMAL</property>
                      <property name="focus_on_click">True</property>
                      <property name="active">False</property>
                      <property name="inconsistent">False</property>
                      <property name="draw_indicator">True</property>
-                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Sun, 21 Nov 2004 13:42:00 GMT"/>
+                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Sun, 21 Nov 2004 13:42:25 GMT"/>
                    </widget>
                    <packing>
-                     <property name="left_attach">2</property>
-                     <property name="right_attach">3</property>
-                     <property name="top_attach">0</property>
-                     <property name="bottom_attach">1</property>
+                     <property name="left_attach">1</property>
+                     <property name="right_attach">2</property>
+                     <property name="top_attach">4</property>
+                     <property name="bottom_attach">5</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="GoalCheckButton">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Goal</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Mon, 27 Oct 2008 18:11:43 GMT"/>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">0</property>
+                     <property name="right_attach">1</property>
+                     <property name="top_attach">5</property>
+                     <property name="bottom_attach">6</property>
+                     <property name="x_options">fill</property>
+                     <property name="y_options"></property>
+                   </packing>
+                 </child>
+
+                 <child>
+                   <widget class="GtkCheckButton" id="CoinCheckButton">
+                     <property name="visible">True</property>
+                     <property name="can_focus">True</property>
+                     <property name="label" translatable="yes">Coin</property>
+                     <property name="use_underline">True</property>
+                     <property name="relief">GTK_RELIEF_NORMAL</property>
+                     <property name="focus_on_click">True</property>
+                     <property name="active">False</property>
+                     <property name="inconsistent">False</property>
+                     <property name="draw_indicator">True</property>
+                     <signal name="toggled" handler="OnCheckButtonToggled" last_modification_time="Mon, 27 Oct 2008 18:13:13 GMT"/>
+                   </widget>
+                   <packing>
+                     <property name="left_attach">1</property>
+                     <property name="right_attach">2</property>
+                     <property name="top_attach">3</property>
+                     <property name="bottom_attach">4</property>
                      <property name="x_options">fill</property>
                      <property name="y_options"></property>
                    </packing>