Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-27 22:05:58 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-04-27 22:05:58 +0400
commit58cdd37f52591dd47962e00c72564f579e1fc4a7 (patch)
tree3f0ef710931e0e4157b7732ab0152bae2ffba3c4 /source/blender/editors/interface/interface_regions.c
parentc36fb8c913dd935239c4a9f641766a642bf1bebf (diff)
UI:
* Made separator item work horizontal & vertical. * Add colon (:) automatic for int/float/enum/string. * Added space variables to uiStyle and use them in the layout engine. * Added initial World buttons by Thomas Dinges, thanks! * Added some code for modifiers in the Object Data context. This will become a template though. * Use a common poll() callback in the scripts to reduce code.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r--source/blender/editors/interface/interface_regions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 7bc7e2e3c19..59725cc4954 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1763,12 +1763,13 @@ static uiBlock *ui_block_func_MENU_ITEM(bContext *C, uiPopupBlockHandle *handle,
uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
{
+ uiStyle *style= U.uistyles.first;
uiPopupBlockHandle *handle;
uiPopupMenu *pup;
uiMenuInfo info;
pup= MEM_callocN(sizeof(uiPopupMenu), "menu dummy");
- pup->layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0);
+ pup->layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
uiLayoutContext(pup->layout, WM_OP_INVOKE_REGION_WIN);
uiLayoutColumn(pup->layout);
@@ -1793,10 +1794,11 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
/* only return handler, and set optional title */
uiPopupMenu *uiPupMenuBegin(const char *title, int icon)
{
+ uiStyle *style= U.uistyles.first;
uiPopupMenu *pup= MEM_callocN(sizeof(uiPopupMenu), "menu start");
pup->icon= icon;
- pup->layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0);
+ pup->layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
uiLayoutContext(pup->layout, WM_OP_EXEC_REGION_WIN);
uiLayoutColumn(pup->layout);