Exemplo n.º 1
0
 private void OnStartIdentify(Object p_sender, EventArgs p_args)
 {
     m_repairInventory   = null;
     m_identifyInventory = (IdentifyInventoryController)p_sender;
     if (m_identifyInventory == null)
     {
         Debug.LogError("Could not find the inventory controller necessary for displaying items!");
         return;
     }
     InputManager.RegisterHotkeyEvent(EHotkeyType.INTERACT, new EventHandler <HotkeyEventArgs>(OnAllItemsButtonClickedDelegate));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_1, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_2, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_3, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_4, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     InputManager.RegisterHotkeyEvent(EHotkeyType.QUICK_ACTION_SLOT_5, new EventHandler <HotkeyEventArgs>(HotkeyNullifier));
     if (m_identifyInventory.FromScroll || m_identifyInventory.FromSpell)
     {
         InputManager.RegisterHotkeyEvent(EHotkeyType.OPEN_CLOSE_MENU, new EventHandler <HotkeyEventArgs>(CloseDelegate));
     }
     m_itemContainer.SetIdentifyInventory(m_identifyInventory);
     m_fromSpell = m_identifyInventory.FromSpell;
     m_costs     = m_identifyInventory.IdentifyPrice;
     m_allItemsButtonLabel.text   = LocaManager.GetText("IDENTIFY_SCREEN_BUTTON_IDENTIFY_ALL");
     m_singleItemButtonLabel.text = LocaManager.GetText("IDENTIFY_SCREEN_BUTTON_IDENTIFY");
     m_headlineTextLabel.text     = LocaManager.GetText("IDENTIFY_SCREEN_HEADLINE");
     m_headLineIcon.spriteName    = m_identifyIconName;
     NGUITools.SetActiveSelf(gameObject, true);
     m_active = true;
     SetScrollBarPosition(0);
     UpdateButtons();
     ScrollingHelper.InitScrollListeners(this, m_itemContainer.gameObject);
 }
Exemplo n.º 2
0
 public void SetRepairInventory(RepairInventoryController p_repairInventory)
 {
     m_currentMode       = EMode.REPAIR;
     m_repairInventory   = p_repairInventory;
     m_identifyInventory = null;
     m_currentInventory  = m_repairInventory;
     UpdateItems();
     SelectItemSlot(null);
 }
Exemplo n.º 3
0
 public void SetIdentifyInventory(IdentifyInventoryController p_identifyInventory)
 {
     m_currentMode       = EMode.IDENTIFY;
     m_identifyInventory = p_identifyInventory;
     m_repairInventory   = null;
     m_currentInventory  = m_identifyInventory;
     UpdateItems();
     SelectItemSlot(null);
 }