[solved] How do I insert an image inside a window?

Please, can you help me with this one?

So far, this is the code I’ve got, but the window opens without displaying any image:

function DoWindow1 (windowID : int) {
    if(GUI.Button (Rect (10,30, 80,20), "Fechar")){
	
		LegendaGUI.camada.enabled = true;
		doWindow1 = false;
		Application.Quit();

	
	
	}
	
}

function OnGUI () {
    

        
    if (doWindow1){
        GUI.Window (0, Rect (leftG,topG,rightG,bottomG), DoWindow1, nomeJanela);
		   GUI.DrawTexture(Rect(0,100,0,100), whichTexture,  ScaleMode.ScaleAndCrop);
		}
}

Thank you very much!

Anything you want to be drawn inside of the window needs to be inside of the WindowFunction.

So, move your DrawTexture from below the window call, into the WindowFunction and it should work the way you want it to.

Thanks a lot, JRule! It works now.

The working code:

// Make the contents of the window.
function DoWindow1 (windowID : int) {

	GUI.DrawTexture(Rect(200,400,200,400), emptyTexture,  ScaleMode.ScaleAndCrop);
    if(GUI.Button (Rect (50,130, 150,180), "Fechar")){
		
		LegendaGUI.camada.enabled = true;
		doWindow1 = false;
		Application.Quit();

	
	
	}
	
}

function OnGUI () {
    
GUI.skin = menuSkin;
GUI.depth = 0; 
        
    if (doWindow1){
        GUI.Window (0, Rect (leftG,topG,rightG,bottomG), DoWindow1, nomeJanela);
		   //
		}
}