ref: 29415dfac1fb18f32d86433c00b4b4942c4c24d6
parent: 8b1426f03a09a3c4c99c3d12c194edd87fbccd93
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Mar 19 16:05:49 EDT 2020
ui glue: reset on every declaration
--- a/uiglue.c
+++ b/uiglue.c
@@ -191,15 +191,21 @@
static void
ui_button(void *f, const char *label, float *zone)
{
- ui_define(f, UIButton, label, zone);
+ UI *ui;
+
+ ui = ui_define(f, UIButton, label, zone);
*zone = 0;
+ ui->writestr(ui, Xuictl, "reset");
}
static void
ui_checkbox(void *f, const char *label, float *zone)
{
- ui_define(f, UICheckBox, label, zone);
+ UI *ui;
+
+ ui = ui_define(f, UICheckBox, label, zone);
*zone = 0;
+ ui->writestr(ui, Xuictl, "reset");
}
static void
@@ -212,6 +218,7 @@
ui->min = min;
ui->max = max;
ui->step = step;
+ ui->writestr(ui, Xuictl, "reset");
}
static void
@@ -224,6 +231,7 @@
ui->min = min;
ui->max = max;
ui->step = step;
+ ui->writestr(ui, Xuictl, "reset");
}
static void
@@ -236,6 +244,7 @@
ui->min = min;
ui->max = max;
ui->step = step;
+ ui->writestr(ui, Xuictl, "reset");
}
static void
@@ -247,6 +256,7 @@
ui->min = min;
ui->max = max;
*zone = 0;
+ ui->writestr(ui, Xuictl, "reset");
}
static void
@@ -258,6 +268,7 @@
ui->min = min;
ui->max = max;
*zone = 0;
+ ui->writestr(ui, Xuictl, "reset");
}
static void