[Plib-devel] puSlider
Brought to you by:
sjbaker
From: Blake F. <umf...@cc...> - 2000-08-14 23:22:51
|
I would like to be able to use a puSlider that I can set the width (for horizontal slider) or the height (for a vertical slider.) Right now, the slider height is set according to the height/width of the current font. Here is a patch to pu.h that adds an alternate constructor that allows this: 799a800,820 > > > /* start added by Blake Friesen */ > puSlider ( int minx, int miny, int sz, int width, int vertical = FALSE ) : > puObject ( minx, miny, vertical ? > ( minx + width ) : > ( minx + sz ), > vertical ? > ( miny + sz ) : > ( miny + width ) > ) > { > type |= PUCLASS_SLIDER ; > slider_fraction = 0.1f ; > getValue ( & last_cb_value ) ; > vert = vertical ; > cb_delta = 0.1f ; > cb_mode = PUSLIDER_ALWAYS ; > } > /* end added by Blake Friesen */ > |