diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-30 15:18:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-30 15:18:08 +0300 |
commit | 8036342ea8c20ede363d5d3fe5459cc2af58a0f6 (patch) | |
tree | 1579a7a80e7d63fa655ebb4c0058b413d30b9c7e /source/blender/editors/space_script | |
parent | 445bbdf75d94dbe4db25e9a81f6fed47c59acb5a (diff) |
2.5: UI & Menus
* Cleaned up UI_interface.h a bit, and added some comments to
organize things a bit and indicate what should be used when.
* uiMenu* functions can now be used to create menus for headers
too, this is done with a uiDefMenuBut, which takes a pointer
to a uiMenuCreateFunc, that will then call uiMenu* functions.
* Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are
specific to making popup menus. Will convert the other
conformation popup menu functions to use this too so we can
remove some code.
* Extended uiMenu functions, now there is is also:
BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator.
* Converted image window headers to use uiMenu functions, simplifies
menu code further here. Did not remove the uiDefMenu functions as
they are used in sequencer/view3d in some places now (will fix).
* Also tried to simplify and fix bounds computation a bit better
for popup menus. It tried to find out in advance what the size
of the menu was but this is difficult with keymap strings in
there, now uiPopupBoundsBlock can figure this out afterwards and
ensure the popup is within the window bounds. Will convert some
other functions to use this too.
Diffstat (limited to 'source/blender/editors/space_script')
-rw-r--r-- | source/blender/editors/space_script/script_header.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_script/script_header.c b/source/blender/editors/space_script/script_header.c index 37e77e1497a..2a7006348b3 100644 --- a/source/blender/editors/space_script/script_header.c +++ b/source/blender/editors/space_script/script_header.c @@ -65,13 +65,13 @@ static void do_viewmenu(bContext *C, void *arg, int event) } -static uiBlock *dummy_viewmenu(bContext *C, uiMenuBlockHandle *handle, void *arg_unused) +static uiBlock *dummy_viewmenu(bContext *C, ARegion *ar, void *arg_unused) { ScrArea *curarea= CTX_wm_area(C); uiBlock *block; short yco= 0, menuwidth=120; - block= uiBeginBlock(C, handle->region, "dummy_viewmenu", UI_EMBOSSP, UI_HELV); + block= uiBeginBlock(C, ar, "dummy_viewmenu", UI_EMBOSSP, UI_HELV); uiBlockSetButmFunc(block, do_viewmenu, NULL); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Nothing yet", 0, yco-=20, |