about summary refs log tree commit diff
path: root/src/game/editor/ed_layer_tiles.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-21 00:13:55 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-21 00:13:55 +0000
commit65e074db916ac1cc9a40f0040b055643f9b9a2dc (patch)
tree858ed9757159a986497d3b73f5344e782318fb11 /src/game/editor/ed_layer_tiles.cpp
parentc984efd3a9be662b0bae687cb637558dfe1b50d7 (diff)
downloadzcatch-65e074db916ac1cc9a40f0040b055643f9b9a2dc.tar.gz
zcatch-65e074db916ac1cc9a40f0040b055643f9b9a2dc.zip
fixed some more editor stuff
Diffstat (limited to 'src/game/editor/ed_layer_tiles.cpp')
-rw-r--r--src/game/editor/ed_layer_tiles.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/game/editor/ed_layer_tiles.cpp b/src/game/editor/ed_layer_tiles.cpp
index 7b3b89a9..d24d67c4 100644
--- a/src/game/editor/ed_layer_tiles.cpp
+++ b/src/game/editor/ed_layer_tiles.cpp
@@ -92,7 +92,6 @@ void LAYER_TILES::brush_selecting(RECT rect)
 	snap(&rect);
 	gfx_quads_drawTL(rect.x, rect.y, rect.w, rect.h);
 	gfx_quads_end();
-	
 }
 
 int LAYER_TILES::brush_grab(LAYERGROUP *brush, RECT rect)
@@ -210,9 +209,9 @@ int LAYER_TILES::render_properties(RECT *toolbox)
 	
 	enum
 	{
-		PROP_IMAGE=0,
-		PROP_WIDTH,
+		PROP_WIDTH=0,
 		PROP_HEIGHT,
+		PROP_IMAGE,
 		NUM_PROPS,
 	};
 	
@@ -223,19 +222,19 @@ int LAYER_TILES::render_properties(RECT *toolbox)
 		{0},
 	};
 	
-	if(editor.map.game_layer == this)
+	if(editor.map.game_layer == this) // remove the image from the selection if this is the game layer
 		props[2].name = 0;
 	
 	static int ids[NUM_PROPS] = {0};
 	int new_val = 0;
 	int prop = editor.do_properties(toolbox, props, ids, &new_val);		
 	
-	if(prop == PROP_IMAGE)
-		image = new_val%editor.map.images.len();
-	else if(prop == PROP_WIDTH && new_val > 1)
+	if(prop == PROP_WIDTH && new_val > 1)
 		resize(new_val, height);
 	else if(prop == PROP_HEIGHT && new_val > 1)
 		resize(width, new_val);
+	else if(prop == PROP_IMAGE)
+		image = new_val%editor.map.images.len();
 	
 	return 0;
 }