diff --git a/bindings/action_manifest.json b/bindings/action_manifest.json index e9f2b6d..0c9128e 100644 --- a/bindings/action_manifest.json +++ b/bindings/action_manifest.json @@ -56,11 +56,6 @@ "requirement": "suggested", "type": "vector2" }, - { - "name": "/actions/cursor/in/toggle_transparent", - "requirement": "suggested", - "type": "boolean" - }, { "name": "/actions/cursor/out/scroll_haptic", "requirement": "suggested", @@ -94,7 +89,6 @@ "/actions/cursor/in/mouse_right": "right mouse button", "/actions/cursor/in/mouse_middle": "middle mouse button", "/actions/cursor/in/scroll": "scroll", - "/actions/cursor/in/toggle_transparent": "toggle transparency", "/actions/cursor/out/scroll_haptic": "scrolling haptic feedback" } ] diff --git a/src/app.cpp b/src/app.cpp index 7bbc85d..72ff00a 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -10,7 +10,6 @@ const VRMat root_start_pose = {{{1, 0, 0, 0}, {0, 1, 0, 0.8f}, {0, 0, 1, 0}}}; // 0.8m above origin const int FRAME_INTERVAL = 4; // number of update loops until the frame buffer is updated -const float TRANSPARENCY = 0.6f; App::App() { @@ -76,8 +75,6 @@ App::App() assert(action_err == 0); action_err = vr_input->GetActionHandle("/actions/cursor/in/scroll", &_input_handles.cursor.scroll); assert(action_err == 0); - action_err = vr_input->GetActionHandle("/actions/cursor/in/toggle_transparent", &_input_handles.cursor.toggle_transparent); - assert(action_err == 0); action_err = vr_input->GetActionHandle("/actions/cursor/out/scroll_haptic", &_input_handles.cursor.scroll_haptic); assert(action_err == 0); action_err = vr_input->GetActionSetHandle("/actions/main", &_input_handles.main_set); @@ -196,20 +193,6 @@ void App::UpdateInput(float dtime) } UpdateUIVisibility(); } - if (IsInputJustPressed(_input_handles.cursor.toggle_transparent)) - { - _transparent = !_transparent; - if (_transparent) - { - for (auto &panel : _panels) - panel.GetOverlay()->SetAlpha(TRANSPARENCY); - } - else - { - for (auto &panel : _panels) - panel.GetOverlay()->SetAlpha(1); - } - } if (!_hidden) { if (IsInputJustPressed(_input_handles.main.reset)) diff --git a/src/app.h b/src/app.h index ecbbd79..fa721ce 100644 --- a/src/app.h +++ b/src/app.h @@ -33,7 +33,6 @@ struct InputHandles vr::VRActionHandle_t mouse_middle; vr::VRActionHandle_t scroll; vr::VRActionHandle_t scroll_haptic; - vr::VRActionHandle_t toggle_transparent; } cursor; vr::VRActionSetHandle_t cursor_set; struct @@ -88,7 +87,6 @@ class App Overlay _root_overlay; std::vector _panels; bool _hidden = false; - bool _transparent = false; bool _edit_mode = false; std::optional _active_cursor;