Esempio n. 1
0
 public void OnRowDoubleClick(InteractionStoryFiller row)
 {
     if (closeStoryScreenEvent != null)
     {
         closeStoryScreenEvent.RaiseEvent();
         if (onStorySelectEvent != null)
         {
             onStorySelectEvent.RaiseEvent(row.Story);
         }
     }
 }
Esempio n. 2
0
        public void OnCategoryRowSelected(InteractionStoryFiller row)
        {
            var story = row.Story;
            var task  = story.Tasks.Find(o => o.IsDone == false);

            // set the right information
            storyTitle.StringReference = story ? story.Title : null;
            // TODO see if we need a title
            taskTitle.StringReference       = task ? task.Description : null;
            taskDescription.StringReference = task ? task.Description : null;

            if (panel)
            {
                panel.SetActive(true);
            }
        }
Esempio n. 3
0
        public void Add(StorySO story)
        {
            InteractionStoryFiller row = Instantiate(storyRowPrefab, Vector3.zero, Quaternion.identity);

            row.categoryManager = this;

            selectedRow = row;

            var trans = row.transform;

            trans.SetParent(transform);
            trans.localScale = Vector3.one;

            // fill the in the item in the story log.
            row.Set(story);
            row.FillInteractionPanel();
            m_RowItems.Add(row);
        }
Esempio n. 4
0
        public void OnRowSelected(InteractionStoryFiller row)
        {
            if (selectedRow != null)
            {
                selectedRow.Deselect();
            }

            selectedRow = row;
            selectedRow.Select();

            ResetRows();
            // row.background.sprite = rowActive;
            int index   = row.transform.GetSiblingIndex();
            var rowItem = index < m_RowItems.Count ? m_RowItems[index] : null;

            if (rowItem)
            {
                rowItem.Select();
                manager.OnCategoryRowSelected(rowItem);
            }
        }
Esempio n. 5
0
 public void OnRowExit(InteractionStoryFiller row)
 {
     ResetRows();
 }
Esempio n. 6
0
 public void OnRowEnter(InteractionStoryFiller row)
 {
     ResetRows();
     // if(selectedRow == null || row != selectedRow)
     // row.background.sprite = rowHover;
 }
Esempio n. 7
0
 public void Subscribe(InteractionStoryFiller row)
 {
     m_RowItems.Add(row);
 }