示例#1
0
        public static HudScene Create(int session)
        {
            Log.Debug("Scenes", "Creating tutorial 4 scene for {0}", session);
            var scene = new HudScene {
                Session = session, Name = NAME
            };
            var user = AWHT.Instance.GetUser(session);
            var lang = user.Language;

            var hudTagline = new HudPanel(
                Lang.Get(lang, "Tut4a"), Colors.White,
                new Metric
            {
                Rectangle = new Rectangle(-256, -100, 512, 64),
                Origin    = HudOrigin.Bottom
            },
                true);

            scene[HUD_TAGLINE] = hudTagline;

            var hudDiagramA = new HudPanel(
                new Texture {
                Name = "hud-tut4b.png"
            },
                new Metric
            {
                Rectangle = new Rectangle(222, 32, 64, 128),
                Origin    = HudOrigin.TopLeft
            });

            hudDiagramA.MainHud.Flags |= HudFlag.Highlight;
            hudDiagramA.MainHud.Color  = Colors.Red;
            scene["diagramA"]          = hudDiagramA;

            var hudDiagramB = new HudPanel(
                new Texture {
                Name = "hud-tut4a.png"
            },
                new Metric
            {
                Rectangle = new Rectangle(64, 0, 64, 128),
                Origin    = HudOrigin.Center
            });

            scene["diagramB"] = hudDiagramB;

            scene[HUD_BTN_NEXT] = HudPanel.CreateNext(lang);
            scene[HUD_BTN_PREV] = HudPanel.CreatePrev(lang);
            scene[HUD_BTN_HIDE] = HudPanel.CreateHide(lang);
            scene[HUD_BTN_LANG] = HudPanel.CreateLanguage();

            scene[HUD_BTN_NEXT].Clicked += (s, x, y) => { scene.GotoScene(SceneEnd.Create(s)); };
            scene[HUD_BTN_PREV].Clicked += (s, x, y) => { scene.GotoScene(SceneTut3.Create(s)); };
            scene[HUD_BTN_HIDE].Clicked += (s, x, y) => { scene.Minimize(HudOrigin.BottomLeft, 0, 0); };
            scene[HUD_BTN_LANG].Clicked += (s, x, y) => { scene.GotoScene(SceneLanguage.Create(s)); };
            scene.MinimizeHud            = SceneCommon.CreateMinimizeButton();
            return(scene);
        }
        public static HudScene Create(int session)
        {
            Log.Debug("Scenes", "Creating tutorial 1 scene for {0}", session);
            var scene = new HudScene {
                Session = session, Name = NAME
            };
            var user = AWHT.Instance.GetUser(session);
            var lang = user.Language;

            var hudTagline = new HudPanel(
                Lang.Get(lang, "Tut1a"), Colors.White,
                new Metric
            {
                Rectangle = new Rectangle(-512, 64, 1024, 64),
                Origin    = HudOrigin.Top
            },
                true);

            scene[HUD_TAGLINE] = hudTagline;

            var hudDiagramA = new HudPanel(
                new Texture {
                Name = "hud-tut1a.png"
            },
                new Metric
            {
                Rectangle = new Rectangle(-300, 0, 256, 128),
                Origin    = HudOrigin.Center
            });

            scene["diagramA"] = hudDiagramA;

            scene[HUD_BTN_NEXT] = HudPanel.CreateNext(lang);
            scene[HUD_BTN_HIDE] = HudPanel.CreateHide(lang);
            scene[HUD_BTN_LANG] = HudPanel.CreateLanguage();

            scene[HUD_BTN_NEXT].Clicked += (s, x, y) => { scene.GotoScene(SceneTut2.Create(s)); };
            scene[HUD_BTN_HIDE].Clicked += (s, x, y) => { scene.Minimize(HudOrigin.BottomLeft, 0, 0); };
            scene[HUD_BTN_LANG].Clicked += (s, x, y) => { scene.GotoScene(SceneLanguage.Create(s)); };
            scene.MinimizeHud            = SceneCommon.CreateMinimizeButton();
            return(scene);
        }
