diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2010-07-15 03:51:21 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2010-07-15 03:51:21 +0400 |
commit | 4242baa704a516400a415f4f05b3e908cc41ea27 (patch) | |
tree | 7bc0a5db4b061e0baecfcd7731edd8b28326cd64 /source/blender/editors | |
parent | 0980f2555f565bfac0958483da76b7e75e8921e5 (diff) |
Logic UI: Changing Controllers names to follow Sensors and actuators (back to have only the first latter capitalized) + change the controller state only when in expanded mode (show the number otherwise).
Cosmetic commit, no structural/big code changes (patch by dfelinto).
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_logic/logic_window.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 005ebfb5b88..c4a42d89758 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -644,17 +644,17 @@ static char *controller_name(int type) { switch (type) { case CONT_LOGIC_AND: - return "AND"; + return "And"; case CONT_LOGIC_OR: - return "OR"; + return "Or"; case CONT_LOGIC_NAND: - return "NAND"; + return "Nand"; case CONT_LOGIC_NOR: - return "NOR"; + return "Nor"; case CONT_LOGIC_XOR: - return "XOR"; + return "Xor"; case CONT_LOGIC_XNOR: - return "XNOR"; + return "Xnor"; case CONT_EXPRESSION: return "Expression"; case CONT_PYTHON: @@ -3537,7 +3537,8 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i uiLayout *box, *row, *subrow; bController *cont= (bController *)ptr->data; - char name[3]; //XXX provisorly for state number + char state[3]; + sprintf(state, "%d", RNA_int_get(ptr, "state")); box= uiLayoutBox(layout); row= uiLayoutRow(box, 0); @@ -3546,15 +3547,14 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i if(RNA_boolean_get(ptr, "expanded")) { uiItemR(row, ptr, "type", 0, "", 0); uiItemR(row, ptr, "name", 0, "", 0); + /* XXX provisory for Blender 2.50Beta */ + uiDefBlockBut(uiLayoutGetBlock(layout), controller_state_mask_menu, cont, state, (short)(xco+width-44), yco, 22+22, UI_UNIT_Y, "Set controller state index (from 1 to 30)"); } else { uiItemL(row, controller_name(cont->type), 0); uiItemL(row, cont->name, 0); + uiItemL(row, state, 0); } - /* XXX provisory for Blender 2.50Beta */ - sprintf(name, "%d", RNA_int_get(ptr, "state")); - uiDefBlockBut(uiLayoutGetBlock(layout), controller_state_mask_menu, cont, name, (short)(xco+width-44), yco, 22+22, UI_UNIT_Y, "Set controller state index (from 1 to 30)"); - uiItemR(row, ptr, "priority", 0, "", 0); if(RNA_boolean_get(ptr, "expanded")==0) { |