b fix warnings generated from previous commit

This commit is contained in:
2024-08-18 22:05:09 +02:00
parent ade502e221
commit 2616ffbf21
4 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ UI_combobox::UI_combobox()
{
}
UI_combobox::UI_combobox(std::string id, std::string text, Color fg_color, Color bg_color, std::vector<std::string> options, int selected, UI_combobox_on_change on_change)
UI_combobox::UI_combobox(std::string id, std::string text, Color fg_color, Color bg_color, std::vector<std::string> options, size_t selected, UI_combobox_on_change on_change)
: UI_x_boxes(id, UI_COMBOBOX_TYPE, text, fg_color, bg_color, options), p_selected(selected), p_on_change(on_change)
{
}
+2 -2
View File
@@ -4,13 +4,13 @@
#include "UI_x_boxes.hpp"
#define UI_COMBOBOX_TYPE std::string("UIcombobox")
typedef void (*UI_combobox_on_change) (std::string id, int selected);
typedef void (*UI_combobox_on_change) (std::string id, size_t selected);
class UI_combobox : public UI_x_boxes
{
public:
UI_combobox();
UI_combobox(std::string id, std::string text, Color fg_color, Color bg_color, std::vector<std::string> options, int selected, UI_combobox_on_change on_change = nullptr);
UI_combobox(std::string id, std::string text, Color fg_color, Color bg_color, std::vector<std::string> options, size_t selected, UI_combobox_on_change on_change = nullptr);
UI_combobox(std::string id, std::string text, Color fg_color, Color bg_color, std::vector<std::string> options, UI_combobox_on_change on_change = nullptr);
UI_combobox(const json& j);