TimeWarpMod.TimeSlider.Awake C# (CSharp) Method

Awake() public method

public Awake ( ) : void
return void
        public override void Awake()
        {
            size = new Vector2(400, 100);

            anchor = UIAnchorStyle.Bottom & UIAnchorStyle.Left;
            backgroundSprite = "ButtonMenu";

            autoLayoutPadding = new RectOffset(10, 10, 4, 4);
            autoLayout = true;
            autoFitChildrenVertically = true;
            autoLayoutDirection = LayoutDirection.Vertical;

            timeOfDay = AddUIComponent<UILabel>();
            timeOfDay.textAlignment = UIHorizontalAlignment.Center;
            timeOfDay.size = new Vector2(width - 20, 20);
            timeOfDay.autoSize = false;

            timeSlider = UIFactory.CreateSlider(this, 0.0f, 24.0f);
            timeSlider.stepSize = 1f / 60.0f;
            timeSlider.eventValueChanged += ChangeTime;
            ((UIPanel)timeSlider.parent).backgroundSprite = "BudgetBarBackground";
            ((UISprite)timeSlider.thumbObject).spriteName = "InfoIconBasePressed";

            timeSlider.eventDragStart += timeSlider_eventDragStart;
            //timeSlider.eventDragEnd += timeSlider_eventDragEnd;

            eventMouseUp += timeSlider_eventDragEnd;

            UISprite pad = AddUIComponent<UISprite>();
            pad.autoSize = false;
            pad.size = new Vector2(10, 5);
        }