-HueSlider::HueSlider(HueEffect *plugin, int x, int y, int w)
- : BC_FSlider(x,
- y,
- 0,
- w,
- w,
- (float)MINHUE,
- (float)MAXHUE,
- plugin->config.hue)
+HueText::~HueText()
+{
+}
+
+int HueText::handle_event()
+{
+ float min = MINHUE, max = MAXHUE;
+ float output = atof(get_text());
+ if(output > max) output = max;
+ if(output < min) output = min;
+ plugin->config.hue = output;
+ gui->hue_slider->update(plugin->config.hue);
+ plugin->send_configure_change();
+ return 1;
+}
+
+HueSlider::HueSlider(HueEffect *plugin, HueWindow *gui, int x, int y, int w)
+ : BC_FSlider(x, y, 0, w, w,
+ (float)MINHUE, (float)MAXHUE,
+ plugin->config.hue)