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>2010-09-18 18:50:55 +0000
committerStijn Buys <ingar@osirion.org>2010-09-18 18:50:55 +0000
commit9c91a9767b570fdc3c3e19e1f452f9a8257f9999 (patch)
tree9ac10114a3378134ea19dac3d7f7639532c3bf5a /src/ui/listitem.cc
parentfc4809e41bc5694231046eb2fd4c324c4daba13f (diff)
trade updates
Diffstat (limited to 'src/ui/listitem.cc')
-rw-r--r--src/ui/listitem.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/ui/listitem.cc b/src/ui/listitem.cc
index 3ff108f..dcd4e2a 100644
--- a/src/ui/listitem.cc
+++ b/src/ui/listitem.cc
@@ -22,8 +22,6 @@ ListItem::~ListItem() {
void ListItem::draw_border()
{
- // FIXME glow if selected, not on_mouseover
-
if (has_mouse_focus()) {
math::Color color(palette()->foreground());
float t = core::application()->time();
@@ -33,7 +31,23 @@ void ListItem::draw_border()
color.a = 0.5f + t;
paint::color(color);
paint::border(global_location(), size());
+ } else if ((static_cast<ListView *>(parent()))->selected() == this) {
+ paint::color(palette()->border());
+ paint::border(global_location(), size());
+ }
+}
+
+void ListItem::draw()
+{
+ if (!text().size())
+ return;
+
+ if ( has_mouse_focus() || ((static_cast<ListView *>(parent()))->selected() == this)) {
+ paint::color(palette()->highlight());
+ } else {
+ paint::color(palette()->foreground());
}
+ paint::label(global_location(), size(), font(), text(), alignment());
}
bool ListItem::on_keypress(const int key, const unsigned int modifier)