File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1734,16 +1734,19 @@ void WindowSettings::UpdatePageMainCatInput()
17341734 {
17351735 ImGui::Indent ();
17361736
1737- bool & hmd_pointer = ConfigManager::GetRef (configid_bool_input_laser_pointer_hmd_device);
1738- if (ImGui::Checkbox (TranslationManager::GetString (tstr_SettingsLaserPointerHMDPointer), &hmd_pointer ))
1737+ bool & hmd_pointer_enabled = ConfigManager::GetRef (configid_bool_input_laser_pointer_hmd_device);
1738+ if (ImGui::Checkbox (TranslationManager::GetString (tstr_SettingsLaserPointerHMDPointer), &hmd_pointer_enabled ))
17391739 {
1740- IPCManager::Get ().PostConfigMessageToDashboardApp (configid_bool_input_laser_pointer_hmd_device, hmd_pointer );
1740+ IPCManager::Get ().PostConfigMessageToDashboardApp (configid_bool_input_laser_pointer_hmd_device, hmd_pointer_enabled );
17411741 }
17421742
1743- ImGui::PushID (" HMDPointer" );
1744-
17451743 ImGui::Indent (ImGui::GetFrameHeightWithSpacing ());
17461744
1745+ if (!hmd_pointer_enabled)
1746+ ImGui::PushItemDisabled ();
1747+
1748+ ImGui::PushID (" HMDPointer" );
1749+
17471750 const ImVec2 table_size (-style.IndentSpacing - 1 .0f , 0 .0f ); // Replicate padding from columns
17481751 const float table_column_width = m_Column0Width - style.IndentSpacing - ImGui::GetFrameHeightWithSpacing (); // Align with width of other columns
17491752
@@ -1790,6 +1793,9 @@ void WindowSettings::UpdatePageMainCatInput()
17901793
17911794 ImGui::PopID ();
17921795
1796+ if (!hmd_pointer_enabled)
1797+ ImGui::PopItemDisabled ();
1798+
17931799 ImGui::Unindent (ImGui::GetFrameHeightWithSpacing ());
17941800 ImGui::Unindent ();
17951801 }
You can’t perform that action at this time.
0 commit comments