diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 21:15:30 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 21:15:30 -0500 |
| commit | 9f475d92d1eeebf5f2ad7d0db5d96d92d655d111 (patch) | |
| tree | 22e151a4031ae28131cbf46d0fa7e886d733e3ea | |
| parent | 942a6711361c371da0736cc62f0e3e2ed13f341b (diff) | |
| download | volute-9f475d92d1eeebf5f2ad7d0db5d96d92d655d111.zip | |
set ve
| -rw-r--r-- | main.c | 3 | ||||
| -rw-r--r-- | ui.c | 5 | ||||
| -rw-r--r-- | ui.h | 1 |
3 files changed, 8 insertions, 1 deletions
@@ -207,7 +207,8 @@ ve_row(mu_Context *ctx, UI *ui) { mu_layout_width(ctx, FIELD_WIDTH); for (i = 0; i < ui->npoints; i++) { if (w_field(ctx, &ui->ve[i])) { - /* TODO */ + set_ve(ui, i); + set_volume_flow_rate(ui, i); } } } @@ -78,6 +78,11 @@ set_map(UI *ui, int idx) { } void +set_ve(UI *ui, int idx) { + ui->points[idx].ve = percent(ui->ve[idx].value); +} + +void set_volume_flow_rate(UI *ui, int idx) { int unit_idx; double (*convert)(VolumeFlowRate), v; @@ -22,6 +22,7 @@ typedef struct { void init_ui(UI *ui); void set_displacement(UI *ui); void set_map(UI *ui, int idx); +void set_ve(UI *ui, int idx); void set_volume_flow_rate(UI *ui, int idx); void set_all_volume_flow_rate(UI *ui); void insert_point(UI *ui, int idx); |