diff options
author | Daniel Salazar <zanqdo@gmail.com> | 2010-02-11 19:28:31 +0300 |
---|---|---|
committer | Daniel Salazar <zanqdo@gmail.com> | 2010-02-11 19:28:31 +0300 |
commit | 6286e415146f1325207f764b4b9f8c92996cc4a6 (patch) | |
tree | 3daecf6e71fc63400ae8978289a37b39c1f99481 /source | |
parent | 9ee81473f8ce2e08027a50c8b0f42c49fbc3499e (diff) |
Theme support for console background. Thx cam for help!
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/resources.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_console/space_console.c | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 6 |
4 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 785cb6384ac..02d8ae43d4f 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_BACK: + cp= ts->console_back; break; case TH_HANDLE_VERTEX: cp= ts->handle_vertex; @@ -621,6 +623,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_back, 0, 0, 0, 255); /* space sound */ diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index ea1d6667d11..4e9427de6f4 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -162,15 +162,14 @@ static void console_main_area_draw(const bContext *C, ARegion *ar) SpaceConsole *sc= CTX_wm_space_console(C); View2D *v2d= &ar->v2d; View2DScrollers *scrollers; - //float col[3]; + float col[3]; if((sc->type==CONSOLE_TYPE_PYTHON) && (sc->scrollback.first==NULL)) WM_operator_name_call((bContext *)C, "CONSOLE_OT_banner", WM_OP_EXEC_DEFAULT, NULL); /* clear and setup matrix */ - //UI_GetThemeColor3fv(TH_BACK, col); - //glClearColor(col[0], col[1], col[2], 0.0); - glClearColor(0, 0, 0, 1.0); + UI_GetThemeColor3fv(TH_BACK, col); + glClearColor(col[0], col[1], col[2], 1.0); glClear(GL_COLOR_BUFFER_BIT); console_update_rect(C, ar); diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index a83836fe15c..12ca52e7f4b 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], console_back[4]; // Console (todo - console_back) + char console_output[4], console_input[4], console_info[4], console_error[4], console_back[4]; char vertex_size, facedot_size; char bpad[2]; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index eff40cdbb36..64d4465c7e7 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -987,6 +987,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, "background", PROP_FLOAT, PROP_COLOR); + RNA_def_property_float_sdna(prop, NULL, "console_back"); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Background", ""); + RNA_def_property_update(prop, 0, "rna_userdef_update"); } static void rna_def_userdef_theme_space_info(BlenderRNA *brna) |