From 9652995287be63ecc34de9bf2174b3f22435861d Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 31 Jul 2011 18:21:00 +0000 Subject: Expose global mouse pointer location, set default mouse pointer at the start of the main widget draw loop, hide cursor above console. --- src/ui/console.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ui/console.cc') diff --git a/src/ui/console.cc b/src/ui/console.cc index 5c15bc5..00aa09f 100644 --- a/src/ui/console.cc +++ b/src/ui/console.cc @@ -17,6 +17,7 @@ #include "render/gl.h" #include "ui/console.h" #include "ui/paint.h" +#include "ui/ui.h" namespace ui { @@ -210,6 +211,11 @@ void Console::draw() l[0] += width() - s.width() - 4; l[1] += height() - s.height() - 4; Paint::draw_text(l, font(), version); + + // disable mouse cursor + if (has_mouse_focus()) { + ui::root()->set_pointer(); + } } void Console::save_history() -- cgit v1.2.3