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__, addon, control, addon ? addon->ID().c_str() : "unknown"); return; } control->SetType(SLIDER_CONTROL_TYPE_PERCENTAGE); control->SetPercentage(percent); }
void Interface_GUIControlSettingsSlider::SetPercentage(void* kodiBase, void* handle, float percent) { 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_PERCENTAGE); pControl->SetPercentage(percent); }