Пример #1
0
        protected override void update_movement(bool input)
        {
            Up_Page_Arrow.update();
            Down_Page_Arrow.update();

            if (Global.Input.mouse_triggered(MouseButtons.Left, false))
            {
            }

            //Down_Page_Arrow.angle += MathHelper.Pi / 360f;
            //Down_Page_Arrow.mirrored = !Down_Page_Arrow.mirrored;

            if (Global.Input.mouseScroll > 0)
            {
                Up_Page_Arrow_ArrowClicked(this, null);
            }
            else if (Global.Input.mouseScroll < 0)
            {
                Down_Page_Arrow_ArrowClicked(this, null);
            }
            else
            {
                Up_Page_Arrow.UpdateInput(-(loc + draw_offset));
                Down_Page_Arrow.UpdateInput(-(loc + draw_offset));
            }

            base.update_movement(input);
        }
Пример #2
0
        protected override void UpdateMenu(bool active)
        {
            update_map_sprite();
            Cursor.update();
            Counter.update();
            Left_Page_Arrow.update();
            Right_Page_Arrow.update();

            base.UpdateMenu(active);

            if (ChangingPage)
            {
                (PageLoc.X < target_page_loc.X ? Right_Page_Arrow : Left_Page_Arrow).twirling_update();
                float distance = Math.Abs(PageLoc.X - target_page_loc.X) / 2;
                distance  = MathHelper.Clamp(MathHelper.Lerp(0, distance, ChangingPageTime / 12f), 0, distance);
                distance  = Math.Min(distance, 32);
                distance  = Math.Max(distance, 1);
                distance  = (float)Math.Pow(2, Math.Round(Math.Log(distance, 2)));
                PageLoc.X = (float)Additional_Math.double_closer(PageLoc.X, target_page_loc.X, (int)distance);

                ChangingPageTime++;
                if (PageLoc.X == target_page_loc.X)
                {
                    ChangingPage = false;
                }
            }
        }
Пример #3
0
        protected override void UpdateMenu(bool active)
        {
            Up_Page_Arrow.update();
            Down_Page_Arrow.update();

            base.UpdateMenu(active);

            refresh_settings();
            if (Scrollbar != null)
            {
                Scrollbar.update();
                if (this.ready_for_inputs)
                {
                    Scrollbar.update_input();
                }
            }
            update_scroll_offset();
            update_cursor();

            Solo_Icon.update();
        }