added editbox cursor color to config
This commit is contained in:
parent
2a5df8e433
commit
c9666d1151
@ -25,7 +25,7 @@ possible with fast streamlined development speed in mind.
|
||||
- Does NOT implement a font library
|
||||
Summary: It is only responsible for the actual user interface
|
||||
|
||||
## Target applications
|
||||
## Target applications/area
|
||||
- Graphical tools/editors
|
||||
- Library testbed UI
|
||||
- Game engine debugging UI
|
||||
|
@ -248,10 +248,11 @@ color_tab(struct gui_panel_layout *panel, struct control_window *control, struct
|
||||
static const char *labels[] = {"Text:", "Panel:", "Header:", "Border:", "Button:",
|
||||
"Button Border:", "Button Hovering:", "Button Toggle:", "Button Hovering Text:",
|
||||
"Check:", "Check BG:", "Check Active:", "Option:", "Option BG:", "Option Active:",
|
||||
"Slider:", "Slider cursor:", "Progress:", "Progress Cursor:", "Editbox:", "Editbox Border:",
|
||||
"Spinner:", "Spinner Border:", "Selector:", "Selector Border:", "Histo:", "Histo Bars:",
|
||||
"Histo Negative:", "Histo Hovering:", "Plot:", "Plot Lines:", "Plot Hightlight:",
|
||||
"Scrollbar:", "Scrollbar Cursor:", "Scrollbar Border:", "Table lines:", "Scaler:"
|
||||
"Slider:", "Slider cursor:", "Progress:", "Progress Cursor:", "Editbox:", "Editbox cursor:",
|
||||
"Editbox Border:", "Spinner:", "Spinner Border:", "Selector:", "Selector Border:",
|
||||
"Histo:", "Histo Bars:", "Histo Negative:", "Histo Hovering:", "Plot:", "Plot Lines:",
|
||||
"Plot Hightlight:", "Scrollbar:", "Scrollbar Cursor:", "Scrollbar Border:",
|
||||
"Table lines:", "Scaler:"
|
||||
};
|
||||
control->color_min = gui_panel_tab_begin(panel, &tab, "Color", control->color_min);
|
||||
if (control->picker_act) {
|
||||
|
3
gui.c
3
gui.c
@ -757,7 +757,7 @@ gui_edit_filtered(const struct gui_canvas *canvas, gui_float x, gui_float y, gui
|
||||
&buffer[offset], text_len, font, field->foreground, field->background);
|
||||
if (input_active && field->show_cursor) {
|
||||
canvas->draw_rect(canvas->userdata, label_x + (gui_float)text_width, label_y,
|
||||
(gui_float)cursor_width, label_h, field->background);
|
||||
(gui_float)cursor_width, label_h, field->cursor);
|
||||
}
|
||||
}
|
||||
*active = input_active;
|
||||
@ -1294,6 +1294,7 @@ gui_default_config(struct gui_config *config)
|
||||
col_load(config->colors[GUI_COLOR_PROGRESS], 100, 100, 100, 255);
|
||||
col_load(config->colors[GUI_COLOR_PROGRESS_CURSOR], 45, 45, 45, 255);
|
||||
col_load(config->colors[GUI_COLOR_INPUT], 45, 45, 45, 255);
|
||||
col_load(config->colors[GUI_COLOR_INPUT_CURSOR], 45, 45, 45, 255);
|
||||
col_load(config->colors[GUI_COLOR_INPUT_BORDER], 100, 100, 100, 255);
|
||||
col_load(config->colors[GUI_COLOR_SPINNER], 45, 45, 45, 255);
|
||||
col_load(config->colors[GUI_COLOR_SPINNER_BORDER], 100, 100, 100, 255);
|
||||
|
2
gui.h
2
gui.h
@ -168,6 +168,7 @@ enum gui_input_filter {
|
||||
struct gui_edit {
|
||||
struct gui_vec2 padding;
|
||||
gui_bool show_cursor;
|
||||
struct gui_color cursor;
|
||||
struct gui_color background;
|
||||
struct gui_color foreground;
|
||||
};
|
||||
@ -361,6 +362,7 @@ enum gui_panel_colors {
|
||||
GUI_COLOR_PROGRESS,
|
||||
GUI_COLOR_PROGRESS_CURSOR,
|
||||
GUI_COLOR_INPUT,
|
||||
GUI_COLOR_INPUT_CURSOR,
|
||||
GUI_COLOR_INPUT_BORDER,
|
||||
GUI_COLOR_SPINNER,
|
||||
GUI_COLOR_SPINNER_BORDER,
|
||||
|
Loading…
Reference in New Issue
Block a user