Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui.cc')
-rw-r--r--src/ui/ui.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/ui.cc b/src/ui/ui.cc
index 0877519..700099e 100644
--- a/src/ui/ui.cc
+++ b/src/ui/ui.cc
@@ -266,7 +266,7 @@ void UI::frame()
Widget *f = 0;
if (!mouse_buttonleft_pressed) {
- f = find_mouse_focus(mouse_cursor);
+ f = find_widget_in_location(mouse_cursor);
} else {
f = find_visible_child(ui_mouse_focus);
}
@@ -306,7 +306,7 @@ bool UI::input_mouse_button(const bool pressed, unsigned int button)
}
// set mouse focus
- Widget *f = find_mouse_focus(mouse_cursor);
+ Widget *f = find_widget_in_location(mouse_cursor);
if (f)
{
f->event_mouse(mouse_cursor);
@@ -326,7 +326,7 @@ bool UI::input_mouse_wheel(const math::Vector2f & direction)
bool handled = false;
// set mouse focus
- Widget *f = find_mouse_focus(mouse_cursor);
+ Widget *f = find_widget_in_location(mouse_cursor);
if (f)
{
f->event_mouse(mouse_cursor);
@@ -399,8 +399,8 @@ void UI::draw_pointer()
gl::push();
gl::translate(mouse_cursor.x(), mouse_cursor.y(), 0);
- float angle = core::application()->time() * 0.75f - floorf(core::application()->time() * 0.75f);
- angle *= 360.0f;
+ const float t = core::application()->time() * 0.75f;
+ const float angle = (t - floorf(t)) * 360.0f;
gl::rotate(angle, math::Vector3f(0, 0, 1.0f));
gl::translate(-mouse_cursor.x(), -mouse_cursor.y(), 0);
}