diff engine/core/model/structures/layer.h @ 340:7e5717105212

* Added setId to Layer, Map, Object and Camera * Added setCellGrid to Layer * LayerTool now supports changing layer IDs and cellgrids on existing layers * LayerTool can now create layers with hexagonal tilegrids
author cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 24 Aug 2009 23:08:53 +0000
parents 51cc05d862f2
children ab41334e8a57
line wrap: on
line diff
--- a/engine/core/model/structures/layer.h	Mon Aug 24 18:52:49 2009 +0000
+++ b/engine/core/model/structures/layer.h	Mon Aug 24 23:08:53 2009 +0000
@@ -103,17 +103,25 @@
 
 			/** Get the id of this layer.
 			 */
-			const std::string& getId() { return m_id; }
+			const std::string& getId() const { return m_id; }
+
+			/** Sets the identifier for this layer.
+			 */
+			void setId(const std::string& id) { m_id = id; }
 
 			/** Get the map this layer is contained in
 			 */
 			Map* getMap() const { return m_map; }
 
-			/** Get the Cellgrid as set in the constructor
+			/** Get the Cellgrid
 			 * @return a valid cellgrid
 			 */
 			CellGrid* getCellGrid() const { return m_grid; }
 
+			/** Set the Cellgrid
+			 */
+			void setCellGrid(CellGrid* grid) { m_grid = grid; }
+
 			/** Get the instance tree. 
 			 * @return this layers instance tree.
 			 */