diff options
author | Thomas Dinges <blender@dingto.org> | 2010-02-15 05:39:40 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2010-02-15 05:39:40 +0300 |
commit | 6753411adb54458ee87deda25ca662e0689f676d (patch) | |
tree | fef593cad1b62c6b4aa9a7aac209b0c9acf1a1f5 /source/blender | |
parent | 9f7a4125118c19e39dd80828db041283599d2189 (diff) |
Console:
* Added own theme support for the cursor, was depending on the line_error color before.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 1 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_console/console_draw.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 6 |
5 files changed, 12 insertions, 2 deletions
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); diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 5bcb7b20104..a66a6fb9408 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -202,7 +202,7 @@ typedef struct ThemeSpace { char cframe[4]; char ds_channel[4], ds_subchannel[4]; // dopesheet - char console_output[4], console_input[4], console_info[4], console_error[4]; + char console_output[4], console_input[4], console_info[4], console_error[4], console_cursor[4]; char vertex_size, facedot_size; char bpad[6]; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 84325e39740..b6e50734b67 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -1003,6 +1003,12 @@ static void rna_def_userdef_theme_space_console(BlenderRNA *brna) RNA_def_property_array(prop, 3); RNA_def_property_ui_text(prop, "Line Error", ""); RNA_def_property_update(prop, 0, "rna_userdef_update"); + + prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR); + RNA_def_property_float_sdna(prop, NULL, "console_cursor"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Cursor", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); } static void rna_def_userdef_theme_space_info(BlenderRNA *brna) |