// Instances a box decorator. Decorator* DecoratorTiledBoxInstancer::InstanceDecorator(const String& ROCKET_UNUSED(name), const PropertyDictionary& properties) { DecoratorTiled::Tile tiles[9]; String texture_names[9]; String rcss_paths[9]; GetTileProperties(tiles[0], texture_names[0], rcss_paths[0], properties, "top-left-image"); GetTileProperties(tiles[1], texture_names[1], rcss_paths[1], properties, "top-right-image"); GetTileProperties(tiles[2], texture_names[2], rcss_paths[2], properties, "bottom-left-image"); GetTileProperties(tiles[3], texture_names[3], rcss_paths[3], properties, "bottom-right-image"); GetTileProperties(tiles[4], texture_names[4], rcss_paths[4], properties, "left-image"); GetTileProperties(tiles[5], texture_names[5], rcss_paths[5], properties, "right-image"); GetTileProperties(tiles[6], texture_names[6], rcss_paths[6], properties, "top-image"); GetTileProperties(tiles[7], texture_names[7], rcss_paths[7], properties, "bottom-image"); GetTileProperties(tiles[8], texture_names[8], rcss_paths[8], properties, "center-image"); DecoratorTiledBox* decorator = new DecoratorTiledBox(); decorator->GetColorMultiplier() = properties.GetProperty("color-multiplier")->value.Get< Colourb >(); if (decorator->Initialise(tiles, texture_names, rcss_paths)) return decorator; decorator->RemoveReference(); ReleaseDecorator(decorator); return NULL; }
// Instances a box decorator. Decorator* DecoratorTiledVerticalInstancer::InstanceDecorator(const String& ROCKET_UNUSED(name), const PropertyDictionary& properties) { DecoratorTiled::Tile tiles[3]; String texture_names[3]; String rcss_paths[3]; GetTileProperties(tiles[0], texture_names[0], rcss_paths[0], properties, "top-image"); GetTileProperties(tiles[1], texture_names[1], rcss_paths[1], properties, "bottom-image"); GetTileProperties(tiles[2], texture_names[2], rcss_paths[2], properties, "center-image"); DecoratorTiledVertical* decorator = new DecoratorTiledVertical(); if (decorator->Initialise(tiles, texture_names, rcss_paths)) return decorator; decorator->RemoveReference(); ReleaseDecorator(decorator); return NULL; }
// Instances a box decorator. Decorator* DecoratorTiledImageInstancer::InstanceDecorator(const String& ROCKET_UNUSED(name), const PropertyDictionary& properties) { DecoratorTiled::Tile tile; String texture_name; String rcss_path; GetTileProperties(tile, texture_name, rcss_path, properties, "image"); DecoratorTiledImage* decorator = new DecoratorTiledImage(); if (decorator->Initialise(tile, texture_name, rcss_path)) return decorator; decorator->RemoveReference(); ReleaseDecorator(decorator); return NULL; }