istereo2

changeset 34:33ba8618972c

added commented out (for now) resolution option in the ui
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 11 Oct 2015 07:56:27 +0300
parents 3784a2d4bed5
children 643f4ab609a4
files src/istereo.c src/ui.cc
diffstat 2 files changed, 27 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/src/istereo.c	Sat Oct 10 16:38:19 2015 +0300
     1.2 +++ b/src/istereo.c	Sun Oct 11 07:56:27 2015 +0300
     1.3 @@ -57,6 +57,7 @@
     1.4  int stereo = 0;
     1.5  int use_bump = 0;
     1.6  int show_opt = 1;
     1.7 +float draw_quality = 1.0f;
     1.8  
     1.9  /* construction parameters */
    1.10  int sides = 24;
     2.1 --- a/src/ui.cc	Sat Oct 10 16:38:19 2015 +0300
     2.2 +++ b/src/ui.cc	Sun Oct 11 07:56:27 2015 +0300
     2.3 @@ -19,12 +19,15 @@
     2.4  static void split_slider_handler(Widget *w, const Event &ev, void *cls);
     2.5  #ifdef IPHONE
     2.6  static void retina_cbox_handler(Widget *w, const Event &ev, void *cls);
     2.7 +#else
     2.8 +static void qual_slider_handler(Widget *w, const Event &ev, void *cls);
     2.9  #endif
    2.10  
    2.11  extern int stereo;
    2.12  extern int show_opt;
    2.13  extern int use_bump;
    2.14  extern float split;
    2.15 +extern float draw_quality;
    2.16  
    2.17  static Screen scr;
    2.18  static float aspect;
    2.19 @@ -57,6 +60,24 @@
    2.20  		cbox->set_callback(EV_CHANGE, retina_cbox_handler);
    2.21  		scr.add_widget(cbox);
    2.22  	}
    2.23 +#else
    2.24 +	/*
    2.25 +	label_split = new Label;
    2.26 +	label_split->set_position(100, ypos + vsep);
    2.27 +	label_split->set_size(20, vsz);
    2.28 +	label_split->set_text("Rendering quality");
    2.29 +	scr.add_widget(label_split);
    2.30 +
    2.31 +	Slider *slider = new Slider;
    2.32 +	slider->set_position(300, ypos + vsep);
    2.33 +	slider->set_size(300, vsz);
    2.34 +	slider->set_range(0.5, 1);
    2.35 +	slider->set_step(0.25);
    2.36 +	slider->set_value(1.0);
    2.37 +	slider->set_continuous_change(true);
    2.38 +	slider->set_callback(EV_CHANGE, qual_slider_handler);
    2.39 +	scr.add_widget(slider);
    2.40 +	*/
    2.41  #endif
    2.42  
    2.43  	cbox = new CheckBox;
    2.44 @@ -233,5 +254,10 @@
    2.45  {
    2.46  	use_retina_res(((CheckBox*)w)->is_checked() ? 1 : 0);
    2.47  }
    2.48 +#else
    2.49 +static void qual_slider_handler(Widget *w, const Event &ev, void *cls)
    2.50 +{
    2.51 +	draw_quality = ((Slider*)w)->get_value();
    2.52 +}
    2.53  #endif
    2.54