-ScopeVectGrats::ScopeVectGrats(ScopeGUI *gui, int x, int y)
- : BC_PopupMenu(x, y, _("Overlay"))
+ScopeSettingOn::ScopeSettingOn(ScopeSettings *settings, const char *text, int id)
+ : BC_MenuItem(text)
+{
+ this->settings = settings;
+ this->id = id;
+}
+
+int ScopeSettingOn::handle_event()
+{
+ int v = get_checked() ? 0 : 1;
+ set_checked(v);
+ ScopeGUI *gui = settings->gui;
+ switch( id ) {
+ case SCOPE_SMOOTH:
+ gui->use_smooth = v;
+ break;
+ case SCOPE_REFRESH:
+ gui->use_refresh = v;
+ break;
+ }
+ gui->toggle_event();
+ gui->update_toggles();
+ gui->update_scope();
+ gui->show_window();
+ return 1;
+}
+
+ScopeSettings::ScopeSettings(ScopeGUI *gui, int x, int y)
+ : BC_PopupMenu(x, y, xS(125), _("Settings"))