diff options
author | Ton Roosendaal <ton@blender.org> | 2009-06-16 17:09:36 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-06-16 17:09:36 +0400 |
commit | 2d40b8d56ff100b71dac7c4694f6115dcc0b01b5 (patch) | |
tree | e6ad74b116dccf3442290ba4a76bd314729bce6b /source/blender/editors/interface/resources.c | |
parent | 7d026421142306dee486628bd15d4f5aa2b77481 (diff) |
2.5
Added SpaceLogic, to restore the old logic buttons into.
In future it can be used for a more advanced logic editor, with
states, behaviour, whatever. We'll see!
This commit only adds the backend for new space. Committed this
now as reference for when we need another space type. It's still
not well plugin-able (dynamic space types), but my idea is to just
have a new SpacePlugIn for this, with a neat small API to define
all relevant callbacks.
Also note the icon for the spacetype is wrong still.
Diffstat (limited to 'source/blender/editors/interface/resources.c')
-rw-r--r-- | source/blender/editors/interface/resources.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index edf2f160285..da0f66af02e 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -156,6 +156,9 @@ char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case SPACE_NODE: ts= &btheme->tnode; break; + case SPACE_LOGIC: + ts= &btheme->tlogic; + break; default: ts= &btheme->tv3d; break; @@ -398,6 +401,7 @@ static void ui_theme_init_new(bTheme *btheme) ui_theme_init_new_do(&btheme->toops); ui_theme_init_new_do(&btheme->ttime); ui_theme_init_new_do(&btheme->tnode); + ui_theme_init_new_do(&btheme->tlogic); } @@ -608,6 +612,9 @@ void ui_theme_init_userdef(void) SETCOL(btheme->tnode.syntaxv, 142, 138, 145, 255); /* generator */ SETCOL(btheme->tnode.syntaxc, 120, 145, 120, 255); /* group */ + /* space logic */ + btheme->tlogic= btheme->tv3d; + } @@ -1233,6 +1240,12 @@ void init_userdef_do_versions(void) if(btheme->tui.wcol_num.outline[3]==0) ui_widget_color_init(&btheme->tui); + + /* Logic editor theme, check for alpha==0 is safe, then color was never set */ + if(btheme->tlogic.syntaxn[3]==0) { + /* re-uses syntax color storage */ + btheme->tlogic= btheme->tv3d; + } } } |