diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-07-04 23:00:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-07-04 23:00:56 +0400 |
commit | 107b78a3d2b1a37f91b1e46511a3ea29f7f5cbbf (patch) | |
tree | fbd691e8bb0b3fc899fa88354f1ce7bd3db70a02 /source/blender | |
parent | 733b4c935139577444d06d9f99a560107b4c587e (diff) |
Made some python game engine funcs use NOARGS, getAxisVec was using wrong multiplication order.
Use BUT_TOGDUAL for controllers init states so you can see what the init state is for any controller without using the button to check.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/src/buttons_logic.c | 4 | ||||
-rw-r--r-- | source/blender/src/interface_draw.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c index be8483b7e04..cb09f947f3c 100644 --- a/source/blender/src/buttons_logic.c +++ b/source/blender/src/buttons_logic.c @@ -3164,11 +3164,11 @@ void logic_buts(void) for (offset=0; offset<15; offset+=5) { uiBlockBeginAlign(block); for (stbit=0; stbit<5; stbit++) { - but = uiDefButBitI(block, TOG, 1<<(stbit+offset), stbit+offset, "", (short)(xco+35+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset))); + but = uiDefButBitI(block, BUT_TOGDUAL, 1<<(stbit+offset), stbit+offset, "", (short)(xco+35+12*stbit+13*offset), yco, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset))); uiButSetFunc(but, check_object_state, but, &(ob->state)); } for (stbit=0; stbit<5; stbit++) { - but = uiDefButBitI(block, TOG, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); + but = uiDefButBitI(block, BUT_TOGDUAL, 1<<(stbit+offset+15), stbit+offset+15, "", (short)(xco+35+12*stbit+13*offset), yco-12, 12, 12, (int *)&(ob->state), 0, 0, 0, 0, get_state_name(ob, (short)(stbit+offset+15))); uiButSetFunc(but, check_object_state, but, &(ob->state)); } } diff --git a/source/blender/src/interface_draw.c b/source/blender/src/interface_draw.c index 83f1221b1fb..e7041e60003 100644 --- a/source/blender/src/interface_draw.c +++ b/source/blender/src/interface_draw.c @@ -180,8 +180,12 @@ static void ui_draw_icon(uiBut *but, BIFIconID icon, int blend) height= ICON_HEIGHT; if(but->flag & UI_ICON_LEFT) { - if (but->type==BUT_TOGDUAL && but->drawstr[0]) { - xs= but->x1-1.0; + if (but->type==BUT_TOGDUAL) { + if (but->drawstr[0]) { + xs= but->x1-1.0; + } else { + xs= (but->x1+but->x2- height)/2.0; + } } else if (but->type==BUTM ) { xs= but->x1+1.0; |