예제 #1
0
 private void TriggerPagination()
 {
     Vent.Trigger(new PaginationEvent {
         Key          = ventKey,
         AdvancePages = advancePages
     });
 }
예제 #2
0
        protected override void Awake()
        {
            base.Awake();
            var button = GetComponent <Button>();

            button.onClick.AddListener(() => { Vent.Trigger(new PartSelectedEvent {
                    PartSelector = this
                }); });
        }
예제 #3
0
        protected override void Awake()
        {
            base.Awake();
            var button = GetComponent <Button>();

            button.onClick.AddListener(() => {
                var evt = new UIComponentEvent {
                    Component = this
                };
                Vent.Trigger(key, evt);
            });
        }
예제 #4
0
 public void OnPointerClick(PointerEventData eventData)
 {
     if (eventData.button == PointerEventData.InputButton.Left)
     {
         Vent.Trigger(new SelectColorPickerPresetEvent {
             Key   = key,
             Id    = id,
             Color = color,
         });
     }
     else if (eventData.button == PointerEventData.InputButton.Right)
     {
         Vent.Trigger(new RemoveColorPickerPresetEvent {
             Key = key,
             Id  = id,
         });
     }
 }
예제 #5
0
        private void DisplayDollChoices <T>(IReadOnlyCollection <T> choices) where T : DollPart
        {
            var choiceGos      = new List <GameObject>(choices.Count + 1);
            var nullSelectorGo = Instantiate(protoNullPartSelector);
            var nullSelector   = nullSelectorGo.GetComponent <PartSelector>();

            nullSelector.masterCanvas = masterCanvas;
            choiceGos.Add(nullSelectorGo);

            foreach (var choice in choices)
            {
                var selectorGo = Instantiate(protoPartSelector);
                var selector   = selectorGo.GetComponent <PartSelector>();
                selector.masterCanvas = masterCanvas;
                var part = staticParts[choice.Path];
                selector.SetDollPart(part);
                choiceGos.Add(selectorGo);
            }

            Vent.Trigger(new SetItemsEvent {
                Items = choiceGos, Key = partSelectionKey
            });
        }