aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/main.c b/main.c
index a869d57..a95a95a 100644
--- a/main.c
+++ b/main.c
@@ -11,6 +11,8 @@
#include "widget.h"
#include "engine.h"
#include "ui.h"
+#include "color.h"
+#include "eprintf.h"
/* Macros. */
@@ -26,11 +28,6 @@ enum window {
};
-static const mu_Color BLACK = {0, 0, 0, 255};
-static const mu_Color WHITE = {255, 255, 255, 255};
-static const mu_Color LIGHT_GRAY = {222, 222, 222, 255};
-static const mu_Color DARK_GRAY = {128, 128, 128, 255};
-
static const mu_Color COLOR_TEXT = BLACK;
static const mu_Color COLOR_BORDER = BLACK;
static const mu_Color COLOR_WINDOWBG = WHITE;
@@ -329,6 +326,7 @@ dup_del_row(mu_Context *ctx, UI *ui) {
}
if (mu_button(ctx, "Del")) {
remove_point(ui, i);
+ compute_all(ui);
}
mu_pop_id(ctx);
}
@@ -390,8 +388,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);
}
}