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>2011-07-30 13:36:45 +0000
committerStijn Buys <ingar@osirion.org>2011-07-30 13:36:45 +0000
commitb492615fb68e5c97fce87bcc946e92f115cfc3a2 (patch)
treeeb90e46894bd351332f64874babc5cef3959a2bd /src/ui/button.cc
parent3a28abfa64d02b8d530689c425f6ed476a14fe9c (diff)
Added support for tiled ui materials, changed default widget backgrounds to use ui materials.
Diffstat (limited to 'src/ui/button.cc')
-rw-r--r--src/ui/button.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/button.cc b/src/ui/button.cc
index 9e07c09..cba7732 100644
--- a/src/ui/button.cc
+++ b/src/ui/button.cc
@@ -22,6 +22,7 @@ Button::Button(Widget *parent, const char *text, const char *command) : Label(pa
set_label("button");
set_command(command);
set_alignment(AlignCenter);
+ set_background(true);
}
Button::~Button()
@@ -47,6 +48,11 @@ void Button::set_command(const std::string &command)
button_command.assign(command);
}
+void Button::draw_background()
+{
+ Paint::draw_material(global_location(), size(), "ui/button");
+}
+
void Button::draw_border()
{
if (disabled()) {