Beispiel #1
0
        private void Show()
        {
            if (!GameBase.HasLogin)
            {
                return;
            }

            if (lastShow >= 0)
            {
                if (count < 5)
                {
                    coinsBuyButton.FadeIn(300);
                }
                lastShow = GameBase.Time;
                return;
            }

            GameBase.Scheduler.AddDelayed(delegate
            {
                lastShow = GameBase.Time;
                spriteManager.SpriteList.ForEach(s => { s.MoveToRelative(new Vector2(0, 35), 500, EasingTypes.Out); });

                coinsBg.FadeIn(300);

                GameBase.Scheduler.AddDelayed(delegate
                {
                    coinsFg.FadeIn(300);
                    coinsCount.FadeIn(300);
                    if (count < 5)
                    {
                        coinsBuyButton.FadeIn(300);
                    }
                }, 300);
            }, 500);
        }
Beispiel #2
0
        private void ShowStatusTemporarily()
        {
            if (!Visible)
            {
                return;
            }

            spriteInfo.FadeOut(100);
            spriteStatus.FadeIn(100);

            spriteStatus.Transformations.Add(
                new Transformation(TransformationType.Fade, 1, 0, GameBase.Time + 4000,
                                   GameBase.Time + 5000));
            spriteInfo.Transformations.Add(
                new Transformation(TransformationType.Fade, 0, 1, GameBase.Time + 4000,
                                   GameBase.Time + 5000));
        }
        private void startBinding(Bindings b, string name)
        {
            bindTextKey.Text = name;

            bindText1.FadeIn(200);
            bindText2.FadeIn(200);

            currentlyBinding = b;
        }
Beispiel #4
0
        public override void Update(GameTime gameTime)
        {
            if (!BanchoClient.Connected && GameBase.FadeState == FadeStates.Idle)
            {
                GameBase.ChangeMode(Modes.Menu);
                GameBase.ShowMessage("Multiplayer will not work unless Bancho is connected!");
            }

            if (LobbyUpdatePending)
            {
                string lobbyUsers = "";
                lock (BanchoClient.Users)
                {
                    List <User> users = BanchoClient.Users.FindAll(u => u.InLobby);
                    foreach (User user in users)
                    {
                        lobbyUsers += user.Name + "\n";
                    }
                }

                lobbyUserList.Text = lobbyUsers.Trim('\n');

                int x = 0;

                lock (Matches)
                {
                    Matches.Sort();

                    if (Matches.Count > 0)
                    {
                        foreach (Match m in Matches)
                        {
                            if (m.DrawAt(new Vector2(0, x)))
                            {
                                gameList.spriteManager.Add(m.SpriteCollection);
                            }
                            x += 27;
                        }
                        noMatches.FadeOut(0);
                    }
                    else
                    {
                        noMatches.FadeIn(500);
                    }
                }

                gameList.SetContentDimensions(new Vector2(540, x + 50));

                LobbyUpdatePending = false;
            }

            gameList.Update(gameTime);

            base.Update(gameTime);
        }
Beispiel #5
0
 public void Show()
 {
     Visible = true;
     if (Sprites != null)
     {
         spriteBackground.FadeIn(200);
         spriteForeground.FadeIn(200);
         spriteInfo.FadeIn(200);
         spriteName.FadeIn(200);
         spriteAvatar.FadeIn(200);
     }
 }
Beispiel #6
0
        private void spriteBackground_OnHoverLost(object sender, EventArgs e)
        {
            if (spriteStatus != null)
            {
                //This logic is only for user list panels, which alternate between display modes
                spriteInfo.FadeIn(100);
                spriteInfo.IsVisible = true;
                spriteStatus.FadeOut(100);
            }

            spriteForeground.FadeColour(CurrentForegroundColour, 200);
            spriteBackground.FadeColour(CurrentBackgroundColour, 200);
        }
Beispiel #7
0
 private void spriteBackground_OnHoverLost(object sender, EventArgs e)
 {
     spriteInfo.FadeIn(100);
     spriteStatus.FadeOut(100);
 }
Beispiel #8
0
        public override void Update()
        {
            if (!BanchoClient.Connected && GameBase.FadeState == FadeStates.Idle)
            {
                GameBase.ChangeMode(OsuModes.Menu);
                NotificationManager.ShowMessage(LocalisationManager.GetString(OsuString.Lobby_Bancho_Fail));
            }

            spriteManager.Blackness = LobbyStatus.Idle != Status ? 0.6f : 0;

            if (LobbyUpdatePending)
            {
                int x = 0;

                lock (Matches)
                {
                    Matches.Sort();

                    int visibleMatches = 0;

                    foreach (LobbyMatch m in Matches)
                    {
                        if (CheckFilter(m))
                        {
                            visibleMatches++;

                            bool firstDraw = m.DrawAt(new Vector2(3, x));

                            if (firstDraw || m.Filtered)
                            {
                                m.SpriteCollection.ForEach(s => s.FadeInFromZero(500));
                            }

                            if (firstDraw)
                            {
                                areaGameList.ContentSpriteManager.Add(m.SpriteCollection);
                            }

                            m.Filtered = false;

                            x += 49;
                        }
                        else
                        {
                            if (!m.Filtered)
                            {
                                if (m.SpriteCollection != null)
                                {
                                    m.SpriteCollection.ForEach(s => s.FadeOut(300));
                                }
                                m.Filtered = true;
                            }
                        }
                    }

                    headerText2.Text = string.Format(LocalisationManager.GetString(OsuString.Lobby_FilteredMatches), visibleMatches, Matches.Count);

                    if (visibleMatches > 0)
                    {
                        noMatches.FadeOut(50);
                    }
                    else
                    {
                        noMatches.Text = BanchoClient.InitializationComplete ? text_noMatchFound : text_loading;
                        noMatches.FadeIn(50);
                    }
                }

                areaGameList.SetContentDimensions(new Vector2(640, x + 50));

                LobbyUpdatePending = false;
            }

            areaGameList.Update();
            base.Update();
        }
Beispiel #9
0
 internal void Show()
 {
     icon.FadeIn(100);
     text.FadeIn(100);
 }