Project290.Menus.VolumeControlDisplayEntry.VolumeControlDisplayEntry C# (CSharp) Method

VolumeControlDisplayEntry() public method

Initializes a new instance of the VolumeControlDisplayEntry class.
public VolumeControlDisplayEntry ( string text, string description, MenuAction actions, Vector2 position, Vector2 numberDisplayPosition, float scale, float numberLayerDepth, bool musicVolume, bool ignoreOffsetPosition ) : System
text string The text.
description string The description.
actions MenuAction The actions.
position Vector2 The position.
numberDisplayPosition Vector2 The number display position.
scale float The scale of the largest number.
numberLayerDepth float The number layer depth.
musicVolume bool Is this for music volume? Else, sound volume.
ignoreOffsetPosition bool if set to true [ignore offset position].
return System
        public VolumeControlDisplayEntry(
            string text,
            string description,
            MenuAction[] actions,
            Vector2 position,
            Vector2 numberDisplayPosition,
            float scale,
            float numberLayerDepth,
            bool musicVolume,
            bool ignoreOffsetPosition)
            : base(text, description, actions, position)
        {
            this.displayPosition = numberDisplayPosition;
            this.scale = scale;
            this.numberLayerDepth = numberLayerDepth;
            this.musicVolume = musicVolume;
            this.ignoreOffsetPosition = ignoreOffsetPosition;
            this.previouslyHighlighed = false;
            this.positions = new List<tVector2>();
            this.scales = new List<tfloat>();
            for (int i = 0; i <= 10; i++)
            {
                this.positions.Add(new tVector2(numberDisplayPosition.X, numberDisplayPosition.Y));
                this.scales.Add(new tfloat(0));
            }

            this.origins = new List<Vector2>();
            for (int i = 0; i <= 10; i++)
            {
                this.origins.Add(FontStatic.Get("defaultFont").MeasureString(i.ToString()) / 2f);
            }
        }