objectsIndex.clear();
ImageUtils.queueImage(Freedomotic.RESOURCES_URL + environment.getBackgroundImage());
// create all drawingrooms
for (Zone r : environment.getZones()) {
if (r.isRoom()) {
DrawableRoom dr = new DrawableRoom(r);
drawingRooms.add(dr);
//GWT.log("index: "+((Integer)dr.getIndexColor()).toString());
objectsIndex.put(dr.getIndexColor(), dr);
// TODO: Take care of the objects not in room
for (EnvObject obj : r.getObjects()) {
GWT.log("object in a room " + obj.getName());
DrawableObject dobj = new DrawableObject(obj);
drawingObjects.add(dobj);