Пример #1
0
 protected UIScreenLayer(
     ScreenLayerCollection parent, GeometryManager geometries,
     float originX = 0, float originY = 1, bool flipY = true)
     : base(parent)
 {
     Geometries   = geometries;
     Screen       = Screen.GetCanvas();
     this.originX = originX;
     this.originY = originY;
     this.flipY   = flipY;
 }
Пример #2
0
        public ConsoleScreenLayer(ScreenLayerCollection parent, GeometryManager geometries, Logger logger)
            : base(parent, geometries)
        {
            this.logger = logger;

            bounds       = new Bounds(new ScalingDimension(Screen.X), new FixedSizeDimension(Screen.Y, consoleHeight));
            consoleInput = new TextInput(Bounds.Within(bounds, consoleHeight - inputBoxHeight, padding, 0, padding));
            AddComponent(
                new ConsoleTextBox(Bounds.Within(bounds, padding, padding, padding + inputBoxHeight, padding), logger));
            AddComponent(consoleInput);
            consoleInput.Submitted += execute;
        }
Пример #3
0
        public StartScreen(ScreenLayerCollection parent, GeometryManager geometries, Logger logger, InputManager inputManager)
            : base(parent, geometries)
        {
            this.logger       = logger;
            this.inputManager = inputManager;

            AddComponent(new Menu(
                             Bounds.AnchoredBox(Screen, BoundsAnchor.End, BoundsAnchor.End, new Vector2(220, 200), -25 * Vector2.One),
                             new Func <Bounds, FocusableUIComponent> []
            {
                bounds => new Button(bounds, startServerLobby, "Start lobby", 48, .5f),
                bounds => new Button(bounds, startConnect, "Join lobby", 48, .5f)
            }));
        }
Пример #4
0
 protected ScreenLayer(ScreenLayerCollection parent)
 {
     Parent = parent;
 }
Пример #5
0
 protected ScreenLayerGroup(ScreenLayerCollection parent)
 {
     this.parent = parent;
 }