UI: support for popups starting with buttons activated

While this could already be done from C,
this is now exposed to Python
This commit is contained in:
2019-03-20 22:40:38 +11:00
parent 69fb859909
commit a1addc5c63
6 changed files with 70 additions and 1 deletions

View File

@@ -1154,6 +1154,8 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData)
/* center around the mouse */
UI_block_bounds_set_popup(block, 4, (const int[2]){data->width / -2, data->height / 2});
UI_block_active_only_flagged_buttons(C, ar, block);
return block;
}
@@ -1179,6 +1181,8 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData)
UI_block_bounds_set_popup(block, 4, NULL);
UI_block_active_only_flagged_buttons(C, ar, block);
return block;
}