Ejemplo n.º 1
0
void Options::update_quaternion()
{
	quaternion = Quaternionf(rotation_x, rotation_y, rotation_z, order_YXZ);
	write_quaternion();
	update_all_slider_text();

}
Ejemplo n.º 2
0
Options::Options(CL_GUIManager &gui, CL_Rect gui_position) : CL_GUIComponent(&gui, CL_GUITopLevelDescription("Options", gui_position, false))
{
	// Note, when changing these, remember to change the popup menu defaults
	num_particles = 64;
	point_size = 64;

	int slider_xpos = 450;
	int slider_ypos = 100;
	int slider_gap = 24;
	slider_num_particles = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_num_particles->set_max(1000);
	slider_num_particles->set_position(num_particles);
	slider_num_particles->func_value_changed().set(this, &Options::slider_num_particles_changed);
	slider_ypos += 8;
	label_num_particles = create_slider_label(slider_num_particles);

	slider_point_size = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_point_size->set_max(256);
	slider_point_size->set_position(point_size);
	slider_point_size->func_value_changed().set(this, &Options::slider_point_size_changed);
	slider_ypos += 8;
	label_point_size = create_slider_label(slider_point_size);

	update_all_slider_text();

	func_render().set(this, &Options::on_render);
}
Ejemplo n.º 3
0
Options::Options(clan::Canvas &canvas) : clan::TextureWindow(canvas)
{
	// Note, when changing these, remember to change the popup menu defaults
	num_particles = 64;
	point_size = 64;

	int slider_xpos = 450;
	int slider_label_xpos = slider_xpos + 200;
	int slider_ypos = 100;
	int slider_gap = 24;
	slider_num_particles = create_slider(slider_xpos, slider_ypos);
	slider_num_particles->set_max_position(1000);
	slider_num_particles->set_position(num_particles);
	slider_num_particles->func_value_changed() = bind_member(this, &Options::slider_num_particles_changed);
	label_num_particles = create_slider_label(slider_label_xpos, slider_ypos);
	slider_ypos += slider_gap;

	slider_point_size = create_slider(slider_xpos, slider_ypos);
	slider_point_size->set_min_position(1);
	slider_point_size->set_max_position(256);
	slider_point_size->set_position(point_size);
	slider_point_size->func_value_changed() = bind_member(this, &Options::slider_point_size_changed);
	label_point_size = create_slider_label(slider_label_xpos, slider_ypos);
	slider_ypos += slider_gap;

	update_all_slider_text();

}
Ejemplo n.º 4
0
Options::Options(clan::GUIManager &gui, clan::Rect gui_position) : clan::GUIComponent(&gui, clan::GUITopLevelDescription("Options", gui_position, false))
{
	// Note, when changing these, remember to change the popup menu defaults
	compare_function = clan::compare_greater;
	stencil_pass = clan::stencil_keep;
	stencil_fail = clan::stencil_incr;

	num_balls = 9;
	is_moveballs_set = true;
	is_circle_set = true;
	compare_reference = 1;

	int slider_xpos = 400;
	int slider_ypos = 250;
	int slider_gap = 24;
	slider_numballs = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_numballs->set_max(9);
	slider_numballs->set_position(num_balls);
	slider_numballs->func_value_changed() = bind_member(this, &Options::slider_numballs_changed);
	slider_ypos += 8;
	label_numballs = create_slider_label(slider_numballs);

	slider_ypos += 8;
	slider_compare_reference = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_compare_reference->set_max(16);
	slider_compare_reference->set_position(compare_reference);
	slider_compare_reference->func_value_changed() = bind_member(this, &Options::slider_compare_reference_changed);
	slider_ypos += 8;
	label_compare_reference = create_slider_label(slider_compare_reference);

	int checkbox_xpos = slider_xpos;
	int checkbox_ypos = slider_ypos;
	int checkbox_gap = 24;
	checkbox_moveballs = create_checkbox(checkbox_xpos, checkbox_ypos, "Moving Balls", is_moveballs_set);
	checkbox_moveballs->func_state_changed() = bind_member(this, &Options::checkbox_moveballs_changed);
	checkbox_ypos += checkbox_gap + 8;
	checkbox_circle = create_checkbox(checkbox_xpos, checkbox_ypos, "Draw Stencil Circle (Without selected stencil options)", is_circle_set);
	checkbox_circle->func_state_changed() = bind_member(this, &Options::checkbox_circle_changed);
	checkbox_ypos += checkbox_gap + 8;

	make_compare_menu(combo_compare_menu);
	combo_comparefunc = create_compare_combo_box(600, 40, combo_compare_menu, 3);
	label_comparefunc = create_combobox_label(combo_comparefunc, "Compare Function");

	make_passfail_menu(combo_pass_menu);
	combo_pass = create_passfail_combo_box(600, 80, combo_pass_menu, 0);
	label_pass = create_combobox_label(combo_pass, "Pass Operation");

	make_passfail_menu(combo_fail_menu);
	combo_fail = create_passfail_combo_box(600, 120, combo_fail_menu, 3);
	label_fail = create_combobox_label(combo_fail, "Fail Operation");

	update_all_slider_text();

	func_render() = bind_member(this, &Options::on_render);
}
Ejemplo n.º 5
0
void Options::set_all_sliders()
{
	rotation_x_view->set_value(rotation_x.to_degrees(), 0, max_angle_value);
	rotation_y_view->set_value(rotation_y.to_degrees(), 0, max_angle_value);
	rotation_z_view->set_value(rotation_z.to_degrees(), 0, max_angle_value);

	target_x_view->set_value(target_x.to_degrees(), 0, max_angle_value);
	target_y_view->set_value(target_y.to_degrees(), 0, max_angle_value);
	target_z_view->set_value(target_z.to_degrees(), 0, max_angle_value);

	update_quaternion();

	update_all_slider_text();
}
Ejemplo n.º 6
0
void Options::set_all_sliders()
{
	set_value(slider_rotation_x, rotation_x.to_degrees(), 0, max_angle_value);
	set_value(slider_rotation_y, rotation_y.to_degrees(), 0, max_angle_value);
	set_value(slider_rotation_z, rotation_z.to_degrees(), 0, max_angle_value);

	set_value(slider_target_x, target_x.to_degrees(), 0, max_angle_value);
	set_value(slider_target_y, target_y.to_degrees(), 0, max_angle_value);
	set_value(slider_target_z, target_z.to_degrees(), 0, max_angle_value);

	update_quaternion();

	update_all_slider_text();
}
Ejemplo n.º 7
0
Options::Options(clan::Canvas &canvas) : clan::TextureWindow(canvas)
{
	// Note, when changing these, remember to change the popup menu defaults
	current_mapmode = clan::map_2d_upper_left;
	num_balls = 3;
	grid_angle = 0;
	is_moveballs_set = true;

	int slider_xpos = 450;
	int slider_label_xpos = slider_xpos + 200;
	int slider_ypos = 100;
	int slider_gap = 24;
	slider_numballs = create_slider(slider_xpos, slider_ypos);
	slider_numballs->set_max_position(9);
	slider_numballs->set_position(num_balls);
	slider_numballs->func_value_changed() = bind_member(this, &Options::slider_numballs_changed);
	label_numballs = create_slider_label(slider_label_xpos, slider_ypos);
	slider_ypos += slider_gap;

	slider_grid_angle = create_slider(slider_xpos, slider_ypos);
	slider_grid_angle->set_min_position(-45);
	slider_grid_angle->set_max_position(90);
	slider_grid_angle->set_position(grid_angle);
	slider_grid_angle->func_value_changed() = bind_member(this, &Options::slider_grid_angle_changed);
	label_grid_angle = create_slider_label(slider_label_xpos, slider_ypos);
	slider_ypos += slider_gap;

	int checkbox_xpos = slider_xpos;
	int checkbox_ypos = slider_ypos;
	int checkbox_gap = 24;
	checkbox_moveballs = create_checkbox(checkbox_xpos, checkbox_ypos, "Moving Balls", is_moveballs_set);
	checkbox_moveballs->func_state_changed() = bind_member(this, &Options::checkbox_moveballs_changed);

	listbox_mapmode = Theme::create_listbox();
	listbox_mapmode->style()->set("position: absolute; left:%1px; top:%2px; width:%3px; height:auto;", checkbox_xpos, 10, 180);

	listbox_mapmode->set_items<std::string>( { "2d Upper Left", "2d Lower Left", "User Projection" }, Theme::create_listbox_label);

	listbox_mapmode->func_selection_changed() = bind_member(this, &Options::on_mapmode_selected);
	listbox_mapmode->set_selected_item(0);
	add_subview(listbox_mapmode);

	label_mapmode = Theme::create_label(true);
	add_subview(label_mapmode);
	label_mapmode->style()->set("position: absolute; left:%1px; top:%2px", slider_label_xpos, 10);
	label_mapmode->set_text("Map Mode");

	update_all_slider_text();
}
Ejemplo n.º 8
0
void Options::set_all_sliders()
{
	set_value(slider_specular_red, get_selected_specular().r, max_color_value);
	set_value(slider_specular_green, get_selected_specular().g, max_color_value);
	set_value(slider_specular_blue, get_selected_specular().b, max_color_value);
	set_value(slider_diffuse_red, get_selected_diffuse().r, max_color_value);
	set_value(slider_diffuse_green, get_selected_diffuse().g, max_color_value);
	set_value(slider_diffuse_blue, get_selected_diffuse().b, max_color_value);

	set_value(slider_exponent, spot_light_exponent, max_exponent_value);
	set_value(slider_cutoff, spot_light_cutoff, max_angle_value);
	set_value(slider_light_xpos, spot_light_position.x, max_position_value);
	set_value(slider_light_ypos, spot_light_position.y, max_position_value);
	set_value(slider_light_zpos, spot_light_position.z, max_position_value);

	if (selected_light == light_distant)
	{
		set_value(slider_direction_heading, distant_direction_heading.to_degrees(), max_angle_value);
		set_value(slider_direction_pitch, distant_direction_pitch.to_degrees(), max_angle_value);
		set_value(slider_direction_bank, distant_direction_bank.to_degrees(), max_angle_value);

		slider_exponent->set_enabled(false);
		slider_light_xpos->set_enabled(false);
		slider_light_ypos->set_enabled(false);
		slider_light_zpos->set_enabled(false);
		slider_cutoff->set_enabled(false);

	}
	else
	{
		set_value(slider_direction_heading, spot_direction_heading.to_degrees(), max_angle_value);
		set_value(slider_direction_pitch, spot_direction_pitch.to_degrees(), max_angle_value);
		set_value(slider_direction_bank, spot_direction_bank.to_degrees(), max_angle_value);

		slider_exponent->set_enabled(true);
		slider_light_xpos->set_enabled(true);
		slider_light_ypos->set_enabled(true);
		slider_light_zpos->set_enabled(true);
		slider_cutoff->set_enabled(true);
	}

	update_all_slider_text();

}
Ejemplo n.º 9
0
Options::Options(clan::GUIManager &gui, clan::Rect gui_position) : clan::GUIComponent(&gui, clan::GUITopLevelDescription("Options", gui_position, false))
{
	// Note, when changing these, remember to change the popup menu defaults
	current_mapmode = clan::map_2d_upper_left;
	num_balls = 3;
	grid_angle = 0;
	is_moveballs_set = true;

	int slider_xpos = 450;
	int slider_ypos = 100;
	int slider_gap = 24;
	slider_numballs = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_numballs->set_max(9);
	slider_numballs->set_position(num_balls);
	slider_numballs->func_value_changed().set(this, &Options::slider_numballs_changed);
	slider_ypos += 8;
	label_numballs = create_slider_label(slider_numballs);

	slider_grid_angle = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_grid_angle->set_min(-45);
	slider_grid_angle->set_max(90);
	slider_grid_angle->set_position(grid_angle);
	slider_grid_angle->func_value_changed().set(this, &Options::slider_grid_angle_changed);
	slider_ypos += 8;
	label_grid_angle = create_slider_label(slider_grid_angle);

	int checkbox_xpos = slider_xpos;
	int checkbox_ypos = slider_ypos;
	int checkbox_gap = 24;
	checkbox_moveballs = create_checkbox(checkbox_xpos, checkbox_ypos, "Moving Balls", is_moveballs_set);
	checkbox_moveballs->func_state_changed().set(this, &Options::checkbox_moveballs_changed);

	make_mapmode_menu(combo_mapmode_menu);
	combo_mapmode = create_mapmode_combo_box(450, 40, combo_mapmode_menu, 0);
	label_mapmode = create_combobox_label(combo_mapmode, "Map Mode");

	update_all_slider_text();

	func_render().set(this, &Options::on_render);
}
Ejemplo n.º 10
0
void Options::update_euler()
{
	Mat4f matrix = quaternion.to_matrix();

	Vec3f euler = matrix.get_euler(order_YXZ);
	rotation_x.set_radians(euler.x);
	rotation_y.set_radians(euler.y);
	rotation_z.set_radians(euler.z);

	// Make 0 to 360 degrees
	rotation_x.normalize();
	rotation_y.normalize();
	rotation_z.normalize();

	set_value(slider_rotation_x, rotation_x.to_degrees(), 0, max_angle_value);
	set_value(slider_rotation_y, rotation_y.to_degrees(), 0, max_angle_value);
	set_value(slider_rotation_z, rotation_z.to_degrees(), 0, max_angle_value);

	update_all_slider_text();
}
Ejemplo n.º 11
0
Options::Options(clan::Canvas &canvas) : clan::TextureWindow(canvas)
{
	int slider_xpos = 400;
	int slider_label_xpos = slider_xpos + 200;
	int slider_ypos = 200;
	int slider_gap = 32;
	slider_outline_size = create_slider(slider_xpos, slider_ypos);
	slider_outline_size->set_max_position(32);
	slider_outline_size->set_position(outline_size);
	slider_outline_size->func_value_changed() = bind_member(this, &Options::slider_outline_size_changed);
	label_outline_size = create_slider_label(slider_label_xpos, slider_ypos);
	slider_ypos += slider_gap;

	slider_group_size = create_slider(slider_xpos, slider_ypos);
	slider_group_size->set_max_position(1024);
	slider_group_size->set_position(group_size);
	slider_group_size->func_value_changed() = bind_member(this, &Options::slider_group_size_changed);
	label_group_size = create_slider_label(slider_label_xpos, slider_ypos);
	slider_ypos += slider_gap;

	update_all_slider_text();

}
Ejemplo n.º 12
0
Options::Options(CL_GUIManager &gui, CL_Rect gui_position) : CL_GUIComponent(&gui, CL_GUITopLevelDescription("Options", gui_position, false))
{
	// If you change these, you also need to change the default selected combobox item
	blendfunc[0] = cl_blend_src_alpha;
	blendfunc[1] = cl_blend_one_minus_src_alpha;
	blendfunc[2] = cl_blend_src_alpha;
	blendfunc[3] = cl_blend_one_minus_src_alpha;
	blendequation[0] = cl_blend_equation_add;
	blendequation[1] = cl_blend_equation_add;
	logic_operation = cl_logic_op_set;
	logic_operation_enabled = false;

	primary_color = CL_Colorf::white;
	blend_color = CL_Colorf::white;
	num_balls = 4;
	is_premult_alpha_set = false;
	is_moveballs_set = true;
	is_blending_set = true;

	int slider_xpos = 400;
	int slider_ypos = 200;
	int slider_gap = 24;
	slider_numballs = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_numballs->set_max(9);
	slider_numballs->set_position(4);
	slider_numballs->func_value_changed().set(this, &Options::slider_numballs_changed);
	slider_primary_red = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_primary_red->func_value_changed().set(this, &Options::slider_primary_red_changed);
	slider_primary_green = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_primary_green->func_value_changed().set(this, &Options::slider_primary_green_changed);
	slider_primary_blue = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_primary_blue->func_value_changed().set(this, &Options::slider_primary_blue_changed);
	slider_primary_alpha = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_primary_alpha->func_value_changed().set(this, &Options::slider_primary_alpha_changed);
	slider_ypos += 8;
	slider_blend_red = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_blend_red->func_value_changed().set(this, &Options::slider_blend_red_changed);
	slider_blend_green = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_blend_green->func_value_changed().set(this, &Options::slider_blend_green_changed);
	slider_blend_blue = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_blend_blue->func_value_changed().set(this, &Options::slider_blend_blue_changed);
	slider_blend_alpha = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_blend_alpha->func_value_changed().set(this, &Options::slider_blend_alpha_changed);
	slider_ypos += 8;
	label_numballs = create_slider_label(slider_numballs);
	label_primary_red = create_slider_label(slider_primary_red);
	label_primary_green = create_slider_label(slider_primary_green);
	label_primary_blue = create_slider_label(slider_primary_blue);
	label_primary_alpha = create_slider_label(slider_primary_alpha);
	label_blend_red = create_slider_label(slider_blend_red);
	label_blend_green = create_slider_label(slider_blend_green);
	label_blend_blue = create_slider_label(slider_blend_blue);
	label_blend_alpha = create_slider_label(slider_blend_alpha);

	int checkbox_xpos = slider_xpos;
	int checkbox_ypos = slider_ypos;
	int checkbox_gap = 24;
	checkbox_moveballs = create_checkbox(checkbox_xpos, checkbox_ypos, "Moving Balls", is_moveballs_set);
	checkbox_moveballs->func_state_changed().set(this, &Options::checkbox_moveballs_changed);
	checkbox_blending = create_checkbox(checkbox_xpos + 150, checkbox_ypos, "Enable Blending", is_blending_set);
	checkbox_blending->func_state_changed().set(this, &Options::checkbox_blending_changed);
	checkbox_premult_alpha = create_checkbox(checkbox_xpos + 300, checkbox_ypos, "Use Premultipied Alpha", is_premult_alpha_set);
	checkbox_premult_alpha->func_state_changed().set(this, &Options::checkbox_premult_alpha_changed);
	checkbox_ypos += checkbox_gap + 8;

	make_equation_menu(combo_color_equation_menu);
	make_equation_menu(combo_alpha_equation_menu);
	combo_color_equation = create_equation_combo_box(400, 40, combo_color_equation_menu, 0);
	combo_alpha_equation = create_equation_combo_box(550, 40, combo_alpha_equation_menu, 0);
	label_color = create_combobox_label(combo_color_equation, "COLOR EQUATION");
	label_alpha = create_combobox_label(combo_alpha_equation, "ALPHA EQUATION");

	make_logic_menu(combo_logic_menu);
	combo_logic = create_logic_combo_box(700, 40, combo_logic_menu, 0);
	label_logic = create_combobox_label(combo_logic, "LOGIC OPERATION");

	make_blend_menu(combo_src_blend_menu);
	make_blend_menu(combo_dest_blend_menu);
	make_blend_menu(combo_src_alpha_blend_menu);
	make_blend_menu(combo_dest_alpha_blend_menu);
	combo_src_blend = create_blend_combo_box(410, 100, combo_src_blend_menu, 6);
	label_src = create_combobox_label(combo_src_blend, "SOURCE FUNCTION");
	combo_dest_blend = create_blend_combo_box(610, 100, combo_dest_blend_menu, 7);
	label_dest = create_combobox_label(combo_dest_blend, "DEST FUNCTION");
	combo_src_alpha_blend = create_blend_combo_box(410, 160, combo_src_alpha_blend_menu, 6);
	label_src_alpha = create_combobox_label(combo_src_alpha_blend, "SOURCE ALPHA FUNCTION");
	combo_dest_alpha_blend = create_blend_combo_box(610, 160, combo_dest_alpha_blend_menu, 7);
	label_dest_alpha = create_combobox_label(combo_dest_alpha_blend, "DEST ALPHA FUNCTION");

	update_all_slider_text();

	func_render().set(this, &Options::on_render);
}
Ejemplo n.º 13
0
void Options::slider_target_z_changed()
{
	target_z.set_degrees(target_z_view->get_value(0.0f, max_angle_value));
	update_all_slider_text();
}
Ejemplo n.º 14
0
Options::Options(clan::GUIManager &gui, clan::Rect gui_position) : clan::GUIComponent(&gui, clan::GUITopLevelDescription("Options", gui_position, false))
{
	is_normals_set = false;
	sized_format = clan::tf_rgb8;
	dimension = perlin_2d;
	amplitude = 1.0;
	width = 256;
	height = 256;
	octaves = 1;

	start_x = 0.0f;
	length_x = 32.0f;
	start_y = 0.0f;
	length_y = 32.0f;
	position_z = 0.0f;
	position_w = 0.0f;

	make_format_menu(combo_format_menu);
	combo_format = create_format_combo_box(450, 30, combo_format_menu, 0);
	label_format = create_combobox_label(combo_format, "Pixel Format");

	checkbox_normals = create_checkbox(640, 35, "Draw Normals (rgb only)", is_normals_set);
	checkbox_normals->func_state_changed().set(this, &Options::checkbox_normals_changed);

	make_dimension_menu(combo_dimension_menu);
	combo_dimension = create_dimension_combo_box(450, 80, combo_dimension_menu, 0);
	combo_dimension->set_selected_item(1);
	label_dimension = create_combobox_label(combo_dimension, "Dimension");

	int slider_xpos = 450;
	int slider_ypos = 120;
	int slider_gap = 20;

	slider_width = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_width->set_min(32);
	slider_width->set_max(382);
	slider_width->set_position(width);
	slider_width->func_value_changed().set(this, &Options::slider_width_changed);
	slider_ypos += 8;
	label_width = create_slider_label(slider_width);

	slider_height = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_height->set_min(32);
	slider_height->set_max(382);
	slider_height->set_position(height);
	slider_height->func_value_changed().set(this, &Options::slider_height_changed);
	slider_ypos += 8;
	label_height = create_slider_label(slider_height);

	slider_octaves = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	slider_octaves->set_min(1);
	slider_octaves->set_max(9);
	slider_octaves->set_page_step(1);
	slider_octaves->set_position(octaves);
	slider_octaves->func_value_changed().set(this, &Options::slider_octaves_changed);
	slider_ypos += 8;
	label_octaves = create_slider_label(slider_octaves);

	slider_amplitude = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	set_value(slider_amplitude, amplitude, MAX_AMPLITUDE);
	slider_amplitude->func_value_changed().set(this, &Options::slider_amplitude_changed);
	slider_ypos += 8;
	label_amplitude = create_slider_label(slider_amplitude);

	slider_start_x = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	set_value(slider_start_x, start_x, MAX_POSITION);
	slider_start_x->func_value_changed().set(this, &Options::slider_start_x_changed);
	slider_ypos += 8;
	label_start_x = create_slider_label(slider_start_x);

	slider_length_x = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	set_value(slider_length_x, length_x, MAX_LENGTH);
	slider_length_x->func_value_changed().set(this, &Options::slider_length_x_changed);
	slider_ypos += 8;
	label_length_x = create_slider_label(slider_length_x);

	slider_start_y = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	set_value(slider_start_y, start_y, MAX_POSITION);
	slider_start_y->func_value_changed().set(this, &Options::slider_start_y_changed);
	slider_ypos += 8;
	label_start_y = create_slider_label(slider_start_y);

	slider_length_y = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	set_value(slider_length_y, length_y, MAX_LENGTH);
	slider_length_y->func_value_changed().set(this, &Options::slider_length_y_changed);
	slider_ypos += 8;
	label_length_y = create_slider_label(slider_length_y);

	slider_position_z = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	set_value(slider_position_z, position_z, MAX_POSITION);
	slider_position_z->func_value_changed().set(this, &Options::slider_position_z_changed);
	slider_ypos += 8;
	label_position_z = create_slider_label(slider_position_z);

	slider_position_w = create_slider(slider_xpos, slider_ypos); slider_ypos += slider_gap;
	slider_ypos += 8;
	set_value(slider_position_w, position_w, MAX_POSITION);
	slider_position_w->func_value_changed().set(this, &Options::slider_position_w_changed);
	slider_ypos += 8;
	label_position_w = create_slider_label(slider_position_w);


	update_all_slider_text();

	func_render().set(this, &Options::on_render);
}
Ejemplo n.º 15
0
void Options::slider_target_y_changed()
{
	target_y.set_degrees(get_value(slider_target_y, 0.0f, max_angle_value));
	update_all_slider_text();
}