Ejemplo n.º 1
0
        private void InitLogEntries()
        {
            ClearEntries();
            m_quests.Clear();
            m_quests.AddRange(m_questHandler.GetActiveStepsByCategory(EQuestType.QUEST_TYPE_MAIN));
            m_quests.AddRange(m_questHandler.GetActiveStepsByCategory(EQuestType.QUEST_TYPE_SIDE));
            m_quests.AddRange(m_questHandler.GetActiveStepsByCategory(EQuestType.QUEST_TYPE_ONGOING));
            m_quests.AddRange(m_questHandler.GetActiveStepsByCategory(EQuestType.QUEST_TYPE_GRANDMASTER));
            m_quests.AddRange(m_questHandler.GetActiveStepsByCategory(EQuestType.QUEST_TYPE_PROMOTION));
            Int32 num = 0;

            foreach (QuestStep p_questStep in m_quests)
            {
                GameObject          gameObject = NGUITools.AddChild(m_entryHook, m_prefabEntry);
                NewHUDQuestLogEntry component  = gameObject.GetComponent <NewHUDQuestLogEntry>();
                component.Init(p_questStep, num, this, false);
                ScrollingHelper.InitScrollListeners(this, gameObject);
                component.BusinessChanged += OnBusinessChanged;
                component.QuestHovered    += OnQuestHovered;
                m_entries.Insert(num, component);
                m_busyEntries.Add(component);
                num++;
            }
            RepositionEntries();
            if (m_entries.Count > 0)
            {
                m_currentlyVisibleEntry = m_entries[0];
            }
        }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
0
        private void Start()
        {
            m_keyConfigViews           = new Dictionary <EHotkeyType, KeyConfigView>();
            m_requestHighlightColorHex = "[" + NGUITools.EncodeColor(m_requestHighlightColor) + "]";
            AddHotkey(EHotkeyType.MOVE_FORWARD);
            AddHotkey(EHotkeyType.MOVE_LEFT);
            AddHotkey(EHotkeyType.MOVE_BACKWARD);
            AddHotkey(EHotkeyType.MOVE_RIGHT);
            AddHotkey(EHotkeyType.ROTATE_LEFT);
            AddHotkey(EHotkeyType.ROTATE_RIGHT);
            AddEmptyLine();
            AddHotkey(EHotkeyType.INTERACT);
            AddHotkey(EHotkeyType.SELECT_NEXT_INTERACTIVE_OBJECT);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_1);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_2);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_3);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_4);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_5);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_6);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_7);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_8);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_9);
            AddHotkey(EHotkeyType.QUICK_ACTION_SLOT_0);
            AddHotkey(EHotkeyType.REST);
            AddEmptyLine();
            AddHotkey(EHotkeyType.OPEN_INVENTORY);
            AddHotkey(EHotkeyType.OPEN_CLOSE_SPELLBOOK);
            AddHotkey(EHotkeyType.OPEN_CLOSE_SKILLS);
            AddHotkey(EHotkeyType.OPEN_CLOSE_JOURNAL);
            AddHotkey(EHotkeyType.OPEN_CLOSE_BESTIARY);
            AddHotkey(EHotkeyType.OPEN_CLOSE_LORE);
            AddHotkey(EHotkeyType.OPEN_MAP);
            AddHotkey(EHotkeyType.OPEN_AREA_MAP);
            AddHotkey(EHotkeyType.OPEN_CLOSE_MENU);
            AddEmptyLine();
            AddHotkey(EHotkeyType.SELECT_PARTY_MEMBER_1);
            AddHotkey(EHotkeyType.SELECT_PARTY_MEMBER_2);
            AddHotkey(EHotkeyType.SELECT_PARTY_MEMBER_3);
            AddHotkey(EHotkeyType.SELECT_PARTY_MEMBER_4);
            AddHotkey(EHotkeyType.QUICKSAVE);
            AddHotkey(EHotkeyType.QUICKLOAD);
            AddHotkey(EHotkeyType.DISABLE_GUI);
            AddHotkey(EHotkeyType.MAKE_SCREENSHOT);
            m_startPos = m_keysRoot.transform.localPosition;
            m_keysRoot.Reposition();
            UpdateScrollbar();
            UIScrollBar scrollBar = m_scrollBar;

            scrollBar.onChange = (UIScrollBar.OnScrollBarChange)Delegate.Combine(scrollBar.onChange, new UIScrollBar.OnScrollBarChange(OnScrollbarChange));
            ScrollingHelper.InitScrollListeners(this, gameObject);
            m_buttonKeyDelete.isEnabled = false;
            m_buttonKeyDeleteText.color = Color.gray;
        }
Ejemplo n.º 4
0
        public void Init()
        {
            m_itemContainer.Init(this);
            m_itemContainerOrigin = m_itemContainer.transform.localPosition;
            m_listHeight          = m_itemContainer.Grid.cellHeight * 7f;
            UIScrollBar scrollBar = m_scrollBar;

            scrollBar.onChange = (UIScrollBar.OnScrollBarChange)Delegate.Combine(scrollBar.onChange, new UIScrollBar.OnScrollBarChange(OnScrollBarChange));
            ScrollingHelper.InitScrollListeners(this, m_scrollBar.gameObject);
            LegacyLogic.Instance.EventManager.RegisterEvent(EEventType.NPC_IDENTIFY_START, new EventHandler(OnStartIdentify));
            LegacyLogic.Instance.EventManager.RegisterEvent(EEventType.NPC_IDENTIFY_STOP, new EventHandler(OnEndIdentify));
            LegacyLogic.Instance.EventManager.RegisterEvent(EEventType.NPC_REPAIR_START, new EventHandler(OnStartRepair));
            LegacyLogic.Instance.EventManager.RegisterEvent(EEventType.NPC_REPAIR_STOP, new EventHandler(OnEndRepair));
        }
Ejemplo n.º 5
0
        private void AddEntry(QuestStep p_newQuest)
        {
            Int32 positionForEntry = GetPositionForEntry(p_newQuest);

            if (positionForEntry < 0)
            {
                return;
            }
            GameObject          gameObject = NGUITools.AddChild(m_entryHook, m_prefabEntry);
            NewHUDQuestLogEntry component  = gameObject.GetComponent <NewHUDQuestLogEntry>();

            component.Init(p_newQuest, positionForEntry, this, false);
            ScrollingHelper.InitScrollListeners(this, gameObject);
            component.BusinessChanged += OnBusinessChanged;
            component.QuestHovered    += OnQuestHovered;
            m_entries.Insert(positionForEntry, component);
            UpdateIndexProperties();
            RepositionEntries();
            OnBusinessChanged(component, EventArgs.Empty);
        }
Ejemplo n.º 6
0
 public void SetVisible(Boolean p_visible)
 {
     m_visible = p_visible;
     UpdateVisibility();
     ScrollingHelper.InitScrollListeners(this, m_scrollBar.gameObject);
 }
 public void ScrollToEnd()
 {
     ScrollingHelper.ScrollToEnd(Dispatcher, messages);
 }
Ejemplo n.º 8
0
 public MainWindow()
 {
     InitializeComponent();
     DONE_ListView.Height = 200;
     ScrollingHelper.UserTheScroll(mGrid);
 }