g_object_set_data (G_OBJECT (dlg), "roughness", entry);
g_signal_connect (G_OBJECT (entry), "focus_out_event", G_CALLBACK (doublevariable_entryfocusout), &Roughness);
- adj = gtk_adjustment_new (1, 1, 32767, 1, 10, 10);
+ adj = gtk_adjustment_new (1, 1, 32767, 1, 10, 0);
g_signal_connect (G_OBJECT (adj), "value_changed", G_CALLBACK (general_random), NULL);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
gtk_widget_show (spin);
(GtkAttachOptions) (GTK_EXPAND|GTK_FILL), 0, 0);
g_object_set_data (G_OBJECT (dlg), "nv_text", label);
- adj = gtk_adjustment_new (8, 1, MAX_ROWS, 1, 10, 10);
+ adj = gtk_adjustment_new (8, 1, MAX_ROWS, 1, 10, 0);
g_signal_connect (G_OBJECT (adj), "value_changed", G_CALLBACK (extents_nhnv_spin), &NH);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
gtk_widget_show (spin);
gtk_widget_set_usize (spin, 60, -2);
g_object_set_data (G_OBJECT (dlg), "nh", spin);
- adj = gtk_adjustment_new (8, 1, MAX_ROWS, 1, 10, 10);
+ adj = gtk_adjustment_new (8, 1, MAX_ROWS, 1, 10, 0);
g_signal_connect (G_OBJECT (adj), "value_changed", G_CALLBACK (extents_nhnv_spin), &NV);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
gtk_widget_show (spin);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
gtk_object_set_data (GTK_OBJECT (dlg), "snap_text", label);
- adj = gtk_adjustment_new (8, 0, 256, 1, 10, 10);
+ adj = gtk_adjustment_new (8, 0, 256, 1, 10, 0);
g_signal_connect (G_OBJECT (adj), "value_changed", G_CALLBACK (extents_snaptogrid_spin), &SP);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
gtk_widget_show (spin);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, TRUE, 0);
- adj = gtk_adjustment_new (0, 0, 110, 1, 10, 10);
+ adj = gtk_adjustment_new (0, 0, 110, 1, 10, 0);
g_signal_connect (G_OBJECT (adj), "value_changed", G_CALLBACK (extents_decimate), NULL);
g_object_set_data (G_OBJECT (dlg), "decimate_adj", adj);
scale = gtk_hscale_new (GTK_ADJUSTMENT (adj));
gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5);
g_object_set_data (G_OBJECT (dlg), "fix_rate_text", label);
- adj = gtk_adjustment_new (0, -65536, 65536, 1, 16, 16);
+ adj = gtk_adjustment_new (0, -65536, 65536, 1, 16, 0);
g_signal_connect (G_OBJECT (adj), "value_changed", G_CALLBACK (fix_value_changed), NULL);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
gtk_widget_show (spin);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (hbox2), label, FALSE, TRUE, 0);
- adj = gtk_adjustment_new (60, 0, 90, 1, 10, 10);
+ adj = gtk_adjustment_new (60, 0, 90, 1, 10, 0);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
gtk_widget_show (spin);
gtk_box_pack_start (GTK_BOX (hbox2), spin, FALSE, TRUE, 0);
gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0);
- adj = gtk_adjustment_new (30, -90, 90, 1, 10, 10);
+ adj = gtk_adjustment_new (30, -90, 90, 1, 10, 0);
gtk_signal_connect (adj, "value_changed", GTK_SIGNAL_FUNC (preview_spin), &elevation);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
gtk_widget_show (spin);
gtk_box_pack_start (GTK_BOX (hbox), spin, FALSE, TRUE, 0);
g_signal_connect (G_OBJECT (spin), "focus_out_event", G_CALLBACK (doublevariable_spinfocusout), &elevation);
- adj = gtk_adjustment_new (30, 0, 359, 1, 10, 10);
+ adj = gtk_adjustment_new (30, 0, 359, 1, 10, 0);
gtk_signal_connect (adj, "value_changed", GTK_SIGNAL_FUNC (preview_spin), &azimuth);
spin = gtk_spin_button_new (GTK_ADJUSTMENT (adj), 1, 0);
gtk_widget_show (spin);
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
- adj = gtk_adjustment_new (portals.width_3d, 2, 40, 1, 1, 1);
+ adj = gtk_adjustment_new (portals.width_3d, 2, 40, 1, 1, 0);
lw3slider = gtk_hscale_new (GTK_ADJUSTMENT (adj));
gtk_widget_show (lw3slider);
gtk_box_pack_start (GTK_BOX (hbox), lw3slider, TRUE, TRUE, 0);
gtk_table_set_row_spacings (GTK_TABLE (table), 5);
gtk_table_set_col_spacings (GTK_TABLE (table), 5);
- adj = gtk_adjustment_new (portals.trans_3d, 0, 100, 1, 1, 1);
+ adj = gtk_adjustment_new (portals.trans_3d, 0, 100, 1, 1, 0);
transslider = gtk_hscale_new (GTK_ADJUSTMENT (adj));
gtk_widget_show (transslider);
gtk_table_attach (GTK_TABLE (table), transslider, 0, 1, 0, 1,
gtk_misc_set_alignment (GTK_MISC (translabel), 0.0, 0.0);
gtk_signal_connect (adj, "value_changed", GTK_SIGNAL_FUNC (OnScrollTrans), translabel);
- adj = gtk_adjustment_new (portals.clip_range, 1, 128, 1, 1, 1);
+ adj = gtk_adjustment_new (portals.clip_range, 1, 128, 1, 1, 0);
clipslider = gtk_hscale_new (GTK_ADJUSTMENT (adj));
gtk_widget_show (clipslider);
gtk_table_attach (GTK_TABLE (table), clipslider, 0, 1, 1, 2,
gtk_widget_show (hbox);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, FALSE, 0);
- adj = gtk_adjustment_new (portals.width_2d, 2, 40, 1, 1, 1);
+ adj = gtk_adjustment_new (portals.width_2d, 2, 40, 1, 1, 0);
lw2slider = gtk_hscale_new (GTK_ADJUSTMENT (adj));
gtk_widget_show (lw2slider);
gtk_box_pack_start (GTK_BOX (hbox), lw2slider, TRUE, TRUE, 0);
globalOutputStream() << "SunPlug: adviced mapcoordsmins=" << minX << " " << maxY << "\n"; // console info about mapcoordsmins\r
globalOutputStream() << "SunPlug: adviced mapcoordsmaxs=" << maxX << " " << minY << "\n"; // console info about mapcoordsmaxs\r
\r
- spinner_adj_MinX = (GtkAdjustment *)gtk_adjustment_new(map_minX, -65536.0, 65536.0, 1.0, 5.0, 5.0); // create adjustment for value and range of minimum x value\r
- spinner_adj_MinY = (GtkAdjustment *)gtk_adjustment_new(map_minY, -65536.0, 65536.0, 1.0, 5.0, 5.0); // create adjustment for value and range of minimum y value\r
- spinner_adj_MaxX = (GtkAdjustment *)gtk_adjustment_new(map_maxX, -65536.0, 65536.0, 1.0, 5.0, 5.0); // create adjustment for value and range of maximum x value\r
- spinner_adj_MaxY = (GtkAdjustment *)gtk_adjustment_new(map_maxY, -65536.0, 65536.0, 1.0, 5.0, 5.0); // create adjustment for value and range of maximum y value\r
+ spinner_adj_MinX = (GtkAdjustment *)gtk_adjustment_new(map_minX, -65536.0, 65536.0, 1.0, 5.0, 0); // create adjustment for value and range of minimum x value\r
+ spinner_adj_MinY = (GtkAdjustment *)gtk_adjustment_new(map_minY, -65536.0, 65536.0, 1.0, 5.0, 0); // create adjustment for value and range of minimum y value\r
+ spinner_adj_MaxX = (GtkAdjustment *)gtk_adjustment_new(map_maxX, -65536.0, 65536.0, 1.0, 5.0, 0); // create adjustment for value and range of maximum x value\r
+ spinner_adj_MaxY = (GtkAdjustment *)gtk_adjustment_new(map_maxY, -65536.0, 65536.0, 1.0, 5.0, 0); // create adjustment for value and range of maximum y value\r
\r
button = gtk_button_new_with_label("Get optimal mapcoords"); // create button with text\r
g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(input_optimal), NULL); // connect button with callback function\r
void Camera_constructPreferences(PreferencesPage& page)
{
- page.appendSlider("Movement Speed", g_camwindow_globals_private.m_nMoveSpeed, TRUE, 0, 0, 100, MIN_CAM_SPEED, MAX_CAM_SPEED, 1, 10, 10);
+ page.appendSlider("Movement Speed", g_camwindow_globals_private.m_nMoveSpeed, TRUE, 0, 0, 100, MIN_CAM_SPEED, MAX_CAM_SPEED, 1, 10);
page.appendCheckBox("", "Link strafe speed to movement speed", g_camwindow_globals_private.m_bCamLinkSpeed);
- page.appendSlider("Rotation Speed", g_camwindow_globals_private.m_nAngleSpeed, TRUE, 0, 0, 3, 1, 180, 1, 10, 10);
+ page.appendSlider("Rotation Speed", g_camwindow_globals_private.m_nAngleSpeed, TRUE, 0, 0, 3, 1, 180, 1, 10);
page.appendCheckBox("", "Invert mouse vertical axis", g_camwindow_globals_private.m_bCamInverseMouse);
page.appendCheckBox(
"", "Discrete movement",
{
++digits;
}
- GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(value, lower, upper, step, 10, 10)), step, digits));
+ GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(value, lower, upper, step, 10, 0)), step, digits));
gtk_widget_show(GTK_WIDGET(spin));
gtk_widget_set_size_request(GTK_WIDGET(spin), 64, -1);
return spin;
addCombo(vbox, name, values, IntImportCaller(data), IntExportCaller(data));
}
-void Dialog::addSlider(GtkWidget* vbox, const char* name, int& data, gboolean draw_value, const char* low, const char* high, double value, double lower, double upper, double step_increment, double page_increment, double page_size)
+void Dialog::addSlider(GtkWidget* vbox, const char* name, int& data, gboolean draw_value, const char* low, const char* high, double value, double lower, double upper, double step_increment, double page_increment)
{
#if 0
if(draw_value == FALSE)
#endif
// adjustment
- GtkObject* adj = gtk_adjustment_new(value, lower, upper, step_increment, page_increment, page_size);
+ GtkObject* adj = gtk_adjustment_new(value, lower, upper, step_increment, page_increment, 0);
AddIntAdjustmentData(*GTK_ADJUSTMENT(adj), IntImportCaller(data), IntExportCaller(data));
// scale
GtkWidget* addCheckBox(GtkWidget* vbox, const char* name, const char* flag, bool& data);
void addCombo(GtkWidget* vbox, const char* name, StringArrayRange values, const IntImportCallback& importCallback, const IntExportCallback& exportCallback);
void addCombo(GtkWidget* vbox, const char* name, int& data, StringArrayRange values);
- void addSlider(GtkWidget* vbox, const char* name, int& data, gboolean draw_value, const char* low, const char* high, double value, double lower, double upper, double step_increment, double page_increment, double page_size);
+ void addSlider(GtkWidget* vbox, const char* name, int& data, gboolean draw_value, const char* low, const char* high, double value, double lower, double upper, double step_increment, double page_increment);
void addRadio(GtkWidget* vbox, const char* name, StringArrayRange names, const IntImportCallback& importCallback, const IntExportCallback& exportCallback);
void addRadio(GtkWidget* vbox, const char* name, int& data, StringArrayRange names);
void addRadioIcons(GtkWidget* vbox, const char* name, StringArrayRange icons, const IntImportCallback& importCallback, const IntExportCallback& exportCallback);
// so we need to have at least one initialisation somewhere
entry_set_float(entry, g_pi_globals.shift[0]);
- GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 1, 1, 1));
+ GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 1, 1, 0));
g_signal_connect(G_OBJECT(adj), "value_changed", G_CALLBACK(OnSpinChanged), entry);
g_object_set_data(G_OBJECT(window), "hshift_adj", adj);
gtk_widget_set_usize(GTK_WIDGET(entry), 50, -2);
entry_set_float(entry, g_pi_globals.shift[1]);
- GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 1, 1, 1));
+ GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 1, 1, 0));
g_signal_connect(G_OBJECT(adj), "value_changed", G_CALLBACK(OnSpinChanged), entry);
g_object_set_data(G_OBJECT(window), "vshift_adj", adj);
gtk_widget_set_usize(GTK_WIDGET(entry), 50, -2);
entry_set_float(entry, g_pi_globals.scale[0]);
- GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -1000, 1000, 1, 1, 1));
+ GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -1000, 1000, 1, 1, 0));
g_signal_connect(G_OBJECT(adj), "value_changed", G_CALLBACK(OnSpinChanged), entry);
g_object_set_data(G_OBJECT(window), "hscale_adj", adj);
gtk_widget_set_usize(GTK_WIDGET(entry), 50, -2);
entry_set_float(entry, g_pi_globals.scale[1]);
- GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -1000, 1000, 1, 1, 1));
+ GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -1000, 1000, 1, 1, 0));
g_signal_connect(G_OBJECT(adj), "value_changed", G_CALLBACK(OnSpinChanged), entry);
g_object_set_data(G_OBJECT(window), "vscale_adj", adj);
gtk_widget_set_usize(GTK_WIDGET(entry), 50, -2);
entry_set_float(entry, g_pi_globals.rotate);
- GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -1000, 1000, 1, 1, 1)); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps
+ GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -1000, 1000, 1, 1, 0)); // NOTE: Arnout - this really should be 360 but can't change it anymore as it could break existing maps
g_signal_connect(G_OBJECT(adj), "value_changed", G_CALLBACK(OnSpinChanged), entry);
g_object_set_data(G_OBJECT(window), "rotate_adj", adj);
{
m_dialog.addCombo(m_vbox, name, data, values);
}
- void appendSlider(const char* name, int& data, gboolean draw_value, const char* low, const char* high, double value, double lower, double upper, double step_increment, double page_increment, double page_size)
+ void appendSlider(const char* name, int& data, gboolean draw_value, const char* low, const char* high, double value, double lower, double upper, double step_increment, double page_increment)
{
- m_dialog.addSlider(m_vbox, name, data, draw_value, low, high, value, lower, upper, step_increment, page_increment, page_size);
+ m_dialog.addSlider(m_vbox, name, data, draw_value, low, high, value, lower, upper, step_increment, page_increment);
}
void appendRadio(const char* name, StringArrayRange names, const IntImportCallback& importCallback, const IntExportCallback& exportCallback)
{
(GtkAttachOptions) (0), 0, 0);
}
{
- GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -359, 359, 1, 10, 10));
+ GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -359, 359, 1, 10, 0));
GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(adj, 1, 0));
gtk_widget_show(GTK_WIDGET(spin));
gtk_table_attach(table, GTK_WIDGET(spin), 1, 2, 0, 1,
g_rotate_dialog.x = spin;
}
{
- GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -359, 359, 1, 10, 10));
+ GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -359, 359, 1, 10, 0));
GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(adj, 1, 0));
gtk_widget_show(GTK_WIDGET(spin));
gtk_table_attach(table, GTK_WIDGET(spin), 1, 2, 1, 2,
g_rotate_dialog.y = spin;
}
{
- GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -359, 359, 1, 10, 10));
+ GtkAdjustment* adj = GTK_ADJUSTMENT(gtk_adjustment_new(0, -359, 359, 1, 10, 0));
GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(adj, 1, 0));
gtk_widget_show(GTK_WIDGET(spin));
gtk_table_attach(table, GTK_WIDGET(spin), 1, 2, 2, 3,
(GtkAttachOptions) (0), 0, 0);
}
{
- GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 8)), 0, 2));
+ GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 0)), 0, 2));
m_hshiftIncrement.m_spin = spin;
m_hshiftSpinner.connect(spin);
gtk_widget_show(GTK_WIDGET(spin));
(GtkAttachOptions) (0), 0, 0);
}
{
- GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 8)), 0, 2));
+ GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 0)), 0, 2));
m_vshiftIncrement.m_spin = spin;
m_vshiftSpinner.connect(spin);
gtk_widget_show(GTK_WIDGET(spin));
(GtkAttachOptions) (0), 0, 0);
}
{
- GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 8)), 0, 5));
+ GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 0)), 0, 5));
m_hscaleIncrement.m_spin = spin;
m_hscaleSpinner.connect(spin);
gtk_widget_show(GTK_WIDGET(spin));
(GtkAttachOptions) (0), 0, 0);
}
{
- GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 8)), 0, 5));
+ GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 0)), 0, 5));
m_vscaleIncrement.m_spin = spin;
m_vscaleSpinner.connect(spin);
gtk_widget_show(GTK_WIDGET(spin));
(GtkAttachOptions) (0), 0, 0);
}
{
- GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 8)), 0, 2));
+ GtkSpinButton* spin = GTK_SPIN_BUTTON(gtk_spin_button_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, -8192, 8192, 2, 8, 0)), 0, 2));
m_rotateIncrement.m_spin = spin;
m_rotateSpinner.connect(spin);
gtk_widget_show(GTK_WIDGET(spin));
gtk_widget_set_usize (button, 60, -2);
}
{
- GtkWidget* spin = gtk_spin_button_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 0, 1 << 16, 1, 10, 10)), 0, 6);
+ GtkWidget* spin = gtk_spin_button_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 0, 1 << 16, 1, 10, 0)), 0, 6);
gtk_widget_show (spin);
gtk_table_attach(GTK_TABLE(table), spin, 2, 3, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
AddDialogData(*GTK_SPIN_BUTTON(spin), m_fitHorizontal);
}
{
- GtkWidget* spin = gtk_spin_button_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 0, 1 << 16, 1, 10, 10)), 0, 6);
+ GtkWidget* spin = gtk_spin_button_new (GTK_ADJUSTMENT (gtk_adjustment_new (1, 0, 1 << 16, 1, 10, 0)), 0, 6);
gtk_widget_show (spin);
gtk_table_attach(GTK_TABLE(table), spin, 3, 4, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
gtk_widget_show(GTK_WIDGET(g_TextureBrowser.m_treeViewTree));
}
{ // gl_widget scrollbar
- GtkWidget* w = gtk_vscrollbar_new(GTK_ADJUSTMENT(gtk_adjustment_new (0,0,0,1,1,1)));
+ GtkWidget* w = gtk_vscrollbar_new(GTK_ADJUSTMENT(gtk_adjustment_new (0,0,0,1,1,0)));
gtk_table_attach(GTK_TABLE (table), w, 2, 3, 1, 2, GTK_SHRINK, GTK_FILL, 0, 0);
gtk_widget_show(w);
g_TextureBrowser.m_texture_scroll = w;