Vultraz

Untitled

Jan 12th, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1.     connect_signal_mouse_left_click(
  2.             find_widget<ttoggle_button>(&window, "show_floating_labels", false),
  3.             boost::bind(
  4.                   &tpreferences::simple_toggle_callback
  5.                 , this, "show_floating_labels"
  6.                 , preferences::set_show_floating_labels, boost::ref(window)));
  7.  
  8. template <typename T>
  9. void tpreferences::simple_toggle_callback(const std::string& widget,
  10.         void (*setter) (T), twindow& window)
  11. {
  12.     const T value = find_widget<ttoggle_button>(&window, widget, false).get_value_bool();
  13.     setter(value);
  14. }
  15.  
  16.  
  17.  
  18. ERRORS
  19. C:\Users\Charles\Documents\wesnoth-git\src\gui\dialogs\preferences_dialog.cpp|101|error: no matching function for call to 'bind(<unresolved overloaded function type>, gui2::tpreferences*, const char [21], void (&)(bool), const boost::reference_wrapper<gui2::twindow>)'|
Advertisement
Add Comment
Please, Sign In to add comment