+AlphaText::AlphaText(AlphaWindow *window, AlphaMain *plugin,
+ int x, int y)
+ : BC_TumbleTextBox(window, (float)plugin->config.a,
+ (float)OPACITY_MIN, (float)OPACITY_MAX, x, y, xS(60), 2)
+{
+ this->window = window;
+ this->plugin = plugin;
+ set_increment(0.1);
+}
+AlphaText::~AlphaText()
+{
+}
+
+int AlphaText::handle_event()
+{
+ float min = OPACITY_MIN, max = OPACITY_MAX;
+ float output = atof(get_text());
+
+ if(output > max) output = max;
+ else if(output < min) output = min;
+ plugin->config.a = output;
+ window->alpha_slider->update(plugin->config.a);
+ window->alpha_text->update(plugin->config.a);
+ plugin->send_configure_change();
+ return 1;
+}
+