Skip to content

Commit

Permalink
Add option to turn off mouse emulation
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 31, 2023
1 parent 3d2747b commit e0f884d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/mods/vr/OverlayComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,11 @@ void OverlayComponent::on_draw_ui() {
m_framework_distance->draw("Framework Distance");
m_framework_size->draw("Framework Size");
m_framework_ui_follows_view->draw("Framework Follows View");
ImGui::SameLine();
m_framework_wrist_ui->draw("Framework Wrist UI");
if (VR::get()->get_runtime()->is_openvr()) {
ImGui::SameLine();
m_framework_wrist_ui->draw("Framework Wrist UI");
}
m_framework_mouse_emulation->draw("Framework Mouse Emulation");
ImGui::TreePop();
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/mods/vr/OverlayComponent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class OverlayComponent : public ModComponent {
const ModSlider::Ptr m_framework_size{ ModSlider::create("UI_Framework_Size", 0.5f, 10.0f, 2.0f) };
const ModToggle::Ptr m_framework_ui_follows_view{ ModToggle::create("UI_Framework_FollowView", false) };
const ModToggle::Ptr m_framework_wrist_ui{ ModToggle::create("UI_Framework_WristUI", false) };
const ModToggle::Ptr m_framework_mouse_emulation{ ModToggle::create("UI_Framework_MouseEmulation", true) };

Mod::ValueList m_options{
*m_slate_overlay_type,
Expand All @@ -121,7 +122,8 @@ class OverlayComponent : public ModComponent {
*m_framework_distance,
*m_framework_size,
*m_framework_ui_follows_view,
*m_framework_wrist_ui
*m_framework_wrist_ui,
*m_framework_mouse_emulation
};

// OpenXR
Expand Down

0 comments on commit e0f884d

Please sign in to comment.