From 6753411adb54458ee87deda25ca662e0689f676d Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Mon, 15 Feb 2010 02:39:40 +0000 Subject: Console: * Added own theme support for the cursor, was depending on the line_error color before. --- source/blender/editors/include/UI_resources.h | 1 + source/blender/editors/interface/resources.c | 3 +++ source/blender/editors/space_console/console_draw.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 6d9eee62601..2f908559c6c 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -189,6 +189,7 @@ enum { TH_CONSOLE_INPUT, TH_CONSOLE_INFO, TH_CONSOLE_ERROR, + TH_CONSOLE_CURSOR, TH_SEQ_MOVIE, TH_SEQ_IMAGE, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 00c6e796f8c..f86ffe657cc 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -353,6 +353,8 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) cp= ts->console_info; break; case TH_CONSOLE_ERROR: cp= ts->console_error; break; + case TH_CONSOLE_CURSOR: + cp= ts->console_cursor; break; case TH_HANDLE_VERTEX: cp= ts->handle_vertex; @@ -622,6 +624,7 @@ void ui_theme_init_userdef(void) SETCOL(btheme->tconsole.console_input, 255, 255, 255, 255); SETCOL(btheme->tconsole.console_info, 0, 170, 0, 255); SETCOL(btheme->tconsole.console_error, 220, 96, 96, 255); + SETCOL(btheme->tconsole.console_cursor, 220, 96, 96, 255); /* space sound */ diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c index 5beb7ff22c9..16f5f47075e 100644 --- a/source/blender/editors/space_console/console_draw.c +++ b/source/blender/editors/space_console/console_draw.c @@ -331,7 +331,7 @@ static int console_text_main__internal(struct SpaceConsole *sc, struct ARegion * BLF_draw(cl->line); /* cursor */ - console_line_color(fg, CONSOLE_LINE_ERROR); /* lazy */ + UI_GetThemeColor3ubv(TH_CONSOLE_CURSOR, (char *)fg); glColor3ub(fg[0], fg[1], fg[2]); glRecti(xy[0]+(cwidth*cl->cursor) -1, xy[1]-2, xy[0]+(cwidth*cl->cursor) +1, xy[1]+sc->lheight-2); -- cgit v1.2.3