function current_value=create_rider(res,hc2)
    a=uifigure("Position",[286,446,300,127]);
    dd=uidropdown(a,'FontSize',24,'Position',[70,120-50,150,50],...
        'ValueChangedFcn',{@change_func,hc2});
    dd.ItemsData= 1:size(res,1);
    dd.Items= arrayfun(@(x) string(num2str(x)), 1:size(res,1));
    uibutton(a,'Text','+','FontSize',26,'Position',[240,120-50,50,50],...
        'ButtonPushedFcn',{@plus_func,dd,hc2});
    uibutton(a,'Text','-','FontSize',26,'Position',[10,120-50,50,50],...
        'ButtonPushedFcn',{@minus_func,dd,hc2});
    current_value=dd.Value;
end

function minus_func(app,event,dd,hc2)
    if dd.Value==1 
        return
    end
    dd.Value=dd.Value-1;
    show_current_part(dd.Value,hc2)
end

function plus_func(app,event,dd,hc2)
    if dd.Value==dd.ItemsData(end) 
        return
    end
    dd.Value=dd.Value+1;
    show_current_part(dd.Value,hc2)
end

function change_func(app,event,hc2)
    show_current_part(app.Value,hc2)
end
