Beispiel #1
0
        public LiveshowScreen()
        {
            LobbyTabControl <LobbyTabs> tabs;

            AddRangeInternal(new Drawable[]
            {
                new Background(@"https://i.imgur.com/0ywSXS7.png")
                {
                    FillMode  = FillMode.Fill,
                    Anchor    = Anchor.Centre,
                    Origin    = Anchor.Centre,
                    BlurSigma = new Vector2(5)
                },
                sidebar = new LovewingSidebar
                {
                    Origin           = Anchor.CentreRight,
                    Anchor           = Anchor.CentreRight,
                    RelativeSizeAxes = Axes.Y,
                    Depth            = -2
                },
                new LovewingToolbar
                {
                    Margin = new MarginPadding
                    {
                        Top = 10
                    },
                    Depth        = -1,
                    ButtonAction = toggleSideBar
                },
                bar = new Box
                {
                    RelativeSizeAxes = Axes.X,
                    Height           = 10,
                    Colour           = Color4.Orange
                },
                new FillFlowContainer
                {
                    Height           = 60,
                    RelativeSizeAxes = Axes.X,
                    Margin           = new MarginPadding {
                        Top = 10
                    },
                    Spacing  = Vector2.One,
                    Anchor   = Anchor.TopLeft,
                    Origin   = Anchor.TopLeft,
                    Children = new Drawable[]
                    {
                        new IconButton
                        {
                            Icon   = FontAwesome.fa_chevron_left,
                            Action = Exit,
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreLeft,
                            Size   = new Vector2(200, 40)
                        },
                        new ClickableContainer
                        {
                            Action   = toSolo,
                            Size     = new Vector2(250, 60),
                            Anchor   = Anchor.CentreLeft,
                            Origin   = Anchor.CentreLeft,
                            Children = new Drawable[]
                            {
                                new SpriteIcon
                                {
                                    Margin = new MarginPadding {
                                        Left = 10
                                    },
                                    Icon   = FontAwesome.fa_user,
                                    Size   = new Vector2(30),
                                    Anchor = Anchor.CentreLeft,
                                    Origin = Anchor.CentreLeft,
                                    Depth  = 0
                                },
                                new SpriteText
                                {
                                    TextSize = 30,
                                    Text     = "Solo",
                                    Origin   = Anchor.Centre,
                                    Anchor   = Anchor.Centre,
                                    Depth    = 0
                                },
                                soloBtnBox = new Box
                                {
                                    Alpha  = 0,
                                    Size   = new Vector2(250, 60),
                                    Anchor = Anchor.Centre,
                                    Origin = Anchor.Centre,
                                    Colour = Color4.Blue,
                                    Depth  = 1
                                }
                            }
                        },
                        new ClickableContainer
                        {
                            Action   = toMatchmaking,
                            Size     = new Vector2(250, 60),
                            Anchor   = Anchor.CentreLeft,
                            Origin   = Anchor.CentreLeft,
                            Children = new Drawable[]
                            {
                                new SpriteIcon
                                {
                                    Margin = new MarginPadding {
                                        Left = 10
                                    },
                                    Icon   = FontAwesome.fa_users,
                                    Size   = new Vector2(30),
                                    Anchor = Anchor.CentreLeft,
                                    Origin = Anchor.CentreLeft,
                                    Depth  = 0
                                },
                                new SpriteText
                                {
                                    TextSize = 30,
                                    Text     = "Group Stage",
                                    Origin   = Anchor.Centre,
                                    Anchor   = Anchor.Centre,
                                    Depth    = 0
                                },
                                mmBtnBox = new Box
                                {
                                    Size   = new Vector2(250, 60),
                                    Anchor = Anchor.Centre,
                                    Origin = Anchor.Centre,
                                    Colour = Color4.Orange,
                                    Depth  = 1
                                }
                            }
                        }
                    }
                },
                solo = new Container
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.Both,
                    Margin           = new MarginPadding
                    {
                        Left  = 300,
                        Top   = 300,
                        Right = 300
                    },
                    Children = new Drawable[]
                    {
                        new ClickableContainer
                        {
                            Anchor = Anchor.Centre,
                            Origin = Anchor.Centre,
                            Size   = new Vector2(128, 128),
                            Child  = new Box
                            {
                                Anchor           = Anchor.Centre,
                                Origin           = Anchor.Centre,
                                RelativeSizeAxes = Axes.Both
                            },
                            Action = () =>
                            {
                                var screen = new GameScreen();

                                Push(screen);
                            }
                        }
                    }
                },
                matchmaking = new Container
                {
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    RelativeSizeAxes = Axes.Both,
                    Margin           = new MarginPadding
                    {
                        Left  = 300,
                        Top   = 300,
                        Right = 300
                    },
                    Children = new Drawable[]
                    {
                        new Container
                        {
                            Margin = new MarginPadding
                            {
                                Left  = 200,
                                Right = 200
                            },
                            RelativeSizeAxes = Axes.Y,
                            Width            = 825,
                            Anchor           = Anchor.TopLeft,
                            Origin           = Anchor.TopLeft,
                            Children         = new Drawable[]
                            {
                                new FillFlowContainer
                                {
                                    Direction        = FillDirection.Vertical,
                                    RelativeSizeAxes = Axes.Both,
                                    Children         = new Drawable[]
                                    {
                                        tabs = new LobbyTabControl <LobbyTabs>
                                        {
                                            RelativeSizeAxes = Axes.X,
                                            Height           = 50
                                        },
                                        new ScrollContainer
                                        {
                                            ScrollbarAnchor  = Anchor.TopRight,
                                            ScrollbarVisible = true,
                                            RelativeSizeAxes = Axes.Both,
                                            Children         = new Drawable[]
                                            {
                                                new LobbyCard
                                                {
                                                    Anchor = Anchor.TopLeft,
                                                    Origin = Anchor.TopLeft
                                                },
                                                new LobbyCard
                                                {
                                                    Anchor = Anchor.TopRight,
                                                    Origin = Anchor.TopRight
                                                },
                                                new LobbyCard
                                                {
                                                    Anchor = Anchor.CentreLeft,
                                                    Origin = Anchor.CentreLeft
                                                },
                                                new LobbyCard
                                                {
                                                    Anchor = Anchor.CentreRight,
                                                    Origin = Anchor.CentreRight
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        new Container
                        {
                            Margin = new MarginPadding
                            {
                                Left  = 200,
                                Right = 200
                            },
                            RelativeSizeAxes = Axes.Y,
                            Width            = 200,
                            Anchor           = Anchor.TopRight,
                            Origin           = Anchor.TopRight,
                            Children         = new Drawable[]
                            {
                                new Container
                                {
                                    RelativeSizeAxes = Axes.X,
                                    Height           = 20,
                                    Anchor           = Anchor.TopLeft,
                                    Origin           = Anchor.TopLeft,
                                    Children         = new Drawable[]
                                    {
                                        new SpriteIcon
                                        {
                                            Anchor           = Anchor.CentreLeft,
                                            Origin           = Anchor.CentreLeft,
                                            Icon             = FontAwesome.fa_users,
                                            RelativeSizeAxes = Axes.Y,
                                            Width            = 20
                                        },
                                        new SpriteText
                                        {
                                            Margin = new MarginPadding {
                                                Left = 25
                                            },
                                            Anchor   = Anchor.CentreLeft,
                                            Origin   = Anchor.CentreLeft,
                                            Text     = "Party",
                                            TextSize = 30
                                        },
                                        new SpriteText
                                        {
                                            Colour   = Color4.WhiteSmoke,
                                            TextSize = 20,
                                            Text     = "1/9",
                                            Anchor   = Anchor.CentreRight,
                                            Origin   = Anchor.CentreRight
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            });

            tabs.Current.Default = LobbyTabs.All;

            tabs.Current.ValueChanged += filterLobbies;
        }
Beispiel #2
0
        public MainScreen()
        {
            Wedge liveshow, management, home;

            AddRange(new Drawable[]
            {
                new Background(@"Backgrounds/mainmenu")
                {
                    FillMode = FillMode.Fill,
                    Anchor   = Anchor.Centre,
                    Origin   = Anchor.Centre
                },
                idol = new Sprite
                {
                    Margin = new MarginPadding {
                        Left = 100
                    },
                    Anchor   = Anchor.BottomLeft,
                    Origin   = Anchor.BottomLeft,
                    FillMode = FillMode.Fit,
                    Scale    = new Vector2(0.9f)
                },
                sidebar = new LovewingSidebar
                {
                    Origin           = Anchor.CentreRight,
                    Anchor           = Anchor.CentreRight,
                    RelativeSizeAxes = Axes.Y,
                    Depth            = -2
                },
                new LovewingToolbar
                {
                    Depth        = -1,
                    ButtonAction = toggleSideBar
                },
                inboxOverlay   = new Inbox(),
                wedgeContainer = new Container <Wedge>
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new[]
                    {
                        liveshow = new LiveShowWedge
                        {
                            Anchor           = Anchor.BottomRight,
                            Origin           = Anchor.BottomRight,
                            RelativeSizeAxes = Axes.Both,
                            Width            = 0.5f,
                            Margin           = new MarginPadding {
                                Right = 100
                            },
                            Depth        = 2,
                            ButtonAction = toLiveshow

                                           /*Children = new[]
                                            * {
                                            *  new Container
                                            *  {
                                            *      Padding = new MarginPadding(15),
                                            *      Anchor = Anchor.Centre,
                                            *      Origin = Anchor.Centre,
                                            *      Children = new Drawable[]
                                            *      {
                                            *          new LovewingButton
                                            *          {
                                            *              TextSize = 75,
                                            *              Anchor = Anchor.BottomCentre,
                                            *              Origin = Anchor.BottomCentre,
                                            *              Text = "Solo",
                                            *              Size = new Vector2(500, 200),
                                            *              BackgroundColour = colours.Blue,
                                            *              HoverColour = colours.Blue,
                                            *          },
                                            *          new LovewingButton
                                            *          {
                                            *              TextSize = 75,
                                            *              Action = matchmaking,
                                            *              Anchor = Anchor.TopCentre,
                                            *              Origin = Anchor.TopCentre,
                                            *              Text = "Multiplayer",
                                            *              Size = new Vector2(500, 200),
                                            *              BackgroundColour = colours.Blue,
                                            *              HoverColour = colours.Blue,
                                            *          }
                                            *      }
                                            *  }
                                            * }*/
                        },
                        management = new IdolManagementWedge
                        {
                            Anchor           = Anchor.BottomRight,
                            Origin           = Anchor.BottomRight,
                            RelativeSizeAxes = Axes.Both,
                            Width            = 0.5f,
                            Margin           = new MarginPadding {
                                Right = 50
                            },
                            Children = new Drawable[]
                            {
                                new Container
                                {
                                    Padding  = new MarginPadding(15),
                                    Anchor   = Anchor.Centre,
                                    Origin   = Anchor.Centre,
                                    Children = new Drawable[]
                                    {
                                        new LovewingButton
                                        {
                                            TextSize         = 60,
                                            Size             = new Vector2(630, 200),
                                            Text             = "Game Test",
                                            BackgroundColour = colours.Yellow,
                                            Anchor           = Anchor.BottomCentre,
                                            Origin           = Anchor.BottomCentre,
                                            Action           = () => Push(new GameScreen())
                                        },
                                        new LovewingButton
                                        {
                                            TextSize         = 60,
                                            Size             = new Vector2(630, 200),
                                            Text             = "Another Button",
                                            BackgroundColour = colours.Yellow,
                                            Anchor           = Anchor.TopCentre,
                                            Origin           = Anchor.TopCentre
                                        }
                                    }
                                }
                            }
                        },
                        home = new HomeWedge
                        {
                            WedgeClick       = hideOverlays,
                            Anchor           = Anchor.BottomRight,
                            Origin           = Anchor.BottomRight,
                            RelativeSizeAxes = Axes.Both,
                            Width            = 0.5f,
                            Children         = new[]
                            {
                                new Container
                                {
                                    X        = -100,
                                    Y        = -220,
                                    Padding  = new MarginPadding(15),
                                    Anchor   = Anchor.Centre,
                                    Origin   = Anchor.Centre,
                                    Children = new Drawable[]
                                    {
                                        new LovewingDoubleButton
                                        {
                                            Angle            = -0.4f,
                                            ShearPosition    = new Vector2(140, 0),
                                            TextPosition     = new Vector2(-125, 60),
                                            TextSize         = 30,
                                            CornerRadius     = 5,
                                            Size             = new Vector2(400, 200),
                                            Text             = "Story",
                                            BackgroundColour = colours.Magenta,
                                            ShearColour      = colours.LightMagenta,
                                            Anchor           = Anchor.TopLeft,
                                            Origin           = Anchor.TopLeft
                                        },
                                        new LovewingButton
                                        {
                                            Action           = toggleInbox,
                                            TextPosition     = new Vector2(0, 60),
                                            TextSize         = 30,
                                            CornerRadius     = 100,
                                            Size             = new Vector2(200, 200),
                                            Text             = "Inbox",
                                            BackgroundColour = colours.White,
                                            HoverColour      = colours.Magenta,
                                            TextColour       = colours.Magenta,
                                            Anchor           = Anchor.TopRight,
                                            Origin           = Anchor.TopRight,
                                            Icon             = FontAwesome.fa_envelope_o,
                                            IconColour       = colours.Magenta,
                                            IconSize         = new Vector2(80),
                                            IconPosition     = new Vector2(0, -10)
                                        }
                                    }
                                },
                                new Container
                                {
                                    Y       = 235f,
                                    Padding = new MarginPadding(15),
                                    Anchor  = Anchor.Centre,
                                    Origin  = Anchor.Centre,
                                    Child   = new LovewingDoubleButton
                                    {
                                        Angle            = -0.7f,
                                        ShearPosition    = new Vector2(200, 0),
                                        TextPosition     = new Vector2(-200, 60),
                                        TextSize         = 40,
                                        CornerRadius     = 5,
                                        Size             = new Vector2(630, 200),
                                        Text             = "Events",
                                        BackgroundColour = colours.Magenta,
                                        ShearColour      = colours.LightMagenta,
                                        Anchor           = Anchor.BottomCentre,
                                        Origin           = Anchor.BottomCentre
                                    }
                                }
                            }
                        }
                    }
                }
            });

            /*inbox.Add(new Circle
             * {
             *  Y = -40,
             *  X = 40,
             *  Size = new Vector2(25),
             *  Colour = Color4.Red,
             *  Origin = Anchor.Centre,
             *  Anchor = Anchor.Centre,
             * });*/

            home.StateChanged       += vis => selectWedge(home, vis);
            management.StateChanged += vis => selectWedge(management, vis);
            liveshow.StateChanged   += vis => selectWedge(liveshow, vis);

            AddRange(new[]
            {
                liveshow.CreateButton(),
                management.CreateButton(),
                home.CreateButton()
            });
        }