SwapConfig::SwapConfig()
+{
+ reset_Config();
+}
+
+void SwapConfig::reset_Config()
{
red = RED_SRC;
green = GREEN_SRC;
blue = BLUE_SRC;
- alpha = ALPHA_SRC;
+ alpha = ALPHA_SRC;
}
SwapWindow::SwapWindow(SwapMain *plugin)
: PluginClientWindow(plugin,
250,
- 170,
+ 200,
250,
- 170,
+ 200,
0)
{
this->plugin = plugin;
add_subwindow(alpha = new SwapMenu(plugin, &(plugin->config.alpha), x, y));
alpha->create_objects();
+ y += 40;
+ add_subwindow(reset = new SwapReset(plugin, this, x, y));
+
show_window();
flush();
}
-
SwapMenu::SwapMenu(SwapMain *client, int *output, int x, int y)
: BC_PopupMenu(x, y, 150, client->output_to_text(*output))
{
-
+SwapReset::SwapReset(SwapMain *plugin, SwapWindow *gui, int x, int y)
+ : BC_GenericButton(x, y, _("Reset"))
+{
+ this->plugin = plugin;
+ this->gui = gui;
+}
+SwapReset::~SwapReset()
+{
+}
+int SwapReset::handle_event()
+{
+ plugin->config.reset_Config();
+ plugin->send_configure_change();
+ plugin->update_gui();
+ return 1;
+}