コード例 #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;
            }
        }