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>2008-12-26 16:11:04 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-12-26 16:11:04 +0300
commit233509245615d06f0274d04940ad67d8e636d7f0 (patch)
tree4c29f431c3ee2680bb76ff1cc5420f75ad089dbb /source/blender/editors/space_node
parent7715e45a7adf2cc07856956aef27fc6359af94e1 (diff)
UI: Panels
* API and usage is basically the same still. * Panels were moved to region level. I first thought of keeping them at area level, but having them at region level it's simpler to handle events and do drawing, and also to integrate with view2d. They can still become area level overlapping regions, if we make a floating (or docked) region that can contain panels. * Added back a few panels from the scene buttons for testing. Issues still: * The view2d handling and alignment refresh of panels is not correct yet in the buttons window. * I did not yet bring back the block handlers system. It was basically a system that stored which panel was open and where the events for that panel would go. Just a few functions, but not sure how it fits in 2.5. * There was a case where dragging panels would not properly remove the window level handler, but could not redo anymore even though I don't think I fixed it. * Some text in the panels goes past the end of the button, that is due to the checkmark button drawing, not related to this commit. Other UI code changes: * Renamed interface.h to interface_intern.h for consistency. * Fixed some issues with freeing of blocks when they changed due to context. * uiDrawBlock now takes a context pointer (mostly for block drawextra).
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/node_draw.c6
-rw-r--r--source/blender/editors/space_node/node_header.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 2f09f87ef9e..3d45a42fc70 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -98,7 +98,7 @@
extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);
extern void ui_rasterpos_safe(float x, float y, float aspect);
extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad);
-void ui_draw_tria_icon(float x, float y, float aspect, char dir) {}
+extern void ui_draw_tria_icon(float x, float y, float aspect, char dir);
// XXX butspace.h
#define B_NODE_EXEC 3610
@@ -837,7 +837,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
if(node->typeinfo->butfunc) {
node->typeinfo->butfunc(block, snode->nodetree, node, &node->butr);
}
- uiDrawBlock(block);
+ uiDrawBlock(C, block);
}
}
@@ -1155,4 +1155,4 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
scrollers= UI_view2d_scrollers_calc(C, v2d, 10/*unit*/, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
UI_view2d_scrollers_draw(C, v2d, scrollers);
UI_view2d_scrollers_free(scrollers);
-} \ No newline at end of file
+}
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index 7877aba4e7a..53e65194516 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -783,7 +783,7 @@ void node_header_buttons(const bContext *C, ARegion *ar)
UI_view2d_totRect_set(&ar->v2d, xco+XIC+80, (int)(ar->v2d.tot.ymax-ar->v2d.tot.ymin));
uiEndBlock(C, block);
- uiDrawBlock(block);
+ uiDrawBlock(C, block);
}