|
|
@@ -108,6 +108,11 @@ Vector2f DecoratorTiled::Tile::GetDimensions(Element* element)
|
|
|
void DecoratorTiled::Tile::GenerateGeometry(std::vector< Vertex >& vertices, std::vector< int >& indices, Element* element, const Vector2f& surface_origin, const Vector2f& surface_dimensions, const Vector2f& tile_dimensions) const
|
|
|
{
|
|
|
RenderInterface* render_interface = element->GetRenderInterface();
|
|
|
+ const Property* element_colour = element->GetProperty(COLOR);
|
|
|
+ Colourb quad_colour = Colourb(255, 255, 255);
|
|
|
+ if (element_colour)
|
|
|
+ quad_colour = element_colour->Get<Colourb>();
|
|
|
+
|
|
|
TileDataMap::iterator data_iterator = data.find(render_interface);
|
|
|
if (data_iterator == data.end())
|
|
|
return;
|
|
|
@@ -244,7 +249,7 @@ void DecoratorTiled::Tile::GenerateGeometry(std::vector< Vertex >& vertices, std
|
|
|
tile_position.x = surface_origin.x + (float) tile_dimensions.x * x;
|
|
|
tile_size.x = (float) (x < num_tiles[0] - 1 ? tile_dimensions.x : final_tile_dimensions.x);
|
|
|
|
|
|
- GeometryUtilities::GenerateQuad(new_vertices, new_indices, tile_position, tile_size, Colourb(255, 255, 255), tile_texcoords[0], tile_texcoords[1], index_offset);
|
|
|
+ GeometryUtilities::GenerateQuad(new_vertices, new_indices, tile_position, tile_size, quad_colour, tile_texcoords[0], tile_texcoords[1], index_offset);
|
|
|
new_vertices += 4;
|
|
|
new_indices += 6;
|
|
|
index_offset += 4;
|