From b417df720584c101f3799874a0c836a543a8d0a8 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 12 Oct 2008 14:55:10 +0000 Subject: user interface updates, work-in-progress --- src/ui/bitmap.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/ui/bitmap.cc') diff --git a/src/ui/bitmap.cc b/src/ui/bitmap.cc index c14ccff..fcf141c 100644 --- a/src/ui/bitmap.cc +++ b/src/ui/bitmap.cc @@ -24,13 +24,13 @@ Bitmap::Bitmap(Widget *parent, const char *texture) : Widget(parent) Bitmap::~Bitmap() {} -void Bitmap::print(size_t indent) +void Bitmap::print(const size_t indent) const { std::string marker(""); con_print << aux::pad_left(marker, indent*2) << label() << " \"" << texture() << "\"" << std::endl; } -void Bitmap::set_texture(std::string const & texture) +void Bitmap::set_texture(const std::string & texture) { bitmap_texture.assign(texture); } @@ -43,10 +43,15 @@ void Bitmap::set_texture(const char *texture) bitmap_texture.clear(); } +void Bitmap::set_color(const math::Color & color) +{ + bitmap_color.assign(color); +} + void Bitmap::draw_background() { if (bitmap_texture.size()) { - paint::color(1.0f, 1.0f, 1.0f, 1.0f); + paint::color(bitmap_color); paint::bitmap(global_location(), size(), bitmap_texture); } } -- cgit v1.2.3