Пример #1
0
 public AUI_ButtonWithLine(int X, int Y, int W, string Txt)
 {
     button = new AUI_Button(X, Y, W, Txt);
     button.displayState = DisplayState.Closed;
     line = new AUI_LineWithRecs();
     line.displayState = DisplayState.Closed;
 }
Пример #2
0
        public Screen_Title()
        {
            aui_instances = new List <AUI_Base>();

            button_screen1 = new AUI_Button(
                16 * 8, 16 * 20, 16 * 5, "crown example");
            button_screen1.CenterText();
            aui_instances.Add(button_screen1);

            button_screen2 = new AUI_Button(
                16 * 15, 16 * 20, 16 * 5, "stress test");
            button_screen2.CenterText();
            aui_instances.Add(button_screen2);

            button_screen3 = new AUI_Button(
                16 * 22, 16 * 20, 16 * 5, "spider game");
            button_screen3.CenterText();
            aui_instances.Add(button_screen3);

            button_screen4 = new AUI_Button(
                16 * 29, 16 * 20, 16 * 5, "example 4");
            button_screen4.CenterText();
            aui_instances.Add(button_screen4);

            button_screen5 = new AUI_Button(
                16 * 36, 16 * 20, 16 * 5, "example 5");
            button_screen5.CenterText();
            aui_instances.Add(button_screen5);

            titleText = new AUI_Text("grak's aui lab",
                                     16 * 8, 16 * 5, Assets.ForegroundColor);
            titleText.scale = 10.0f;
            aui_instances.Add(titleText);

            descText = new AUI_Text(
                "this monogame laboratory showcases a variety of animated ui." +
                "\nclick a button below to see an example.",
                16 * 8, 16 * 14, Assets.ForegroundColor);
            descText.scale = 2.0f;
            aui_instances.Add(descText);

            AUI_LineWithRecs line0 = new AUI_LineWithRecs();

            line0.MoveTo(16 * 8, 16 * 6);
            line0.SetTarget(16 * 41, 16 * 6);
            line0.line.speedOpen   = 25;
            line0.line.speedClosed = 25;
            aui_instances.Add(line0);

            AUI_LineWithRecs line1 = new AUI_LineWithRecs();

            line1.MoveTo(16 * 8, 16 * 13);
            line1.SetTarget(16 * 41, 16 * 13);
            line1.line.speedOpen   = 20;
            line1.line.speedClosed = 25;
            aui_instances.Add(line1);

            AUI_LineWithRecs line2 = new AUI_LineWithRecs();

            line2.MoveTo(16 * 8, 16 * 18);
            line2.SetTarget(16 * 41, 16 * 18);
            line2.line.speedOpen   = 15;
            line2.line.speedClosed = 20;
            aui_instances.Add(line2);

            AUI_LineWithRecs line3 = new AUI_LineWithRecs();

            line3.MoveTo(16 * 8, 16 * 23);
            line3.SetTarget(16 * 41, 16 * 23);
            line3.line.speedOpen   = 10;
            line3.line.speedClosed = 20;
            aui_instances.Add(line3);
        }