DProgressBar - Why was it downgraded?

I’ve seen this code from an old 2012 thread, and all the ones who reply act like SetMin/SetMax is actually normal for DProgress… wat?
[lua]local myProgressBar = vgui.Create( “DProgressBar” , DermaPanel)
myProgressBar:SetSize( 150, 40 )
myProgressBar:SetPos( 25, 25 )
myProgressBar:SetMin( 0 )
myProgressBar:SetValue(bum) – this is the “propamount” being displayed.[/lua]

Why cant I set the min/max for stuff and set the value? It is horribly inconvenient for it to have to be on a scale of 0 to 1 and it is incompatible with most variables.

i would guess it could be something to do with a progress bar being a human readable way of saying “is this thing loaded” (sort of) and when it’s 100% it’s basically saying yes it’s true that this is loaded thus the 1, though that’s somewhat irrelevant when you can set you’re own min/max so idk

it makes sense in my head anyway

(value-min) / (max-min)


What is that supposed to mean?

to normalize your value, which yeah, wasn’t your point. but we can’t change the way it works now.

It’s called like grade 7 math.
Ever converted a number to percentage?
let’s say you have 50 out of 60, and want it between 0 and 1
just do 50/60!
= 0.83333333333333333333333333333333
set that as the value!


My bad, I forgot that you can modify values in function.