Ejemplo n.º 1
0
        /// <summary>
        ///     Ctor
        /// </summary>
        /// <param name="screen"></param>
        /// <param name="ruleset"></param>
        public GameplayPlayfieldKeys(GameplayScreen screen, GameplayRulesetKeys ruleset)
        {
            Screen    = screen;
            Ruleset   = ruleset;
            Container = new Container();

            // Create background container
            BackgroundContainer = new Container
            {
                Parent    = Container,
                Size      = new ScalableVector2(Width, WindowManager.Height),
                Alignment = Alignment.TopCenter,
                X         = SkinManager.Skin.Keys[screen.Map.Mode].ColumnAlignment
            };

            // Create the foreground container.
            ForegroundContainer = new Container
            {
                Parent    = Container,
                Size      = new ScalableVector2(Width, WindowManager.Height),
                Alignment = Alignment.TopCenter,
                X         = BackgroundContainer.X
            };

            Stage = new GameplayPlayfieldKeysStage(Screen, this);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Create Foreground and Background Containers, as well as the Stage.
        /// </summary>
        private void CreateElementContainers()
        {
            // Create background container
            BackgroundContainer = new Container
            {
                Parent    = Container,
                Size      = new ScalableVector2(Width, WindowManager.Height),
                Alignment = Alignment.TopCenter,
                X         = SkinManager.Skin.Keys[Screen.Map.Mode].ColumnAlignment
            };

            // Create the foreground container.
            ForegroundContainer = new Container
            {
                Parent    = Container,
                Size      = new ScalableVector2(Width, WindowManager.Height),
                Alignment = Alignment.TopCenter,
                X         = SkinManager.Skin.Keys[Screen.Map.Mode].ColumnAlignment
            };

            Stage = new GameplayPlayfieldKeysStage(Screen, this);
        }