Exemple #1
0
bool GuiConfig::Read(const string &option, uint16_t &value)
{
	if(!option.size())
		return true;

	value = AG_GetUint16(agConfig, option.c_str());

	return false;
}
static void OnChangeBright(AG_Event *event)
{
	AG_Slider *self = (AG_Slider *)AG_SELF();
        struct gui_disp *cfg = (struct gui_disp *)AG_PTR(1);
        WORD bright = AG_GetUint16(self, "value");
        float fBright0;
   
        if(cfg == NULL) return;
        if(bright < 0) bright = 0;
        if(bright > 255) bright = 255;
        fBright0 = (float)bright / 255.0f;
        SetBrightRGB_AG_GL2(fBright0, fBright0, fBright0);
        cfg->nBrightness = bright;
}
Exemple #3
0
Uint16
agar_gui_widget_get_uint16 (AG_Widget *w, const char *binding)
{
  return AG_GetUint16 (w, binding);
}