RE: [Plib-devel] puSlider
Brought to you by:
sjbaker
From: Dave M. <Dav...@dy...> - 2000-08-15 22:10:19
|
Steve wrote: > Personally, I wouldn't have overloaded the constructor at all. > > I'd probably have done this: > > puSlider ( int minx, int miny, int sz, > int vertical = FALSE, int width = -1 ) > > ...and then had this constructor simply treat width==-1 > to mean "whatever height fits the text"...or whatever > it means now. > i agree that the 4th argument should always be 'vertical' but with only one constructor, you need two nested conditional expressions to pass the right values to puObject. i changed puSlider ( int minx, int miny, int sz, int vertical = FALSE ) puSlider ( int minx, int miny, int sz, int width, int vertical ) into puSlider ( int minx, int miny, int sz, int vertical = FALSE ) puSlider ( int minx, int miny, int sz, int vertical, int width ) and commited that. it's effectively the same as what you suggested Steve. --Dave |