1 #include "bcdisplayinfo.h"
2 #include "timeavgwindow.h"
6 #define _(String) gettext(String)
7 #define gettext_noop(String) String
8 #define N_(String) gettext_noop (String)
10 PLUGIN_THREAD_OBJECT(TimeAvgMain, TimeAvgThread, TimeAvgWindow)
16 TimeAvgWindow::TimeAvgWindow(TimeAvgMain *client, int x, int y)
17 : BC_Window(client->gui_string,
28 this->client = client;
31 TimeAvgWindow::~TimeAvgWindow()
35 int TimeAvgWindow::create_objects()
38 add_tool(new BC_Title(x, y, _("Frames to average")));
40 add_tool(total_frames = new TimeAvgSlider(client, x, y));
46 WINDOW_CLOSE_EVENT(TimeAvgWindow)
48 TimeAvgSlider::TimeAvgSlider(TimeAvgMain *client, int x, int y)
56 client->config.frames)
58 this->client = client;
60 TimeAvgSlider::~TimeAvgSlider()
63 int TimeAvgSlider::handle_event()
65 int result = get_value();
66 if(result < 1) result = 1;
67 client->config.frames = result;
68 client->send_configure_change();