/// <summary>
        ///     Called when an unlockable technology is selected.
        /// </summary>
        private void UnlockableTechnologySelected(ItemList.ItemListSelectedEventArgs obj)
        {
            TechnologySelected = _unlockableTechnologyPrototypes[obj.ItemIndex];

            UnlockButton.Disabled = Owner.Points < TechnologySelected.RequiredPoints;

            PopulateSelectedTechnology();
        }
        /// <summary>
        ///     Called when a future technology is selected
        /// </summary>
        private void FutureTechnologySelected(ItemList.ItemListSelectedEventArgs obj)
        {
            TechnologySelected = _futureTechnologyPrototypes[obj.ItemIndex];

            UnlockButton.Disabled = true;

            PopulateSelectedTechnology();
        }
 private void TargetSelected(ItemList.ItemListSelectedEventArgs item)
 {
     SendMessage(new UiTargetUpdateMessage(_window?.TargetList[item.ItemIndex]));
     //(ノ°Д°)ノ︵ ┻━┻
     if (_window != null)
     {
         _window.Engage.Disabled = false;
     }
 }
Exemple #4
0
 public void ItemSelected(ItemList.ItemListSelectedEventArgs args)
 {
     int.TryParse(_amountLineEdit.Text, out var quantity);
     if (quantity <= 0)
     {
         quantity = 1;
     }
     Owner.Queue(_shownRecipes[args.ItemIndex], quantity);
 }
        private void ItemSelected(ItemList.ItemListSelectedEventArgs args)
        {
            var prototype = (SpriteAccessoryPrototype?)_items[args.ItemIndex].Metadata;
            var style     = prototype?.ID;

            if (style != null)
            {
                OnHairStylePicked?.Invoke(style);
            }
        }
        private void TileListOnOnItemSelected(ItemList.ItemListSelectedEventArgs args)
        {
            var definition = _shownItems[args.ItemIndex];

            var newObjInfo = new PlacementInformation
            {
                PlacementOption = "AlignTileAny",
                TileType        = definition.TileId,
                Range           = 400,
                IsTile          = true
            };

            _placementManager.BeginPlacing(newObjInfo);
        }
 public void ItemSelected(ItemList.ItemListSelectedEventArgs args)
 {
     int.TryParse(AmountLineEdit.Text, out var quantity);
     if (quantity <= 0)
     {
         quantity = 1;
     }
     Owner.Queue(_shownRecipes[args.ItemIndex], quantity);
     Items.SelectMode = ItemList.ItemListSelectMode.None;
     Timer.Spawn(100, () =>
     {
         Items.Unselect(args.ItemIndex);
         Items.SelectMode = ItemList.ItemListSelectMode.Single;
     });
 }
 private void OutfitListOnOnItemSelected(ItemList.ItemListSelectedEventArgs obj)
 {
     _selectedOutfit        = (StartingGearPrototype)obj.ItemList[obj.ItemIndex].Metadata !;
     ConfirmButton.Disabled = false;
 }
 public void OnItemSelected(ItemList.ItemListSelectedEventArgs itemListSelectedEventArgs)
 {
     Owner.SelectServer(_serverIds[itemListSelectedEventArgs.ItemIndex]);
 }
 public void ItemSelected(ItemList.ItemListSelectedEventArgs args)
 {
     Owner.Eject(_cachedInventory[args.ItemIndex].ID);
 }
 private void ItemSelected(ItemList.ItemListSelectedEventArgs args)
 {
     OnHairStylePicked?.Invoke(Items[args.ItemIndex].Text);
 }
Exemple #12
0
        private void PlayerItemListOnOnItemSelected(ItemList.ItemListSelectedEventArgs obj)
        {
            var selectedPlayer = (PlayerInfo)obj.ItemList[obj.ItemIndex].Metadata !;

            OnSelectionChanged?.Invoke(selectedPlayer);
        }
Exemple #13
0
 private void RecipeSelected(ItemList.ItemListSelectedEventArgs obj)
 {
     _selected = (ConstructionPrototype)obj.ItemList[obj.ItemIndex].Metadata !;
     PopulateInfo(_selected);
 }