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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user