public void UpdateButtons(IEnumerable <ToolButton> buttons) { foreach (var button in m_ExtraButtons) { button.gameObject.SetActive(false); } while (buttons.Count() > m_ExtraButtons.Count) { m_ExtraButtons.Add(Instantiate(m_ExtraButtonPrebab, m_ScrollView.content)); } int i = 0; foreach (var button in buttons) { m_ExtraButtons[i].gameObject.SetActive(true); m_ExtraButtons[i].Name = button.transform.parent.name; m_ExtraButtons[i].Icon = button.buttonIcon.sprite; m_ExtraButtons[i].OnClick = () => { button.button.onClick?.Invoke(); if (m_DialogModeGetter.GetValue() == SetDialogModeAction.DialogMode.Normal) { button.transform.parent.gameObject.SetActive(true); OnItemClick?.Invoke(); } }; i++; } }
private void ItemSelected(int id) { if (OnItemClick != null) { OnItemClick.Invoke(id); } }
protected override void InsertItem(TableItem item, int index) { _box.Widgets.Insert(index, item); item.TouchDown += (sender, args) => { OnItemClick.Invoke(item); }; item.MouseEntered += (sender, args) => { SelectedItem = item; }; item.MouseLeft += (sender, args) => { item.IsSelected = false; }; }
protected override void OnItemViewClick(object sender, EventArgs e) { base.OnItemViewClick(sender, e); var holder = (MvxRecyclerViewHolder)sender; OnItemClick?.Invoke(this, new SelectedItemEventArgs(holder.AdapterPosition, holder.ItemView, holder.DataContext)); }
protected override void DoubleClickedItem(int id) { var select = hierarchyData.SingleOrDefault(x => x.id == id); if (select == null) { return; } OnItemClick?.Invoke(select.transform.gameObject); }
private void tileControl1_ItemClick(object sender, TileItemEventArgs e) { try { OnItemClick?.Invoke(sender, e); } catch (Exception ex) { MsgBox.ShowException(ex, this); } }
public void OnItemButtonClick(int x, int y, ButtonItem buttonItem) { buttonItem.SetType((int)currentType); buttonItem.SetSprite(resourceManager.GetSpriteByItemType(currentType)); buttonItem.SetInteractable(false); OnItemClick?.Invoke(x, y, currentType); ItemClicked?.Invoke(currentType); var index = (((int)currentType) + 1) % itemTypesCount; currentType = (ItemTypes)index; }
protected override void DoubleClickedItem(int id) { var single = serializedPropertys.SelectMany(x => x.Value).SingleOrDefault(m => m.id == id); if (single == null) { SetExpandedRecursive(id, !IsExpanded(id)); return; } if (single.values is SerializedProperty) { var sp = (SerializedProperty)single.values; OnItemClick?.Invoke((SerializedProperty)single.values); } }
private void ItemImageControl_OnMouseDown(object sender, MouseButtonEventArgs e) { OnItemClick?.Invoke(null, int.Parse(NumIndex)); if (blSelectedflag) { blSelectedflag = false; GridMain.Background = new SolidColorBrush(Colors.DarkOrange); } else { GridMain.Background = new SolidColorBrush(Colors.LightGray); blSelectedflag = true; OnSelectedItem?.Invoke(null, this); } }
void Click(PlaylistAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
private void Click(LastChatAdapterClickEventArgs args) { OnItemClick?.Invoke(this, args); }
private void Click(FavoriteUserAdapterClickEventArgs args) { OnItemClick?.Invoke(this, args); }
void Click(CardAdapter2ClickEventArgs args) => OnItemClick?.Invoke(this, args);
void OnClick(ContactsAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(NotificationsAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
private void SelectorClicked(string id) { OnItemClick?.Invoke(id); }
void Click(InviteContactAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(CreditAdapterViewHolderClickEventArgs args) => OnItemClick?.Invoke(this, args);
private void OnClick(int position, View view, object dataContext) => OnItemClick?.Invoke(this, new SelectedItemEventArgs(position, view, dataContext));
public void Click(GiftAdapterClickEventArgs args) { OnItemClick?.Invoke(this, args); }
private void OnClick(AdapterClickEvents args) { OnItemClick?.Invoke(this, args); }
void Click(HSoundAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
private void onItemClick(int position) => OnItemClick?.Invoke(this, data[position]);
void Click(ArtistsAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(CommentAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(GenresCheckerAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
private void onItemClickCallback(object o, int position) => OnItemClick?.Invoke(o, data[position]);
void Click(RowSoundLiteAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(BlockedUsersAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);
void Click(AllMediaAdapterClickEventArgs args) => OnItemClick?.Invoke(this, args);