[nk] move function to nk_menu
This commit is contained in:
parent
8ce0f9cf0a
commit
9777ea933f
|
@ -283,130 +283,3 @@ void nk_common_mem_free(nk_handle unused, void *ptr)
|
|||
free(ptr);
|
||||
}
|
||||
|
||||
void nk_common_set_style(struct nk_context *ctx, enum theme theme)
|
||||
{
|
||||
struct nk_color table[NK_COLOR_COUNT];
|
||||
if (theme == THEME_WHITE) {
|
||||
table[NK_COLOR_TEXT] = nk_rgba(70, 70, 70, 255);
|
||||
table[NK_COLOR_WINDOW] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_HEADER] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_BORDER] = nk_rgba(0, 0, 0, 255);
|
||||
table[NK_COLOR_BUTTON] = nk_rgba(185, 185, 185, 255);
|
||||
table[NK_COLOR_BUTTON_HOVER] = nk_rgba(170, 170, 170, 255);
|
||||
table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(160, 160, 160, 255);
|
||||
table[NK_COLOR_TOGGLE] = nk_rgba(150, 150, 150, 255);
|
||||
table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(120, 120, 120, 255);
|
||||
table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_SELECT] = nk_rgba(190, 190, 190, 255);
|
||||
table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_SLIDER] = nk_rgba(190, 190, 190, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(80, 80, 80, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(70, 70, 70, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(60, 60, 60, 255);
|
||||
table[NK_COLOR_PROPERTY] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_EDIT] = nk_rgba(150, 150, 150, 255);
|
||||
table[NK_COLOR_EDIT_CURSOR] = nk_rgba(0, 0, 0, 255);
|
||||
table[NK_COLOR_COMBO] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_CHART] = nk_rgba(160, 160, 160, 255);
|
||||
table[NK_COLOR_CHART_COLOR] = nk_rgba(45, 45, 45, 255);
|
||||
table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255);
|
||||
table[NK_COLOR_SCROLLBAR] = nk_rgba(180, 180, 180, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(140, 140, 140, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(150, 150, 150, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(160, 160, 160, 255);
|
||||
table[NK_COLOR_TAB_HEADER] = nk_rgba(180, 180, 180, 255);
|
||||
nk_style_from_table(ctx, table);
|
||||
} else if (theme == THEME_RED) {
|
||||
table[NK_COLOR_TEXT] = nk_rgba(190, 190, 190, 255);
|
||||
table[NK_COLOR_WINDOW] = nk_rgba(30, 33, 40, 215);
|
||||
table[NK_COLOR_HEADER] = nk_rgba(181, 45, 69, 220);
|
||||
table[NK_COLOR_BORDER] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_BUTTON] = nk_rgba(181, 45, 69, 255);
|
||||
table[NK_COLOR_BUTTON_HOVER] = nk_rgba(190, 50, 70, 255);
|
||||
table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(195, 55, 75, 255);
|
||||
table[NK_COLOR_TOGGLE] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(45, 60, 60, 255);
|
||||
table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(181, 45, 69, 255);
|
||||
table[NK_COLOR_SELECT] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(181, 45, 69, 255);
|
||||
table[NK_COLOR_SLIDER] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(181, 45, 69, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(186, 50, 74, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(191, 55, 79, 255);
|
||||
table[NK_COLOR_PROPERTY] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_EDIT] = nk_rgba(51, 55, 67, 225);
|
||||
table[NK_COLOR_EDIT_CURSOR] = nk_rgba(190, 190, 190, 255);
|
||||
table[NK_COLOR_COMBO] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_CHART] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_CHART_COLOR] = nk_rgba(170, 40, 60, 255);
|
||||
table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255);
|
||||
table[NK_COLOR_SCROLLBAR] = nk_rgba(30, 33, 40, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(64, 84, 95, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(70, 90, 100, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(75, 95, 105, 255);
|
||||
table[NK_COLOR_TAB_HEADER] = nk_rgba(181, 45, 69, 220);
|
||||
nk_style_from_table(ctx, table);
|
||||
} else if (theme == THEME_BLUE) {
|
||||
table[NK_COLOR_TEXT] = nk_rgba(20, 20, 20, 255);
|
||||
table[NK_COLOR_WINDOW] = nk_rgba(202, 212, 214, 215);
|
||||
table[NK_COLOR_HEADER] = nk_rgba(137, 182, 224, 220);
|
||||
table[NK_COLOR_BORDER] = nk_rgba(140, 159, 173, 255);
|
||||
table[NK_COLOR_BUTTON] = nk_rgba(137, 182, 224, 255);
|
||||
table[NK_COLOR_BUTTON_HOVER] = nk_rgba(142, 187, 229, 255);
|
||||
table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(147, 192, 234, 255);
|
||||
table[NK_COLOR_TOGGLE] = nk_rgba(177, 210, 210, 255);
|
||||
table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(182, 215, 215, 255);
|
||||
table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(137, 182, 224, 255);
|
||||
table[NK_COLOR_SELECT] = nk_rgba(177, 210, 210, 255);
|
||||
table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(137, 182, 224, 255);
|
||||
table[NK_COLOR_SLIDER] = nk_rgba(177, 210, 210, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(137, 182, 224, 245);
|
||||
table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(142, 188, 229, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(147, 193, 234, 255);
|
||||
table[NK_COLOR_PROPERTY] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_EDIT] = nk_rgba(210, 210, 210, 225);
|
||||
table[NK_COLOR_EDIT_CURSOR] = nk_rgba(20, 20, 20, 255);
|
||||
table[NK_COLOR_COMBO] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_CHART] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_CHART_COLOR] = nk_rgba(137, 182, 224, 255);
|
||||
table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255);
|
||||
table[NK_COLOR_SCROLLBAR] = nk_rgba(190, 200, 200, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(64, 84, 95, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(70, 90, 100, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(75, 95, 105, 255);
|
||||
table[NK_COLOR_TAB_HEADER] = nk_rgba(156, 193, 220, 255);
|
||||
nk_style_from_table(ctx, table);
|
||||
} else if (theme == THEME_DARK) {
|
||||
table[NK_COLOR_TEXT] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_WINDOW] = nk_rgba(57, 67, 71, 215);
|
||||
table[NK_COLOR_HEADER] = nk_rgba(51, 51, 56, 220);
|
||||
table[NK_COLOR_BORDER] = nk_rgba(46, 46, 46, 255);
|
||||
table[NK_COLOR_BUTTON] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_BUTTON_HOVER] = nk_rgba(58, 93, 121, 255);
|
||||
table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(63, 98, 126, 255);
|
||||
table[NK_COLOR_TOGGLE] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(45, 53, 56, 255);
|
||||
table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_SELECT] = nk_rgba(57, 67, 61, 255);
|
||||
table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_SLIDER] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(48, 83, 111, 245);
|
||||
table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(53, 88, 116, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(58, 93, 121, 255);
|
||||
table[NK_COLOR_PROPERTY] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_EDIT] = nk_rgba(50, 58, 61, 225);
|
||||
table[NK_COLOR_EDIT_CURSOR] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_COMBO] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_CHART] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_CHART_COLOR] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba(255, 0, 0, 255);
|
||||
table[NK_COLOR_SCROLLBAR] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(53, 88, 116, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(58, 93, 121, 255);
|
||||
table[NK_COLOR_TAB_HEADER] = nk_rgba(48, 83, 111, 255);
|
||||
nk_style_from_table(ctx, table);
|
||||
} else {
|
||||
nk_style_default(ctx);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,6 +86,4 @@ void nk_common_mem_free(nk_handle unused, void *ptr);
|
|||
|
||||
void device_upload_atlas(struct nk_device *dev, const void *image, int width, int height);
|
||||
|
||||
void nk_common_set_style(struct nk_context *ctx, enum theme theme);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -35,3 +35,132 @@ void nk_wnd_get_state(nk_menu_handle_t *nk, const int id,
|
|||
*pos = nk->window[id].position;
|
||||
*size = nk->window[id].size;
|
||||
}
|
||||
|
||||
/* sets the theme */
|
||||
void nk_common_set_style(struct nk_context *ctx, enum theme theme)
|
||||
{
|
||||
struct nk_color table[NK_COLOR_COUNT];
|
||||
if (theme == THEME_WHITE) {
|
||||
table[NK_COLOR_TEXT] = nk_rgba(70, 70, 70, 255);
|
||||
table[NK_COLOR_WINDOW] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_HEADER] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_BORDER] = nk_rgba(0, 0, 0, 255);
|
||||
table[NK_COLOR_BUTTON] = nk_rgba(185, 185, 185, 255);
|
||||
table[NK_COLOR_BUTTON_HOVER] = nk_rgba(170, 170, 170, 255);
|
||||
table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(160, 160, 160, 255);
|
||||
table[NK_COLOR_TOGGLE] = nk_rgba(150, 150, 150, 255);
|
||||
table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(120, 120, 120, 255);
|
||||
table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_SELECT] = nk_rgba(190, 190, 190, 255);
|
||||
table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_SLIDER] = nk_rgba(190, 190, 190, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(80, 80, 80, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(70, 70, 70, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(60, 60, 60, 255);
|
||||
table[NK_COLOR_PROPERTY] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_EDIT] = nk_rgba(150, 150, 150, 255);
|
||||
table[NK_COLOR_EDIT_CURSOR] = nk_rgba(0, 0, 0, 255);
|
||||
table[NK_COLOR_COMBO] = nk_rgba(175, 175, 175, 255);
|
||||
table[NK_COLOR_CHART] = nk_rgba(160, 160, 160, 255);
|
||||
table[NK_COLOR_CHART_COLOR] = nk_rgba(45, 45, 45, 255);
|
||||
table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255);
|
||||
table[NK_COLOR_SCROLLBAR] = nk_rgba(180, 180, 180, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(140, 140, 140, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(150, 150, 150, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(160, 160, 160, 255);
|
||||
table[NK_COLOR_TAB_HEADER] = nk_rgba(180, 180, 180, 255);
|
||||
nk_style_from_table(ctx, table);
|
||||
} else if (theme == THEME_RED) {
|
||||
table[NK_COLOR_TEXT] = nk_rgba(190, 190, 190, 255);
|
||||
table[NK_COLOR_WINDOW] = nk_rgba(30, 33, 40, 215);
|
||||
table[NK_COLOR_HEADER] = nk_rgba(181, 45, 69, 220);
|
||||
table[NK_COLOR_BORDER] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_BUTTON] = nk_rgba(181, 45, 69, 255);
|
||||
table[NK_COLOR_BUTTON_HOVER] = nk_rgba(190, 50, 70, 255);
|
||||
table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(195, 55, 75, 255);
|
||||
table[NK_COLOR_TOGGLE] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(45, 60, 60, 255);
|
||||
table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(181, 45, 69, 255);
|
||||
table[NK_COLOR_SELECT] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(181, 45, 69, 255);
|
||||
table[NK_COLOR_SLIDER] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(181, 45, 69, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(186, 50, 74, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(191, 55, 79, 255);
|
||||
table[NK_COLOR_PROPERTY] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_EDIT] = nk_rgba(51, 55, 67, 225);
|
||||
table[NK_COLOR_EDIT_CURSOR] = nk_rgba(190, 190, 190, 255);
|
||||
table[NK_COLOR_COMBO] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_CHART] = nk_rgba(51, 55, 67, 255);
|
||||
table[NK_COLOR_CHART_COLOR] = nk_rgba(170, 40, 60, 255);
|
||||
table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255);
|
||||
table[NK_COLOR_SCROLLBAR] = nk_rgba(30, 33, 40, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(64, 84, 95, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(70, 90, 100, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(75, 95, 105, 255);
|
||||
table[NK_COLOR_TAB_HEADER] = nk_rgba(181, 45, 69, 220);
|
||||
nk_style_from_table(ctx, table);
|
||||
} else if (theme == THEME_BLUE) {
|
||||
table[NK_COLOR_TEXT] = nk_rgba(20, 20, 20, 255);
|
||||
table[NK_COLOR_WINDOW] = nk_rgba(202, 212, 214, 215);
|
||||
table[NK_COLOR_HEADER] = nk_rgba(137, 182, 224, 220);
|
||||
table[NK_COLOR_BORDER] = nk_rgba(140, 159, 173, 255);
|
||||
table[NK_COLOR_BUTTON] = nk_rgba(137, 182, 224, 255);
|
||||
table[NK_COLOR_BUTTON_HOVER] = nk_rgba(142, 187, 229, 255);
|
||||
table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(147, 192, 234, 255);
|
||||
table[NK_COLOR_TOGGLE] = nk_rgba(177, 210, 210, 255);
|
||||
table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(182, 215, 215, 255);
|
||||
table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(137, 182, 224, 255);
|
||||
table[NK_COLOR_SELECT] = nk_rgba(177, 210, 210, 255);
|
||||
table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(137, 182, 224, 255);
|
||||
table[NK_COLOR_SLIDER] = nk_rgba(177, 210, 210, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(137, 182, 224, 245);
|
||||
table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(142, 188, 229, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(147, 193, 234, 255);
|
||||
table[NK_COLOR_PROPERTY] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_EDIT] = nk_rgba(210, 210, 210, 225);
|
||||
table[NK_COLOR_EDIT_CURSOR] = nk_rgba(20, 20, 20, 255);
|
||||
table[NK_COLOR_COMBO] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_CHART] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_CHART_COLOR] = nk_rgba(137, 182, 224, 255);
|
||||
table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba( 255, 0, 0, 255);
|
||||
table[NK_COLOR_SCROLLBAR] = nk_rgba(190, 200, 200, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(64, 84, 95, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(70, 90, 100, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(75, 95, 105, 255);
|
||||
table[NK_COLOR_TAB_HEADER] = nk_rgba(156, 193, 220, 255);
|
||||
nk_style_from_table(ctx, table);
|
||||
} else if (theme == THEME_DARK) {
|
||||
table[NK_COLOR_TEXT] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_WINDOW] = nk_rgba(57, 67, 71, 215);
|
||||
table[NK_COLOR_HEADER] = nk_rgba(51, 51, 56, 220);
|
||||
table[NK_COLOR_BORDER] = nk_rgba(46, 46, 46, 255);
|
||||
table[NK_COLOR_BUTTON] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_BUTTON_HOVER] = nk_rgba(58, 93, 121, 255);
|
||||
table[NK_COLOR_BUTTON_ACTIVE] = nk_rgba(63, 98, 126, 255);
|
||||
table[NK_COLOR_TOGGLE] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_TOGGLE_HOVER] = nk_rgba(45, 53, 56, 255);
|
||||
table[NK_COLOR_TOGGLE_CURSOR] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_SELECT] = nk_rgba(57, 67, 61, 255);
|
||||
table[NK_COLOR_SELECT_ACTIVE] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_SLIDER] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR] = nk_rgba(48, 83, 111, 245);
|
||||
table[NK_COLOR_SLIDER_CURSOR_HOVER] = nk_rgba(53, 88, 116, 255);
|
||||
table[NK_COLOR_SLIDER_CURSOR_ACTIVE] = nk_rgba(58, 93, 121, 255);
|
||||
table[NK_COLOR_PROPERTY] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_EDIT] = nk_rgba(50, 58, 61, 225);
|
||||
table[NK_COLOR_EDIT_CURSOR] = nk_rgba(210, 210, 210, 255);
|
||||
table[NK_COLOR_COMBO] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_CHART] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_CHART_COLOR] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_CHART_COLOR_HIGHLIGHT] = nk_rgba(255, 0, 0, 255);
|
||||
table[NK_COLOR_SCROLLBAR] = nk_rgba(50, 58, 61, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR] = nk_rgba(48, 83, 111, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_HOVER] = nk_rgba(53, 88, 116, 255);
|
||||
table[NK_COLOR_SCROLLBAR_CURSOR_ACTIVE] = nk_rgba(58, 93, 121, 255);
|
||||
table[NK_COLOR_TAB_HEADER] = nk_rgba(48, 83, 111, 255);
|
||||
nk_style_from_table(ctx, table);
|
||||
} else {
|
||||
nk_style_default(ctx);
|
||||
}
|
||||
}
|
|
@ -93,5 +93,6 @@ void nk_wnd_set_state(nk_menu_handle_t *nk, const int id,
|
|||
struct nk_vec2 pos, struct nk_vec2 size);
|
||||
void nk_wnd_get_state(nk_menu_handle_t *nk, const int id,
|
||||
struct nk_vec2 *pos, struct nk_vec2 *size);
|
||||
void nk_common_set_style(struct nk_context *ctx, enum theme theme);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue