Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-12 14:55:10 +0000
committerStijn Buys <ingar@osirion.org>2008-10-12 14:55:10 +0000
commitb417df720584c101f3799874a0c836a543a8d0a8 (patch)
treefb7105ed662f13753a6ab8d3efb047bad04f2316 /src/ui/bitmap.cc
parent18383a5fc596bf9546f14d7393ee66c57720b116 (diff)
user interface updates, work-in-progress
Diffstat (limited to 'src/ui/bitmap.cc')
-rw-r--r--src/ui/bitmap.cc11
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);
}
}