Exemplo n.º 1
0
        private void OnClick(UISlot uislot)
        {
            int       slot  = uislot.index;
            ItemSlot  islot = (ItemSlot)uislot;
            CraftData item  = islot.GetCraftable();

            foreach (ItemSlot aslot in slots)
            {
                aslot.UnselectSlot();
            }

            CraftInfoPanel info_panel = CraftInfoPanel.Get(GetPlayerID());

            if (info_panel)
            {
                if (item == info_panel.GetData())
                {
                    info_panel.Hide();
                }
                else
                {
                    parent_ui.CancelSelection();
                    slots[slot].SelectSlot();
                    info_panel.ShowData(item);
                }
            }
        }
 public void CancelPlayerSelection()
 {
     CancelSelection();
     if (current_player != null)
     {
         PlayerUI player_ui = PlayerUI.Get(current_player.player_id);
         if (player_ui != null)
         {
             player_ui.CancelSelection();
         }
     }
 }