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); } }
private void OnPopupNo(object sender, EventArgs args) { PopUpManager.CreateInstance(null).Pop(); this.enabled = true; }
private void OnPopupYes(object sender, EventArgs args) { inventoryManager.DraggedItem = null; PopUpManager.CreateInstance(null).Pop(); this.enabled = true; }