Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@telenet.be>2020-07-18 17:20:32 +0200
committerStijn Buys <ingar@telenet.be>2020-07-18 17:20:32 +0200
commit41ec4ed68571091f2e2500344a7aeb527a91dc92 (patch)
tree29584f1f2f949e73da749d2e2504799519a1c21a /src/ui/tooltip.cc
parentb19afea9427dde861c990236ab11e23edfeb267c (diff)
Added standard close button widget class, added tooltips where approriate.
Diffstat (limited to 'src/ui/tooltip.cc')
-rw-r--r--src/ui/tooltip.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ui/tooltip.cc b/src/ui/tooltip.cc
index 95f1ac8..b1e8c3c 100644
--- a/src/ui/tooltip.cc
+++ b/src/ui/tooltip.cc
@@ -6,6 +6,7 @@
#include "ui/tooltip.h"
#include "ui/ui.h"
+#include "ui/paint.h"
#include <cassert>
@@ -32,9 +33,15 @@ void Tooltip::resize()
set_location((parent()->width() - width()) * 0.5f, parent()->height());
}
+void Tooltip::draw_background()
+{
+ Paint::draw_material(global_location(), size(), "ui/window");
+}
+
void Tooltip::draw()
{
- if (tooltip_global != this) {
+ if (tooltip_global != this)
+ {
hide();
} else {
Label::draw();