Reflectance Layer Interface [SOLVED]
-
On 11/05/2016 at 16:25, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 16
Platform: Mac ;
Language(s) : C++ ;---------
Hi, I've been trying to replicate the visual functionality of Reflectance Layers within the Material Editor. When you drag and drop them you get an orange bar to show an indication of where you are going to drop it, how would I replicate that?I have a GeUserArea with a GeClipMap inside of it to allow DragAndDrop and to draw the text for the name when I receive that it's being moused over I redraw it with an bar overlaid on top of it. But I'm not able to deal with the spacing between elements like Reflectance does, with the orange bar being drawn between elements.
Dan
-
On 12/05/2016 at 02:19, xxxxxxxx wrote:
Hello,
the reflectance layer GUI is a quite complex custom GUI composed of several elements. The separator you describe is no build in function of any existing GUI element. This separator is created by having user areas between the other GUI elements. Depending on the position of the drag and drop operation these user areas draw an orange rectangle.
Best wishes,
Sebastian -
On 12/05/2016 at 13:16, xxxxxxxx wrote:
Thanks for the response, it does look complicated! I guess my main question is if there is a way to have no space between different GUI elements, there always seems to be a small one no matter what I do, with control over the space I could do what I want I think. Like between the groups here, I have several subgroups with GeUserAreas but I can't them any closer than this.
Dan
-
On 13/05/2016 at 02:49, xxxxxxxx wrote:
Hello,
could you share some code that shows how you create this layout?
Best wishes,
Sebastian -
On 13/05/2016 at 15:29, xxxxxxxx wrote:
Sure, here you go!
GroupBegin(idParentGroup, BFH_SCALEFIT|BFV_TOP, 1, 0, "",0,0); GroupBorderNoTitle(BORDER_NONE); GroupBorderSpace(0,0,0,0); GroupSpace(0,0); for (Int32 currentarea =0; currentarea<AreaList.GetCount(); currentarea++) { GroupBegin(idGroup+currentarea, BFH_LEFT|BFV_TOP, 0, 1, "",0,0,15); GroupBorderNoTitle(BORDER_ACTIVE_1); GroupSpace(0, 0); C4DGadget* userarea = AddUserArea(idArea+currentarea, BFH_CENTER | BFV_BOTTOM, 0, 0); if(userarea == nullptr) return TRUE; AttachUserArea(AreaList[currentarea], userarea); GroupEnd(); } GroupEnd();
AreaList is just a BaseArray of GeUserAreas.
Dan
-
On 17/05/2016 at 02:15, xxxxxxxx wrote:
Hello,
it seems to work fine if you omit that extra group around your user area in your loop. With only one group there is no extra space.
Best wishes,
Sebastian -
On 20/05/2016 at 15:59, xxxxxxxx wrote:
Thanks! I had to rework a couple layout things but that did exactly what I needed!