public void OnDisposeItem(object sender, EventArgs args) { //TODO: Kai bus sukurtas alert boxas, paklausti zaidejo, ar tikrai nori ismest daikta if (!IsMouseInside() && inventoryManager.DraggedItem != null) { // Null is passed into PopUpManager.CreateInstance method because it is // a singleton class and should be initialized somewhere else //TODO: hardcoded PopUp message SimpleHUDWindow window = WindowFactory.CreatePopup("Drop item?", OnPopupYes, OnPopupNo); this.enabled = false; window.Enabled = true; window.Visible = true; PopUpManager.CreateInstance(null).Push(window); } }