Add virtual keyboard, GUI to add a server manually
This commit is contained in:
@@ -794,21 +794,14 @@ void imgui_context::new_frame(XrTime display_time)
|
||||
if (auto position = new_states[new_focused_controller].pointer_position)
|
||||
{
|
||||
io.AddMousePosEvent(position->x, position->y);
|
||||
|
||||
if (focused_change || (last_trigger || last_touching) != (button_pressed || fingertip_touching))
|
||||
{
|
||||
io.AddMouseButtonEvent(0, button_pressed || fingertip_touching);
|
||||
}
|
||||
io.AddMouseButtonEvent(0, button_pressed || fingertip_touching);
|
||||
|
||||
if (glm::length(scroll) > 0.01f)
|
||||
io.AddMouseWheelEvent(scroll.x, scroll.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((last_trigger || last_touching) && !(button_pressed || fingertip_touching))
|
||||
{
|
||||
io.AddMouseButtonEvent(0, button_pressed || fingertip_touching);
|
||||
}
|
||||
io.AddMouseButtonEvent(0, button_pressed || fingertip_touching);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,11 @@ public:
|
||||
// Position of this viewport in the swapchain image
|
||||
glm::ivec2 vp_origin;
|
||||
glm::ivec2 vp_size;
|
||||
|
||||
ImVec2 vp_center() const
|
||||
{
|
||||
return ImVec2(vp_origin.x + int(vp_size.x / 2), vp_origin.y + int(vp_size.y / 2));
|
||||
}
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user