diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-09-01 19:08:32 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-09-01 19:08:32 +0400 |
commit | 981f7fcd0d315abb425bf34dd37f7cd4d9e8d55e (patch) | |
tree | 70800c93ec1a12579c32874e2a72eaf3290eba8e /release/scripts/startup/bl_ui/space_logic.py | |
parent | 5b91a783cf0ec132398a2767d3419d675e5126b5 (diff) | |
parent | 2365c64014b3e067bb212b2061f1d14c1f944090 (diff) |
merge with trunk r39834
Diffstat (limited to 'release/scripts/startup/bl_ui/space_logic.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_logic.py | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/release/scripts/startup/bl_ui/space_logic.py b/release/scripts/startup/bl_ui/space_logic.py index da4161cd88c..38b63823ff3 100644 --- a/release/scripts/startup/bl_ui/space_logic.py +++ b/release/scripts/startup/bl_ui/space_logic.py @@ -18,10 +18,11 @@ # <pep8 compliant> import bpy +from bpy.types import Header, Menu, Panel from blf import gettext as _ -class LOGIC_PT_properties(bpy.types.Panel): +class LOGIC_PT_properties(Panel): bl_space_type = 'LOGIC_EDITOR' bl_region_type = 'UI' bl_label = _("Properties") @@ -50,7 +51,7 @@ class LOGIC_PT_properties(bpy.types.Panel): row.operator("object.game_property_remove", text="", icon='X', emboss=False).index = i -class LOGIC_MT_logicbricks_add(bpy.types.Menu): +class LOGIC_MT_logicbricks_add(Menu): bl_label = _("Add") def draw(self, context): @@ -61,30 +62,24 @@ class LOGIC_MT_logicbricks_add(bpy.types.Menu): layout.operator_menu_enum("logic.actuator_add", "type", text=_("Actuator")) -class LOGIC_HT_header(bpy.types.Header): +class LOGIC_HT_header(Header): bl_space_type = 'LOGIC_EDITOR' def draw(self, context): - layout = self.layout + layout = self.layout.row(align=True) - row = layout.row(align=True) - row.template_header() + layout.template_header() if context.area.show_menus: - sub = row.row(align=True) - sub.menu("LOGIC_MT_view") - #sub.menu("LOGIC_MT_select") - #sub.menu("LOGIC_MT_add") + layout.menu("LOGIC_MT_view") -class LOGIC_MT_view(bpy.types.Menu): +class LOGIC_MT_view(Menu): bl_label = _("View") def draw(self, context): layout = self.layout - layout.column() - layout.operator("logic.properties", icon='MENU_PANEL') if __name__ == "__main__": # only for live edit. |