ref: ab4c6a1668dcb030672266e81ad7e0ff5cf0289e
parent: 023f2af0d958b771a8b542009ce359ccf500f3a4
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sun Jan 12 13:59:18 EST 2020
uiglue: take the value as it is for button and checkbox
--- a/uiglue.c
+++ b/uiglue.c
@@ -88,16 +88,16 @@
}
if (ui->zone != nil) {
- if (ui->type == UIButton || ui->type == UICheckBox) {
- v = !!v;
- } else if (v < ui->min) {
- if (failoor)
- return -1;
- v = ui->min;
- } else if (v > ui->max) {
- if (failoor)
- return -1;
- v = ui->max;
+ if (ui->type != UIButton && ui->type != UICheckBox) {
+ if (v < ui->min) {
+ if (failoor)
+ return -1;
+ v = ui->min;
+ } else if (v > ui->max) {
+ if (failoor)
+ return -1;
+ v = ui->max;
+ }
}
*ui->zone = v;
}