diff options
Diffstat (limited to 'src/ui/bitmap.cc')
-rw-r--r-- | src/ui/bitmap.cc | 11 |
1 files changed, 8 insertions, 3 deletions
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); } } |