Read the disabled-reason string off an internal entry. Empty means the entry accepts input. Groups are never disabled.
| 60 | // Read the disabled-reason string off an internal entry. Empty means the entry accepts input. |
| 61 | // Groups are never disabled. |
| 62 | static std::string_view entryDisabledReason( const TestEngine::Entry& entry ) |
| 63 | { |
| 64 | return std::visit( MR::overloaded{ |
| 65 | []( const TestEngine::ButtonEntry& e ) -> std::string_view { return e.disabledReason; }, |
| 66 | []( const TestEngine::ValueEntry& e ) -> std::string_view { return e.disabledReason; }, |
| 67 | []( const TestEngine::GroupEntry& ) -> std::string_view { return {}; }, |
| 68 | }, entry.value ); |
| 69 | } |
| 70 | |
| 71 | // Compose the single user-facing status string from the entry's `disabledReason`. |
| 72 | // The reason covers every disable source — caller-supplied requirements, ImGui::BeginDisabled |
no outgoing calls
no test coverage detected