diff options
Diffstat (limited to 'release/scripts/ui/space_logic.py')
-rw-r--r-- | release/scripts/ui/space_logic.py | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/release/scripts/ui/space_logic.py b/release/scripts/ui/space_logic.py index 07b26fdc862..a01a5ce6305 100644 --- a/release/scripts/ui/space_logic.py +++ b/release/scripts/ui/space_logic.py @@ -35,20 +35,31 @@ class LOGIC_PT_properties(bpy.types.Panel): ob = context.active_object game = ob.game - layout.operator("object.game_property_new", text="Add Game Property") + layout.operator("object.game_property_new", text="Add Game Property", icon='ZOOMIN') for i, prop in enumerate(game.properties): - row = layout.row(align=True) + box = layout.box() + row = box.row() row.prop(prop, "name", text="") row.prop(prop, "type", text="") row.prop(prop, "value", text="", toggle=True) # we dont care about the type. rna will display correctly row.prop(prop, "debug", text="", toggle=True, icon='INFO') - row.operator("object.game_property_remove", text="", icon='X').index = i + row.operator("object.game_property_remove", text="", icon='X', emboss=False).index = i +class LOGIC_MT_logicbricks_add(bpy.types.Menu): + bl_label = "Add" + + def draw(self, context): + layout = self.layout + + layout.operator_menu_enum("logic.sensor_add", "type", text="Sensor") + layout.operator_menu_enum("logic.controller_add", "type", text="Controller") + layout.operator_menu_enum("logic.actuator_add", "type", text="Actuator") + classes = [ - LOGIC_PT_properties] + LOGIC_PT_properties, LOGIC_MT_logicbricks_add] def register(): |