+void GainWindow::update()
+{
+ float level = plugin->config.level;
+ level_text->update(level);
+ level_slider->update(level);
+}
+
+
+
+GainLevelText::GainLevelText(GainWindow *window, GainMain *plugin, int x, int y)
+ : BC_TumbleTextBox(window, plugin->config.level,
+ (float)INFINITYGAIN, (float)GAINLEVEL_MAX, x, y, xS(60), 2)
+{
+ this->window = window;
+ this->plugin = plugin;
+ set_increment(0.1);
+}
+GainLevelText::~GainLevelText()
+{
+}
+int GainLevelText::handle_event()
+{
+ float min = INFINITYGAIN, max = GAINLEVEL_MAX;
+ float output = atof(get_text());
+
+ if(output > max) output = max;
+ else if(output < min) output = min;
+ plugin->config.level = output;
+ window->update();
+ plugin->send_configure_change();
+ return 1;
+}