コード例 #1
0
    private void DrawWeaponList()
    {
        if (_containerViewModel == null)
        {
            return;
        }

        _weaponDrawer.Start();

        _containerViewModel.Refresh();

        var items = _containerViewModel.Items;

        for (var i = 0; i < items.Count; i++)
        {
            var item = items[i];

            string label = (i + 1).ToString();

            if (i == _player.EquippedItem.SlotNumber)
            {
                _weaponDrawer.AddItem("*" + " " + item.DisplayName, item.QuantityText);
            }
            else
            {
                _weaponDrawer.AddItem(label + " " + item.DisplayName, item.QuantityText);
            }
        }

        _weaponDrawer.Draw();
    }