ControllerInterface: Add IsHidden function to Control interface.

This commit is contained in:
Jordan Woyak
2024-03-14 22:09:41 -05:00
parent 0538366326
commit ee43c9508c
3 changed files with 32 additions and 20 deletions

View File

@ -125,6 +125,11 @@ bool Device::Control::IsMatchingName(std::string_view name) const
return GetName() == name;
}
bool Device::Control::IsHidden() const
{
return false;
}
ControlState Device::FullAnalogSurface::GetState() const
{
return (1 + std::max(0.0, m_high.GetState()) - std::max(0.0, m_low.GetState())) / 2;
@ -141,6 +146,11 @@ bool Device::FullAnalogSurface::IsDetectable() const
return m_low.IsDetectable() && m_high.IsDetectable();
}
bool Device::FullAnalogSurface::IsHidden() const
{
return m_low.IsHidden() && m_high.IsHidden();
}
bool Device::FullAnalogSurface::IsMatchingName(std::string_view name) const
{
if (Control::IsMatchingName(name))