lm2576 power supply
Yes, that is exactly what I meant.
But I forgot to mention something else: the second opamp should work as a comparator, to the bottom of R6 should be connected to an adjustable voltage, which will allow you to vary the current limit. Also, you may need to play with the value of R7.
But now I think you understand how the circuit will operate: as long as the current is low enough, the output of IC2A will be lower than the "current reference" (the adjustable voltage at the bottom of R6). So the output of IC2B should be low and the regulator keeps the voltage constant.
When the current increases such that the output of IC2A is equal to the current setpoint, IC2B will drive its output high and thus will feed a voltage into the FB pin, causing the regulator to decrease its output voltage, thus reducing the load current. This effectively limits the output current.
It is not easy to make the output go down to zero.