From e977059a478178101eda2e6771d52f21b135248c Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Fri, 2 May 2025 20:54:00 -0230 Subject: select compressor map --- main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index cc1620f..220abe6 100644 --- a/main.c +++ b/main.c @@ -12,6 +12,7 @@ #include "engine.h" #include "ui.h" #include "color.h" +#include "eprintf.h" /* Macros. */ @@ -386,8 +387,14 @@ mass_flow_rate_corrected_row(mu_Context *ctx, UI *ui) { static void comp_select(mu_Context *ctx, UI *ui) { + const Compressor *comp; + if (w_select_compressor(ctx, &ui->comp_select) & MU_RES_CHANGE) { - /* TODO */ + comp = &ui->comps[ui->comp_select.idx]; + if (w_canvas_set_bg(&ui->comp_img, comp->imgfile) != 0) { + weprintf("failed to set compressor image: %s", comp->imgfile); + } + compute_all(ui); } } -- cgit v1.2.3