void Interface_GUIControlSettingsSlider::set_float_value(void* kodiBase, void* handle, float value) { CAddonDll* addon = static_cast<CAddonDll*>(kodiBase); CGUISettingsSliderControl* control = static_cast<CGUISettingsSliderControl*>(handle); if (!addon || !control) { CLog::Log(LOGERROR, "Interface_GUIControlSettingsSlider::%s - invalid handler data (kodiBase='%p', handle='%p') on addon '%s'", __FUNCTION__, addon, control, addon ? addon->ID().c_str() : "unknown"); return; } control->SetType(SLIDER_CONTROL_TYPE_FLOAT); control->SetFloatValue(value); }
void Interface_GUIControlSettingsSlider::set_percentage(void* kodiBase, void* handle, float percent) { CAddonDll* addon = static_cast<CAddonDll*>(kodiBase); CGUISettingsSliderControl* control = static_cast<CGUISettingsSliderControl*>(handle); if (!addon || !control) { CLog::Log(LOGERROR, "Interface_GUIControlSettingsSlider::%s - invalid handler data (kodiBase='%p', handle='%p') on addon '%s'", __FUNCTION__, kodiBase, handle, addon ? addon->ID().c_str() : "unknown"); return; } control->SetType(SLIDER_CONTROL_TYPE_PERCENTAGE); control->SetPercentage(percent); }
void Interface_GUIControlSettingsSlider::set_int_range(void* kodiBase, void* handle, int start, int end) { CAddonDll* addon = static_cast<CAddonDll*>(kodiBase); CGUISettingsSliderControl* control = static_cast<CGUISettingsSliderControl*>(handle); if (!addon || !control) { CLog::Log(LOGERROR, "Interface_GUIControlSettingsSlider::%s - invalid handler data (kodiBase='%p', handle='%p') on addon '%s'", __FUNCTION__, kodiBase, handle, addon ? addon->ID().c_str() : "unknown"); return; } control->SetType(SLIDER_CONTROL_TYPE_INT); control->SetRange(start, end); }
void Interface_GUIControlSettingsSlider::SetFloatValue(void* kodiBase, void* handle, float value) { CAddonDll* addon = static_cast<CAddonDll*>(kodiBase); if (!addon) { CLog::Log(LOGERROR, "ADDON::Interface_GUIControlSettingsSlider::%s - invalid data", __FUNCTION__); return; } if (!handle) { CLog::Log(LOGERROR, "ADDON::Interface_GUIControlSettingsSlider::%s - invalid handler data on addon '%s'", __FUNCTION__, addon->ID().c_str()); return; } CGUISettingsSliderControl* pControl = static_cast<CGUISettingsSliderControl*>(handle); pControl->SetType(SLIDER_CONTROL_TYPE_FLOAT); pControl->SetFloatValue(value); }