Ejemplo n.º 1
0
AG_Slider *
AG_SliderNewSint32R(void *parent, enum ag_slider_type type, Uint flags, Sint32 *val, Sint32 min, Sint32 max)
{
	AG_Slider *sl = AG_SliderNew(parent, type, flags);
	if (val != NULL) { AG_BindSint32(sl, "value", val); }
	AG_SetSint32(sl, "min", min);
	AG_SetSint32(sl, "max", max);
	return (sl);
}
Ejemplo n.º 2
0
AG_Slider *
AG_SliderNewUint32(void *parent, enum ag_slider_type type, Uint flags, Uint32 *val, Uint32 *min, Uint32 *max)
{
	AG_Slider *sl = AG_SliderNew(parent, type, flags);
	if (val != NULL) { AG_BindUint32(sl, "value", val); }
	if (min != NULL) { AG_BindUint32(sl, "min", min); }
	if (max != NULL) { AG_BindUint32(sl, "max", max); }
	return (sl);
}
Ejemplo n.º 3
0
AG_Slider *
AG_SliderNewUint16R(void *parent, enum ag_slider_type type, Uint flags, Uint16 *val, Uint16 min, Uint16 max)
{
	AG_Slider *sl = AG_SliderNew(parent, type, flags);
	if (val != NULL) { AG_BindUint16(sl, "value", val); }
	AG_SetUint16(sl, "min", min);
	AG_SetUint16(sl, "max", max);
	return (sl);
}
Ejemplo n.º 4
0
AG_Slider *
AG_SliderNewIntR(void *parent, enum ag_slider_type type, Uint flags,
    int *val, int min, int max)
{
	AG_Slider *sl = AG_SliderNew(parent, type, flags);
	if (val != NULL) { AG_BindInt(sl, "value", val); }
	AG_SetInt(sl, "min", min);
	AG_SetInt(sl, "max", max);
	return (sl);
}
Ejemplo n.º 5
0
AG_Slider *
AG_SliderNewDblR(void *parent, enum ag_slider_type type, Uint flags,
    double *val, double min, double max)
{
	AG_Slider *sl = AG_SliderNew(parent, type, flags);
	if (val != NULL) { AG_BindDouble(sl, "value", val); }
	AG_SetDouble(sl, "min", min);
	AG_SetDouble(sl, "max", max);
	return (sl);
}
Ejemplo n.º 6
0
static void ConfigMenuBright(struct gui_disp *cfg, AG_NotebookTab *parent)
{
	AG_Slider *slider;
	AG_Box *box;
	AG_Box *vbox;
	AG_Label *lbl;

	lbl = AG_LabelNew(AGWIDGET(parent), 0, "%s", gettext("Bright"));
//	slider = AG_SliderNewFltR(AGWIDGET(parent),AG_SLIDER_HORIZ, AG_SLIDER_HFILL, &fBright0, 0.0f, 1.0f);
	slider = AG_SliderNew(AGWIDGET(parent), AG_SLIDER_HORIZ, AG_SLIDER_HFILL);
        AG_SetUint16(slider, "value", cfg->nBrightness);
        AG_SetUint16(slider, "min", 0);
        AG_SetUint16(slider, "max", 255);
#ifdef USE_OPENGL
	AG_SetEvent(AGOBJECT(slider), "slider-changed", OnChangeBright, "%p", cfg);
#endif /* USE_OPENGL */
	box = AG_BoxNewHoriz(AGWIDGET(parent), AG_BOX_HFILL);
}