From 27ab3566118e77754fefb32a41ee06cf24a59dfe Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 5 Nov 2008 21:26:45 +0000 Subject: console scrollwheel, glowing ok button --- src/ui/button.cc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/ui/button.cc') diff --git a/src/ui/button.cc b/src/ui/button.cc index 856c165..989e9eb 100644 --- a/src/ui/button.cc +++ b/src/ui/button.cc @@ -4,12 +4,15 @@ the terms of the GNU General Public License version 2 */ +#include + #include "audio/audio.h" #include "auxiliary/functions.h" -#include "ui/paint.h" +#include "core/application.h" +#include "core/commandbuffer.h" #include "sys/sys.h" +#include "ui/paint.h" #include "ui/button.h" -#include "core/commandbuffer.h" namespace ui { @@ -46,9 +49,15 @@ void Button::set_command(const std::string &command) void Button::draw_border() { - if (has_mouse_focus()) - paint::color(palette()->foreground()); - else + if (has_mouse_focus()) { + math::Color color(palette()->foreground()); + float t = core::application()->time(); + t = t - floorf(t); + if (t > 0.5) + t = 1 - t; + color.a = 0.5f + t; + paint::color(color); + } else paint::color(palette()->border()); paint::border(global_location(), size()); -- cgit v1.2.3