@@ -54,7 +54,7 @@ struct MultisliderWidget
54
54
}
55
55
else
56
56
{
57
- ctx.set_fill_color ({100 , 150 , 255 , 255 });
57
+ ctx.set_fill_color ({255 , 176 , 30 , 255 });
58
58
}
59
59
ctx.begin_path ();
60
60
ctx.draw_rect (x, height () - fillHeight, sliderWidth, fillHeight);
@@ -64,9 +64,10 @@ struct MultisliderWidget
64
64
if (executing && idx < runtimeValues.size ())
65
65
{
66
66
double runtimeHeight = runtimeValues[idx] * height ();
67
- ctx.set_fill_color ({255 , 100 , 100 , 100 });
67
+ ctx.set_fill_color ({255 , 220 , 60 , 100 });
68
68
ctx.begin_path ();
69
- ctx.draw_rect (x, height () - runtimeHeight, sliderWidth, runtimeHeight);
69
+ ctx.draw_rect (
70
+ x, height () - runtimeHeight, std::max (2 ., sliderWidth), runtimeHeight);
70
71
ctx.fill ();
71
72
}
72
73
@@ -130,22 +131,6 @@ struct MultisliderWidget
130
131
}
131
132
}
132
133
133
- bool key (int key)
134
- {
135
- // Reset selected slider to default value with R key
136
- if (key == ' r' || key == ' R' )
137
- {
138
- if (selectedCursor >= 0 && selectedCursor < value.size ())
139
- {
140
- value[selectedCursor] = 0 .5f ;
141
- if (on_value_changed)
142
- on_value_changed ();
143
- return true ;
144
- }
145
- }
146
- return false ;
147
- }
148
-
149
134
void reset ()
150
135
{
151
136
executing = false ;
@@ -178,7 +163,7 @@ struct Multislider
178
163
179
164
struct ins
180
165
{
181
- struct : halp::spinbox_i32<" Count" , halp::range{.min = 1 , .max = 20 , .init = 4 }>
166
+ struct : halp::spinbox_i32<" Count" , halp::range{.min = 1 , .max = 200 , .init = 4 }>
182
167
{
183
168
void update (Multislider& self) { self.updateCursorCount (); }
184
169
} count;
@@ -269,9 +254,6 @@ struct Multislider
269
254
void operator ()(halp::tick t)
270
255
{
271
256
update_ui ();
272
- for (float v : inputs.cursors .value )
273
- fprintf (stderr, " %f " , v);
274
- fprintf (stderr, " \n " );
275
257
outputs.cursors .value = inputs.cursors .value ;
276
258
}
277
259
0 commit comments