Hello guys ! ![]()
Inventory: http://scr.hu/3tpn/1t1hy
And here is my problem:
void OnGUI() {
GUI.skin = dispSkin;
if(showOptions)
{
GUI.depth = 3;
GUILayout.BeginArea (new Rect (optionPos.x, optionPos.y, 80, 83));
if(itemS.itemSettings.isDropable) {
if(GUILayout.Button("Drop", GUILayout.Width(80), GUILayout.Height(25)))
{
inv.DropItem(itemS);
showOptions = false;
}
}
if(itemS.itemSettings.isUsable) {
if(GUILayout.Button("Use", GUILayout.Width(80), GUILayout.Height(25)))
{
Debug.Log("ItemUsed");
//itemT.GetComponent<ItemEffect>().UseEffect();
showOptions = false;
}
}
GUILayout.EndArea ();
GUI.depth = 0;
}
if (openUI) {
GUI.depth = 2;
wRect.character = GUI.Window(0, wRect.character, Character, "Character");
wRect.inventory = GUI.Window(1, wRect.inventory, Inventory, "Inventory");
GUI.depth = 0;
}
}
so, when i click on my item in inventory options will be available to use:
http://scr.hu/3tpn/e7c4d
but the problem is… options are BEHIND inventory window despite the fact that I used GUI.depth;
someone know what’s wrong ?