Skip to content

Commit

Permalink
Don't dim the calibration button if it's already disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
KimihikoAkayasaki committed Oct 1, 2022
1 parent 4da70e9 commit d4d89e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Amethyst/TrackingDevices.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,11 @@ namespace TrackingDevices

// Dim the calibration button if can't calibrate right now
k2app::shared::general::calibrationButton.get()->Opacity(
(!k2app::K2Settings.overrideDeviceGUIDsMap.empty() // Don't dim if we have overrides
|| base_status_ok) ? 1.0 : 0.5); // Dim at 0.5 on base-device-only errors
(!k2app::shared::general::calibrationButton.get()->IsEnabled() // Don't dim if disabled
|| !k2app::K2Settings.overrideDeviceGUIDsMap.empty() // Don't dim if we have overrides
|| base_status_ok)
? 1.0 // We're fine if any of the upper conditions is met
: 0.5); // Dim at 0.5 on base-device-only errors
}

// Check with this one, should be the same for all anyway
Expand Down

0 comments on commit d4d89e8

Please sign in to comment.