Ejemplo n.º 1
0
        public static HudScene Create(int session)
        {
            Log.Debug("Scenes", "Creating tutorial 3 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, "Tut3a"), 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-tut3a.png"
            },
                new Metric
            {
                Rectangle = new Rectangle(-150, 0, 64, 128),
                Origin    = HudOrigin.Center
            });

            scene["diagramA"] = hudDiagramA;

            var hudDiagramB = new HudPanel(
                new Texture {
                Name = "hud-tut3b.png"
            },
                new Metric
            {
                Rectangle = new Rectangle(64, 0, 128, 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(SceneTut4.Create(s)); };
            scene[HUD_BTN_PREV].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);
        }
Ejemplo n.º 2
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);
        }