Unified · Split
| @@ -88,7 +88,9 @@ ui_write(UI *ui, int type, char *s) · 87 unmodified lines | ||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | if (ui->zone != nil) { |
| 91 | − if (ui->type != UIButton && ui->type != UICheckBox) { | |
| 91 | + if (ui->type == UIButton || ui->type == UICheckBox) { | |
| 92 | + *ui->zone = v > 0 ? 1 : 0; | |
| 93 | + } else { | |
| 92 | 94 | if (v < ui->min) { |
| 93 | 95 | if (failoor) |
| 94 | 96 | return -1; |
| @@ -98,8 +100,8 @@ ui_write(UI *ui, int type, char *s) · 3 unmodified lines | ||
| 98 | 100 | return -1; |
| 99 | 101 | v = ui->max; |
| 100 | 102 | } |
| 103 | + *ui->zone = v; | |
| 101 | 104 | } |
| 102 | − *ui->zone = v; | |
| 103 | 105 | } |
| 104 | 106 | |
| 105 | 107 | return 0; |