WM: empty menu so addons can extend the splash

This commit is contained in:
Campbell Barton
2015-02-01 04:15:34 +11:00
parent 595675ea7a
commit 26f9a92453
2 changed files with 16 additions and 0 deletions

View File

@@ -120,6 +120,14 @@ class USERPREF_MT_splash(Menu):
row.menu("USERPREF_MT_appconfigs", text="Preset")
# only for addons
class USERPREF_MT_splash_footer(Menu):
bl_label = ""
def draw(self, context):
pass
class USERPREF_PT_interface(Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Interface"

View File

@@ -2028,6 +2028,14 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
uiItemO(col, NULL, ICON_RECOVER_LAST, "WM_OT_recover_last_session");
uiItemL(col, "", ICON_NONE);
mt = WM_menutype_find("USERPREF_MT_splash_footer", false);
if (mt) {
Menu menu = {NULL};
menu.layout = uiLayoutColumn(layout, false);
menu.type = mt;
mt->draw(C, &menu);
}
UI_block_bounds_set_centered(block, 0);
return block;