void pb_OnClick(pText p, pText pname) { string attemptJoin = p.Tag.ToString(); Channel c = ChatEngine.channels.Find(s => s.Name == attemptJoin); if (c == null) { NotificationManager.ShowMessageMassive(LocalisationManager.GetString(OsuString.ChannelListDialog_CantRejoinThisChannel), 1500); return; } if (InputManager.rightButtonLast == ButtonState.Pressed) { if (!c.Joined || !c.Closeable) { return; } ChatEngine.RemoveChannel(c); NotificationManager.ShowMessageMassive(string.Format(LocalisationManager.GetString(OsuString.ChannelListDialog_Left), c.Name), 1500); p.FadeColour(SkinManager.NEW_SKIN_COLOUR_SECONDARY, 300); pname.FadeColour(SkinManager.NEW_SKIN_COLOUR_SECONDARY, 300); } else { if (!c.Joined) { Channel chan = null; try { chan = ChatEngine.AddChannel(attemptJoin, false, true); if (chan == null) { NotificationManager.ShowMessageMassive(string.Format(LocalisationManager.GetString(OsuString.ChannelListDialog_JoiningTooFast), attemptJoin), 1500); return; } ChatEngine.channelTabs.SetSelected(chan); NotificationManager.ShowMessageMassive(string.Format(LocalisationManager.GetString(OsuString.ChannelListDialog_Joined), chan.Name), 1500); p.FadeColour(SkinManager.NEW_SKIN_COLOUR_MAIN, 300); pname.FadeColour(SkinManager.NEW_SKIN_COLOUR_MAIN, 300); } catch { } } else { NotificationManager.ShowMessageMassive(LocalisationManager.GetString(OsuString.ChannelListDialog_AlreadyJoined), 1500); } } Update(); }
private void UpdateMultiplier() { double mult = ModManager.ScoreMultiplier(); modMultiplier.Text = string.Format("Score Multiplier: {0:0.00}x", mult); if (mult > 1) { modMultiplier.FadeColour(Color.GreenYellow, 400); } else if (mult < 1) { modMultiplier.FadeColour(Color.OrangeRed, 400); } else { modMultiplier.FadeColour(Color.White, 400); } }