I want to put some extra buttons on the 'title' are of a GUILayout.Window (like the 'system buttons' close, minimize, maximize, etc.) Can this be done?
I was able to put a simple button there, and clicking it highlights it like it's being pressed, but I don't get the fact that it was pressed. Is it legal, is there a better way to do it?
windowRect = ClampToScreen(GUILayout.Window (GetInstanceID(), windowRect, DisplayData, transform.name, GUILayout.MinWidth(600)));
// this would be a texture with style to look better, but to test, just a text X
if (GUI.Button ( Rect (windowRect.x+5, windowRect.y+5, 45, 45), "X"))
{
Debug.Log("I'm clickin close"); // BUT I NEVER GET THIS MESSAGE
}