+ {
+ unsigned finger = axis/2;
+ int x, y;
+ get_touch(finger, x, y);
+ touch_motion(x, y, finger);
+
+ if(touch_focus)
+ return true;
+ }
+
+ return false;
+}
+
+void Root::get_pointer(int &x, int &y)
+{
+ x = (mouse->get_axis_value(0)*0.5+0.5)*geom.w;
+ y = (mouse->get_axis_value(1)*0.5+0.5)*geom.h;
+}
+
+void Root::get_touch(unsigned finger, int &x, int &y)
+{
+ x = (touchscreen->get_axis_value(finger*2)*0.5+0.5)*geom.w;
+ y = (touchscreen->get_axis_value(finger*2+1)*0.5+0.5)*geom.h;
+}
+
+void Root::update_camera()
+{
+ camera.set_position(GL::Vector3(geom.w/2.0f, geom.h/2.0f, geom.h/2.0f));
+ camera.set_depth_clip(geom.h*0.1f, geom.h*0.9f);
+ camera.set_orthographic(geom.w, geom.h);
+}
+
+void Root::on_size_change()
+{
+ Panel::on_size_change();
+ update_camera();