internal void TurnSlotsSelectionToDefault(Image selectionDefaultImage) { //2 foreach (Control c in panelDesktop.Controls) { if (c.GetType() == typeof(Slot)) { Slot _c = (Slot)c; _c.SetSelection(selectionDefaultImage); } else if (c.GetType() == typeof(InvSlot)) { InvSlot _c = (InvSlot)c; _c.ToDefault(); _c.SetSelection(selectionDefaultImage); } } }
internal void TurnToDefault(Type type, Image slotDefaultImage, string slotImageName) { //1 foreach (Control c in panelDesktop.Controls) { if (c.GetType() == type) { if (type == typeof(Slot)) { Slot _c = (Slot)c; _c.ToDefault(); } else if (type == typeof(InvSlot)) { InvSlot _c = (InvSlot)c; _c.ToDefault(); } } } }