示例#1
0
文件: StatsForm.cs 项目: wtfcolt/game
        /// <summary>
        /// Creates a label (along with a stat raising button when applicable) for a <see cref="StatType"/>.
        /// </summary>
        /// <param name="statType">The <see cref="StatType"/>.</param>
        void NewStatLabel(StatType statType)
        {
            AddLine();

            // Create the stat label
            var pos = new Vector2(_xOffset, _yOffset);

            new StatLabel(this, statType, pos);

            // Add the stat raise button
            if (StatTypeHelper.RaisableStats.Contains(statType))
            {
                var statPB = new RaiseStatPB(pos - new Vector2(22, 0), _addStatGrh, this, statType);
                statPB.Clicked += StatPB_Clicked;
            }
        }
示例#2
0
文件: StatsForm.cs 项目: wtfcolt/game
        /// <summary>
        /// Creates a label (along with a stat raising button when applicable) for a <see cref="StatType"/>.
        /// </summary>
        /// <param name="statType">The <see cref="StatType"/>.</param>
        void NewStatLabel(StatType statType)
        {
            AddLine();

            // Create the stat label
            var pos = new Vector2(_xOffset, _yOffset);
            new StatLabel(this, statType, pos);

            // Add the stat raise button
            if (StatTypeHelper.RaisableStats.Contains(statType))
            {
                var statPB = new RaiseStatPB(pos - new Vector2(22, 0), _addStatGrh, this, statType);
                statPB.Clicked += StatPB_Clicked;
            }
        }