Move from function pointers to std::function

This commit is contained in:
2024-08-19 01:07:52 +02:00
parent 45aa67473f
commit d257dc154f
9 changed files with 15 additions and 23 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ UI_checkbox::UI_checkbox()
{
}
UI_checkbox::UI_checkbox(std::string id, std::string text, Color fg_color, Color bg_color, std::vector<std::string> options, UI_checkbox_on_change on_change)
UI_checkbox::UI_checkbox(std::string id, std::string text, Color fg_color, Color bg_color, std::vector<std::string> options, std::function<void(std::string, std::vector<std::string>)> on_change)
: UI_x_boxes(id, UI_CHECKBOX_TYPE, text, fg_color, bg_color, options), p_selected(), p_on_change(on_change)
{
}