Element over window

How can a box be drawn over a draggable window?

The box alt drawTexture is a movable icon for an inventory item but its for a draggable window so i can find any way to get it to draw over the window. :smile:

Hmm, function GUI.Window returns a Rect…

Would it be then possible to use GUILayout.BeginArea, using the previous Rect, and then draw box or buttons ā€œonā€ the window ?

By the way, I see you really love :smile: … :wink:

:arrow: Yes its true Emoticons are 8) This engine and community makes me :smile: And for years other engine’s i wont mention :wink: made me :evil: :lol:

So i figured it out, what i did was to cteate a label to enable at cursor position inside the draggable window that lines up with the one outside the window and like a slight of hand style, one ends at the edge of the window and the other is shown. It worked real neat cause the icon outside the window has a box around it so it looks like it pulls part of the window out with it to give a icon in a bubble effect. :idea:

If I understand well, you have a GUI.Window. When your mouse is inside, you have a free wandering GUI.Label*, sticking to your cursor. When you move out the cursor, the ā€œLabel picture is changedā€ ?

I would be curious to see your code, how you achieved that. :wink:

Ok what i did was to check the window entering and exiting of the mouse with a GUItooltip. Then all you have to do to create a if statment to compare the tooltip to any string(ie)

if(GUItooltip = "hello") { doWhatIWant; }

Then i add the currentItems texture into a texture array for display in the below code.

if(mIActive){
var ix = Input.mousePosition.x; 
var iy = Input.mousePosition.y; 
var transMouse = GUI.matrix.inverse.MultiplyPoint3x4(Vector3(ix, Screen.height - iy, 1)); 
GUI.Label(Rect(transMouse.x-20,transMouse.y-20,iWH00A,iWH00A),tA00A[0]);
}

Now this above code is used inside the window function at the very bottom so it will draw over everything, and just before the draggable line. Then i use this same code outside the window function so that a box is drawn behind the label in the window. So where the label dissapears at the edge the box behind can be seen. You cant tell the difference from looking at it cause both label and box are lined up.

Only difference between the inside code and the outside the window code is one uses a label and the other uses a box. :smile:

[/code]