mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 23:52:22 +00:00
don't wrap around the ends of slider bars
This commit is contained in:
parent
ba902690ee
commit
718c64bc2c
1 changed files with 3 additions and 2 deletions
|
@ -41,6 +41,7 @@ void (integer x, integer y, integer spacing, string spacechar, string label, str
|
||||||
}
|
}
|
||||||
Draw_String (x + spacing, y, valstr);
|
Draw_String (x + spacing, y, valstr);
|
||||||
};
|
};
|
||||||
|
|
||||||
void (integer x, integer y, integer spacing, string label, string valstr) draw_val_item =
|
void (integer x, integer y, integer spacing, string label, string valstr) draw_val_item =
|
||||||
{
|
{
|
||||||
draw_item (x, y, spacing, ".", label, ":" + valstr);
|
draw_item (x, y, spacing, ".", label, ":" + valstr);
|
||||||
|
@ -72,9 +73,9 @@ float (float min, float max, float step, float val, integer cntflag) min_max_cnt
|
||||||
}
|
}
|
||||||
|
|
||||||
if(val > max) {
|
if(val > max) {
|
||||||
val = min;
|
|
||||||
} else if(val < min) {
|
|
||||||
val = max;
|
val = max;
|
||||||
|
} else if(val < min) {
|
||||||
|
val = min;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue