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.h | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'src/ui/bitmap.h') diff --git a/src/ui/bitmap.h b/src/ui/bitmap.h index 1f60ef9..9bc1776 100644 --- a/src/ui/bitmap.h +++ b/src/ui/bitmap.h @@ -9,25 +9,38 @@ #include "ui/widget.h" -namespace ui { +namespace ui +{ -class Bitmap : public Widget { +class Bitmap : public Widget +{ public: - Bitmap (Widget *parent, const char *texture=0); + Bitmap(Widget *parent, const char *texture=0); ~Bitmap(); - - inline std::string const &texture() const { return bitmap_texture; } - void set_texture(std::string const & texture); + + inline std::string const &texture() const { + return bitmap_texture; + } + + inline math::Color const &color() const { + return bitmap_color; + } + + void set_texture(const std::string & texture); void set_texture(const char *texture); - + + void set_color(const math::Color &color); + /// print bitmap description - virtual void print(size_t indent); - + virtual void print(const size_t indent) const; + protected: + /// draw the bitmap as background virtual void draw_background(); - + private: std::string bitmap_texture; + math::Color bitmap_color; }; } -- cgit v1.2.3