示例#3
0
        public static HudScene Create(int session)
        {
            Log.Debug("Scenes", "Creating end scene for {0}", session);
            var scene = new HudScene {
                Session = session, Name = NAME
            };
            var user = AWHT.Instance.GetUser(session);
            var lang = user.Language;

            var hudTagline = new HudPanel(
                Lang.Get(lang, "End"), Colors.White,
                new Metric
            {
                Rectangle = new Rectangle(-512, -80, 1024, 64),
                Origin    = HudOrigin.Center
            },
                true);

            scene[HUD_TAGLINE]  = hudTagline;
            scene[HUD_BTN_PREV] = HudPanel.CreatePrev(lang);
            scene[HUD_BTN_HIDE] = HudPanel.CreateHide(lang);

            scene[HUD_BTN_HIDE].Metrics = new Metric
            {
                Origin    = HudOrigin.Center,
                Rectangle = new Rectangle(44, 16, 128, 32)
            };

            scene[HUD_BTN_PREV].Metrics = new Metric
            {
                Origin    = HudOrigin.Center,
                Rectangle = new Rectangle(-128 - 44, 16, 128, 32)
            };

            scene[HUD_BTN_PREV].Clicked += (s, x, y) => { scene.GotoScene(SceneTut4.Create(s)); };
            scene[HUD_BTN_HIDE].Clicked += (s, x, y) => { scene.Minimize(HudOrigin.BottomLeft, 0, 0); };
            scene.MinimizeHud            = SceneCommon.CreateMinimizeButton();
            return(scene);
        }
示例#4
0
        public static HudScene Create(int session)
        {
            Log.Debug("Scenes", "Creating intro scene for {0}", session);
            var scene = new HudScene {
                Session = session, Name = NAME
            };

            var hudWelcome = new HudPanel(
                new Texture {
                Name = "hud-welcome.png"
            },
                new Metric
            {
                Rectangle = new Rectangle(-256, -200, 512, 128),
                Origin    = HudOrigin.Center
            }, true);


            hudWelcome.ShadowHud.Color = new AW.Color(0xA8, 0xC0, 0xFF);
            scene[HUD_WELCOME]         = hudWelcome;

            var hudClickForHelp = new HudPanel(
                Lang.Core.Get("ClickForHelp").Replace('|', '\n'), Colors.White,
                new Metric
            {
                Rectangle = new Rectangle(-150, -50, 300, 200),
                Origin    = HudOrigin.Center,
            });

            var hudHelpBanner = new HudPanel(
                new Texture {
                Name = "clr_white"
            },
                new Metric
            {
                Rectangle = new Rectangle(-150, -50, 300, 200),
                Origin    = HudOrigin.Center
            });

            hudHelpBanner.MainHud.Color    = Colors.OrangeRed;
            hudClickForHelp.MainHud.Flags |= HudFlag.Highlight;
            hudClickForHelp.Clickable      = true;
            hudClickForHelp.Clicked       += (s, x, y) =>
            {
                var user = AWHT.Instance.GetUser(s);

                if (user.Language != Languages.None)
                {
                    scene.GotoScene(SceneTut1.Create(s));
                }
                else
                {
                    scene.GotoScene(SceneLanguage.Create(s));
                }
            };
            scene[HUD_CLICKFORHELP]   = hudClickForHelp;
            scene[HUD_CLICKFORHELPBG] = hudHelpBanner;

            var hudClickToClose = new HudPanel(
                "X", new AW.Color(255, 255, 255),
                new Metric
            {
                Rectangle = new Rectangle(16, -64 - 16, 64, 64),
                Origin    = HudOrigin.BottomLeft,
            }, true);

            hudClickToClose.Clickable = true;
            hudClickToClose.Clicked  += (s, x, y) =>
            {
                scene.Minimize(HudOrigin.BottomLeft, 0, 0);
            };
            scene[HUD_CLICKTOCLOSE] = hudClickToClose;

            scene.MinimizeHud = SceneCommon.CreateMinimizeButton();
            return(scene);
        }