internal void SaveAs() { HideDifficultySwitch(); GameBase.MenuActive = true; SongSetup m = new SongSetup(true, false); if (m.ShowDialog(GameBase.Form) == DialogResult.OK) { BeatmapManager.Beatmaps.Sort(); //sorting by filename as it just changed. //ensure we reset the beatmap IDs. hitObjectManager.Beatmap.BeatmapId = 0; BeatmapManager.ProcessFolder(hitObjectManager.Beatmap.InOszContainer ? hitObjectManager.Beatmap.ExtractionFolder : hitObjectManager.Beatmap.ContainingFolderAbsolute); if (hitObjectManager.hitObjectsCount > 0) { DialogResult r = MessageBox.Show(LocalisationManager.GetString(OsuString.Editor_FileOperations_SaveAsDialog), @"osu!", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); if (r == DialogResult.Yes) { hitObjectManager.Clear(); hitObjectManager.Save(false, false, false); } } } GameBase.MenuActive = false; }
public OptionSlider(OsuString title, BindableDouble value, string unit = null, bool immediatelyAdjust = true) { this.value = value; localValue = value.Value; this.unit = unit; this.immediatelyAdjust = immediatelyAdjust; value.ValueChanged += value_ValueChanged; string text = LocalisationManager.GetString(title); header = new pText(text, 12, Vector2.Zero, 1, true, Color.White); spriteManager.Add(header); Size = header.MeasureText(); Slider = new pSliderBar(spriteManager, value.MinValue, value.MaxValue, value.Value, new Vector2(Size.X + 5, Size.Y / 2), (int)(ELEMENT_SIZE - Size.X - 5)); Slider.OnValueChanged += Slider_ValueChanged; Slider.KeyboardControl = true; Slider.KeyboardControlIncrement = value is BindableInt ? 1 : 0.01; addKeyword(text); addKeyword(title.ToString()); updateUnit(); }
protected override void runDifficultyCheck() { //HP if (Math.Round(map.DifficultyHpDrainRate) < 4 && Difficulty < BeatmapDifficulty.Hard) { Reports.Add(new AiReport(Severity.Info, LocalisationManager.GetString(OsuString.AIMetaMania_EasyHpBelow4))); } else if (Math.Round(map.DifficultyHpDrainRate) < 7 && Difficulty >= BeatmapDifficulty.Hard) { Reports.Add(new AiReport(Severity.Info, LocalisationManager.GetString(OsuString.AIMetaMania_HardHpBelow7))); } //OD double holdRate = map.countSlider * 1.0 / map.ObjectCount; if (holdRate < 0.05 && Math.Round(map.DifficultyOverall) < 8) { Reports.Add(new AiReport(Severity.Info, LocalisationManager.GetString(OsuString.AIMetaMania_VeryLowSliderOdBelow8))); } else if (holdRate < 0.25 && Math.Round(map.DifficultyOverall) < 7) { Reports.Add(new AiReport(Severity.Info, LocalisationManager.GetString(OsuString.AIMetaMania_LowSliderOdBelow7))); } else if (Math.Round(map.DifficultyOverall) < 5) { Reports.Add(new AiReport(Severity.Info, LocalisationManager.GetString(OsuString.AIMetaMania_OdBelow5))); } }
internal static bool Initialize() { if (!ConfigManager.sShaders) { return(true); } try { if (renderTarget != null) { renderTarget.Dispose(); } renderTarget = new RenderTarget2D(GameBase.WindowManager.Width, GameBase.WindowManager.Height); if (bloomShader != null) { bloomShader.Dispose(); } bloomShader = ShaderManager.Load(OsuVertexShader.Texture2D, OsuFragmentShader.Bloom); GameBase.OnResolutionChange -= GameBase_OnResolutionChange; GameBase.OnResolutionChange += GameBase_OnResolutionChange; } catch { ConfigManager.sBloomSoftening.Value = false; //Todo: Localize NotificationManager.ShowMessage(LocalisationManager.GetString(OsuString.BloomRenderer_InitializationFailed)); } return(true); }
private void OnCreateGame(object sender, EventArgs e) { if (!BanchoClient.Connected) { NotificationManager.ShowMessage(LocalisationManager.GetString(OsuString.Lobby_LoginFirst)); return; } if (Status == LobbyStatus.PendingCreate) { return; } if (BeatmapManager.Beatmaps.Count == 0) { NotificationManager.ShowMessage(LocalisationManager.GetString(OsuString.Lobby_NoBeatmapsAvailable)); return; } if (BeatmapManager.Current == null) { BeatmapManager.Current = BeatmapManager.Beatmaps[0]; } CreateGameDialog cgd = new CreateGameDialog(); GameBase.ShowDialog(cgd); }
private void toggleFilters(object sender, EventArgs e) { pButton but = sender as pButton; filtersVisible = !filtersVisible; const int ADJUSTMENT_HEADER = FILTER_ADJUSTMENT + 12; if (filtersVisible) { but.SetColour(Color.Red); but.Text.Text = LocalisationManager.GetString(OsuString.Lobby_Hide); but.SpriteCollection.ForEach(s => s.MoveToRelative(new Vector2(0, FILTER_ADJUSTMENT), 200, EasingTypes.Out)); //headerText2.MoveToRelative(new Vector2(0, ADJUSTMENT_HEADER), 200, EasingTypes.In); } else { but.SetColour(Color.YellowGreen); but.Text.Text = LocalisationManager.GetString(OsuString.Lobby_Filters); but.SpriteCollection.ForEach(s => s.MoveToRelative(new Vector2(0, -FILTER_ADJUSTMENT), 200, EasingTypes.Out)); //headerText2.MoveToRelative(new Vector2(0, -ADJUSTMENT_HEADER), 200, EasingTypes.In); } }
public static void JoinMatch(bMatch info, string password = null) { if (Status == LobbyStatus.PendingJoin) { return; } if (info.slotOpenCount <= info.slotUsedCount || Status != LobbyStatus.Idle) { NotificationManager.ShowMessage(LocalisationManager.GetString(OsuString.Lobby_MatchFull)); AudioEngine.PlaySample(@"match-leave"); } else if (info.passwordRequired && string.IsNullOrEmpty(password)) { JoinGameDialog jgd = new JoinGameDialog(info); GameBase.ShowDialog(jgd); return; } MatchSetup.Match = new ClientSideMatch(info); if (password != null) { MatchSetup.Match.gamePassword = password; } JoinMatch(info.matchId, password); }
internal static void CheckAndProcess(bool ForceRefresh, bool UserForced = false) { bool newFiles = ChangedFolders.Count > 0 || ChangedPackages.Count > 0; Logger.LogPrint($"ChangedFolders: {ChangedFolders.Count}\nChangedPackages: {ChangedPackages.Count}"); if (newFiles) { InvokeOnStatusUpdate(LocalisationManager.GetString(OsuString.BeatmapManager_LoadingNewFilesOnly)); ProcessBeatmaps(true); if (pulledOnlineStatsOnce) //save some bandwidth when adding a single new song if possible. { GetOnlineBeatmapInfo(NewFilesList); } } if ((!newFiles && ForceRefresh) || Beatmaps.Count == 0) { InvokeOnStatusUpdate(LocalisationManager.GetString(OsuString.BeatmapManager_ReloadingDatabase)); ProcessBeatmaps(false, !UserForced); } if (!pulledOnlineStatsOnce) { GetOnlineBeatmapInfo(); pulledOnlineStatsOnce = true; } ChangedFolders.Clear(); ChangedPackages.Clear(); NewFilesList.Clear(); }
internal override void Draw() { bool activePointSet = currentActivePoint != null; bool beatSyncing = (!activePointSet && AudioEngine.BeatSyncing) || (activePointSet && currentActivePoint.BeatLength > 0); if (beatSyncing) { beatBpmDisplay.Text = String.Format(KeyboardHandler.ControlPressed ? @"{0:0.000}" : @"{0:0.00}", 60000 / (activePointSet ? currentActivePoint.BeatLength : AudioEngine.BeatLength)); beatOffsetDisplay.Text = String.Format(@"{0:#,0}", (activePointSet ? currentActivePoint.Offset : AudioEngine.CurrentOffset)); sliderVelocityDisplay.Text = String.Format(@"{0:N2}", BeatmapManager.Current.DifficultySliderMultiplier); sliderTickDisplay.Text = String.Format(@"{0}", BeatmapManager.Current.DifficultySliderTickRate); beatDisplay.Text = String.Format(@"{0}:{1}", Metronome.CurrentStanza, Metronome.CurrentBeat); } else { beatDisplay.Text = LocalisationManager.GetString(OsuString.EditorModeTiming_TimingSectionNotTimed); beatBpmDisplay.Text = @"-"; beatOffsetDisplay.Text = @"-"; } spriteManagerCentre.Draw(); base.Draw(); Metronome.Draw(); }
internal TournamentLobby(Tournament tournament, SpriteManager spriteManager, float depth) { this.tournament = tournament; Vector2 pos = tournament.ControlPanelLocation; pText tmp; spriteManager.Add(tmp = new pText(LocalisationManager.GetString(OsuString.Tournament_MakeAMultiplayerRoomWithFormat), 10, new Vector2(0, pos.Y), depth, true, Color.White)); pos.Y += (int)tmp.MeasureText().Y; spriteManager.Add(tmp = new pText(acronym + @": (team 1 name) vs (team 2 name)", 10, new Vector2(0, pos.Y), depth, true, Color.White) { TextBold = true }); // Splitter between text and matches pos.Y += (int)tmp.MeasureText().Y; spriteManager.Add(new pSprite(GameBase.WhitePixel, Fields.TopLeft, Origins.TopLeft, Clocks.Game, new Vector2(0, pos.Y), depth, true, new Color(255, 255, 255, 127)) { VectorScale = new Vector2(300 * 1.6f, 1) }); pos.Y += 3; matchesArea = new pScrollableArea(new Rectangle(0, (int)pos.Y, 300, (int)(480 - pos.Y)), Vector2.Zero, true); matchesArea.SetContentDimensions(new Vector2(300, 0)); requestMatchInfo(); updateMatches(); }
internal override bool DoSkip() { if (OutroSkippable) { base.DoSkip(); return(true); } if (queueSkipCount > 0) { NotificationManager.ClearMessageMassive(); MultiSkipRequested = false; clearSkippedStatus(); base.DoSkip(); return(true); } if (!MultiSkipRequested && (AudioEngine.Time < SkipBoundary) && Status == PlayerStatus.Intro) { MultiSkipRequested = true; NotificationManager.ShowMessageMassive(LocalisationManager.GetString(OsuString.PlayerVs_SkipRequest), 2000); BanchoClient.SendRequest(RequestType.Osu_MatchSkipRequest, null); } return(false); }
/// <summary> /// Runs all current rulesets and stores them in AiReports. /// </summary> internal void RunAllRules(HitObjectManager hitObjectManager) { if (Rulesets.Count == 0) { initializeRulesets(); } Reports.Clear(); //hitobjects could have stacking effects that might change their position hitObjectManager.ClearPositionOffsets(); List <AiReport> reportsAll = Reports[AiModType.All] = new List <AiReport>(); foreach (AiModRuleset r in Rulesets) { List <AiReport> reports = r.Run(hitObjectManager); Report(r.Type, reports); } if (reportsAll.Count == 0) { reportsAll.Add(new AiReport(-1, Severity.Info, LocalisationManager.GetString(OsuString.AIModWindow_NoProblemsFound), 0, null)); } }
protected override void OnLoadStart() { base.OnLoadStart(); multiplayerRankingText = new pText(string.Empty, 80, new Vector2(10, 10), Vector2.Zero, 0, true, new Color(255, 255, 255, 100), false); multiplayerRankingText.Field = Fields.BottomRight; multiplayerRankingText.Origin = Origins.BottomRight; spriteManagerBelowHitObjectsWidescreen.Add(multiplayerRankingText); if (!AllPlayersLoaded) { NotificationManager.ShowMessageMassive(LocalisationManager.GetString(OsuString.PlayerVs_WaitingForPlayers), 300000); } if (Match.beatmapChecksum != BeatmapManager.Current.BeatmapChecksum) { //getting here when hitting mp invites in spectate mode. GameBase.ChangeMode(OsuModes.Lobby); return; } MultiRuleset.Initialize(); for (int i = 0; i < bMatch.MAX_PLAYERS; i++) { //initialize HpGraph HpGraphCollection[i] = new List <Vector2>(); if (Match.slotStatus[i] == SlotStatus.Quit) { MultiRuleset.HandlePlayerLeft(i); } } }
internal override void GotoRanking(bool force = false) { if (AllPlayersCompleted || force) { //force a reorder before going to ranking screen. ScoreBoard.Reorder(false); if (TeamOverlay != null) { GameBase.ChangeMode(OsuModes.RankingTeam); NotificationManager.ClearMessageMassive(); } else { MultiRuleset.LoadRanking(); } } else { //gotoranking will never be called twice, so when we get here it gets stuck. if (!MultiPass) { MultiPass = true; SendMapComplete(); NotificationManager.ShowMessageMassive(LocalisationManager.GetString(OsuString.PlayerVs_WaitingForFinish), 300000); } } }
internal static bool Initialize() { if (!ConfigManager.sShaders) { return(true); } try { if (vShader != null) { vShader.Dispose(); } vShader = ShaderManager.Load(OsuVertexShader.Texture2D, OsuFragmentShader.BlurVertical); if (hShader != null) { hShader.Dispose(); } hShader = ShaderManager.Load(OsuVertexShader.Texture2D, OsuFragmentShader.BlurHorizontal); } catch { ConfigManager.sShaders = false; //Todo: Localize NotificationManager.ShowMessage(LocalisationManager.GetString(OsuString.BlurRenderer_InitializationFailed)); } return(true); }
public ChangelogOverlay(Game game, bool fullscreen = false) : base(game) { if (fullscreen) { Width = GameBase.WindowManager.WidthScaled; Height = 226; startHeight = 0; } area = new pScrollableArea(new Rectangle(0, GameBase.WindowManager.HeightScaled - Height, Width, Height), Vector2.Zero, true); area.HeaderHeight = startHeight; int year = General.VERSION / 10000; int month = General.VERSION / 100 - year * 100; int day = General.VERSION - year * 10000 - month * 100; int version_dated = Int32.Parse(new DateTime(year, month, day).AddDays(-14).ToString("yyyyMMdd")); int version_current = Int32.Parse(new DateTime(year, month, day).ToString("yyyyMMdd")); pWebRequest snr = new pWebRequest(General.WEB_ROOT + "/p/changelog?updater=3" + (!string.IsNullOrEmpty(General.SUBVERSION) ? "&test=1" : "¤t=" + version_current + "&from=" + version_dated)); snr.Finished += snr_onFinish; snr.Perform(); pSprite bg = new pSprite(GameBase.WhitePixel, Vector2.Zero, 0.5f, true, Color.Black); bg.Scale = 1.6f; bg.ViewOffsetImmune = true; bg.VectorScale = new Vector2(Width, Height); bg.Alpha = 0.5f; area.ContentSpriteManager.Add(bg); if (!fullscreen) { pText t = new pText(LocalisationManager.GetString(OsuString.Update_RecentChanges), 10, new Vector2(3, 3), Vector2.Zero, 0.9992f, true, Color.White, false); t.ViewOffsetImmune = true; t.TextBold = true; area.ContentSpriteManager.Add(t); bg = new pSprite(GameBase.WhitePixel, Vector2.Zero, 0.9991f, true, SkinManager.NEW_SKIN_COLOUR_SECONDARY); bg.Scale = 1.6f; bg.ViewOffsetImmune = true; bg.VectorScale = new Vector2(Width, startHeight); bg.Alpha = 0.8f; bg.HandleInput = true; bg.HoverEffect = new Transformation(Color.DarkBlue, Color.LightBlue, 0, 50); bg.OnClick += delegate { area.ContentSpriteManager.SpriteList.ForEach(s => s.FadeOut(100)); GameBase.Scheduler.AddDelayed(delegate { area.Hide(); }, 100); }; area.ContentSpriteManager.Add(bg); } }
internal static void AdjustSpeed(int delta) { int speed = Speed + delta; SetSpeed(speed, true); NotificationManager.ShowMessageMassive(string.Format(LocalisationManager.GetString(OsuString.ConfigMania_OsuManiaSpeedSet), GetSpeedString()), 1750); }
public static void Initialize() { if (isInitialized) { return; } #if MONO return; #endif if (File.Exists(LogFileFullPath)) { string contents = File.ReadAllText(LogFileFullPath); File.Delete(LogFileFullPath); GameBase.Scheduler.Add(delegate { Notification notification = new Notification( "Oops...", LocalisationManager.GetString(OsuString.Crashed) ?? "A serious crash happened and has been reported", NotificationStyle.Okay); GameBase.Notify(notification); }, true); Report(contents); } AppDomain.CurrentDomain.UnhandledException += HandleException; isInitialized = true; }
internal ChannelListDialog() : base(LocalisationManager.GetString(OsuString.ChannelListDialog_SelectAnyChannelYouWishToJoin), true) { channelButtonList = new pScrollableArea(new Rectangle(0, 60, 550, 321), Vector2.Zero, false, 0, defaultTargetType); currentVerticalSpace = 400; AddOption(LocalisationManager.GetString(OsuString.General_Close), SkinManager.NEW_SKIN_COLOUR_MAIN, null, true); }
private void WithBeatmapReload(VoidDelegate action) { DialogResult r; if (editor.changeManager.Dirty) { r = MessageBox.Show(LocalisationManager.GetString(OsuString.EditorControl_BeatmapMustBeSavedDialog), @"osu!", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); if (r == DialogResult.Yes) { editor.SaveFile(); } else if (r == DialogResult.Cancel) { return; } } else { r = DialogResult.Yes; } action(); editor.LoadFile(editor.hitObjectManager.Beatmap, r == DialogResult.No, true); }
internal override void CopySelection() { copiedPoints.Clear(); StringBuilder timingInfo = new StringBuilder(); for (int i = 0; i < AudioEngine.ControlPoints.Count; i++) { ControlPoint p = AudioEngine.ControlPoints[i]; if (p.TimingChange) { timingInfo.AppendFormat("{2}. Offset: {0:#,0}ms\tBPM: {1:#.00#}\n", p.Offset, p.Bpm, i + 1); } else { timingInfo.AppendFormat("{2}. Offset: {0:#,0}ms\tBPM: Inherited ({1}x)\n", p.Offset, Math.Round(-100f / p.BeatLength, 1), i + 1); } } try { System.Windows.Forms.Clipboard.SetText(timingInfo.ToString()); } catch (Exception) { NotificationManager.ShowMessage(LocalisationManager.GetString(OsuString.General_Editor_ClipboardNotAvailable)); } }
private void checkFiles() { DirectoryInfo di = new DirectoryInfo(BeatmapManager.Current.ContainingFolderAbsolute); FileInfo[] files = di.GetFiles(@"*", SearchOption.AllDirectories); long totalSize = 0; bool hasVideo = false; foreach (FileInfo fi in files) { totalSize += fi.Length; if (!hasVideo) { hasVideo = GeneralHelper.GetFileType(fi.Name) == FileType.Video; } } totalSize /= 1024; //Kb if (!hasVideo && totalSize > 10 * 1024) { Reports.Add(new AiReport(Severity.Warning, LocalisationManager.GetString(OsuString.AIMapset_LargeFilesize))); } else if (hasVideo && totalSize > 24 * 1024) { Reports.Add(new AiReport(Severity.Warning, LocalisationManager.GetString(OsuString.AIMapset_LargeFilesizeVideo))); } }
public static void OnJoinFail() { MatchSetup.Match = null; NotificationManager.ShowMessageMassive(LocalisationManager.GetString(OsuString.Lobby_Join_Fail), 2000); AudioEngine.PlaySample(@"match-leave"); Status = GameBase.Mode == OsuModes.Lobby ? LobbyStatus.Idle : LobbyStatus.NotJoined; }
private OptionSection getLoginSection() { loginUserTB = null; loginPassTB = null; if (!BanchoClient.AllowUserSwitching) { return(new OptionSection(OsuString.General_Login) { Children = new[] { new OptionText(LocalisationManager.GetString(OsuString.Options_ClientLocked)) } }); } if (BanchoClient.Authenticated) { return(new OptionSection(OsuString.General_Login) { Children = new[] { new OptionText(string.Format(LocalisationManager.GetString(OsuString.Options_LoggedIn), ConfigManager.sUsername), delegate { UserProfile.DisplayProfileFor(GameBase.User); }) } }); } if (GameBase.HasLogin) { return(new OptionSection(OsuString.General_Login) { Children = new OptionElement[] { new OptionSpinner() } }); } ; BanchoClient.DisableBancho = true; OptionSection loginSection = new OptionSection(OsuString.General_Login) { Children = new OptionElement[] { (loginUserTB = new OptionTextbox(OsuString.Options_Username, ConfigManager.sUsername)), (loginPassTB = new OptionTextbox(OsuString.Options_Password, true)), new OptionCheckbox(LocalisationManager.GetString(OsuString.Options_RememberUsername), string.Empty, ConfigManager.sSaveUsername), new OptionCheckbox(LocalisationManager.GetString(OsuString.Options_RememberPassword), string.Empty, ConfigManager.sSavePassword), new OptionButton(OsuString.General_Login, SkinManager.NEW_SKIN_COLOUR_SECONDARY, delegate { performLogin(); }), new OptionButton(LocalisationManager.GetString(OsuString.Options_CreateAnAccount), SkinManager.NEW_SKIN_COLOUR_SECONDARY, delegate { GameBase.ProcessStart(General.WEB_ROOT + @"/p/register"); }) } }; loginUserTB.Textbox.InputControl.OnKey += handleLoginTextBoxInput; loginPassTB.Textbox.InputControl.OnKey += handleLoginTextBoxInput; return(loginSection); }
private void resnapAllNotesToolStripMenuItem_Click(object sender, EventArgs e) { if (DialogResult.Yes == MessageBox.Show(LocalisationManager.GetString(OsuString.EditorControl_SnapAllNotesWarning), @"osu!", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)) { editor.Timing.BeatSnapSong(); } }
private void retimeCurrentPointToolStripMenuItem_Click(object sender, EventArgs e) { if (DialogResult.Yes == MessageBox.Show(LocalisationManager.GetString(OsuString.EditorControl_ResetCurrentTimingWarning), @"osu!", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)) { GameBase.Scheduler.Add(editor.Timing.TimingReset); } }
public void UpdateText() { var textMeshPro = GetComponentInChildren <TextMeshProUGUI>(); if (textMeshPro != null) { textMeshPro.text = LocalisationManager.GetString(stringKey.ToString()); } }
private void performAddDel(bool isDel, bool addCompleteSet = false) { bool hasChange = false; if (addCompleteSet) { List <Beatmap> maps = BeatmapManager.Beatmaps.FindAll(b => b.ContainingFolder == BeatmapManager.Current.ContainingFolder); foreach (Beatmap map in maps) { if (isDel) { if (CollectionManager.RemoveFromCollection(Name, map.BeatmapChecksum)) { Count--; hasChange = true; } } else { if (CollectionManager.AddToCollection(Name, map.BeatmapChecksum)) { Count++; hasChange = true; } } } } else { if (isDel) { if (CollectionManager.RemoveFromCollection(Name, BeatmapManager.Current.BeatmapChecksum)) { Count--; hasChange = true; } } else { if (CollectionManager.AddToCollection(Name, BeatmapManager.Current.BeatmapChecksum)) { Count++; hasChange = true; } } } if (!hasChange) { return; } NotificationManager.ShowMessageMassive(string.Format(isDel ? LocalisationManager.GetString(OsuString.CollectionSprites_Removed) : LocalisationManager.GetString(OsuString.CollectionSprites_Added), addCompleteSet ? BeatmapManager.Current.SortTitle : BeatmapManager.Current.DisplayTitleFull, Name), 1500); UpdateState(); }
private void UpdateTextFields() { if (!StatsLoaded) { InfoText = string.Empty; } else { if (PerformancePoints > 0) { InfoText = string.Format(GameBase.nfi, "Performance:{0}pp\nAccuracy:{1:0.00}%\n" + (extended ? @"Play Count: {2} (Lv{3:0})" : @"Lv{3}"), PerformancePoints.ToString(@"#,0", GameBase.nfi), Accuracy, PlayCount, (int)Level, PerformancePoints); } else if (RankedScore > 0) { float score = RankedScore; string suffix = string.Empty; if (score > 1000000000) { suffix = @"b"; score /= 1000000000f; } else if (score > 1000000) { suffix = @"m"; score /= 1000000f; } else if (score > 0) { suffix = @"k"; score /= 1000f; } string scoreString = (score % 1 != 0 ? score.ToString(@"#,0.0", GameBase.nfi) : score.ToString(@"#,0", GameBase.nfi)) + suffix; InfoText = string.Format(GameBase.nfi, "Score:{0}\nAccuracy:{1:0.00}%\n" + (extended ? @"Play Count: {2} (Lv{3:0})" : @"Lv{3}"), scoreString, Accuracy, PlayCount, (int)Level); } else { InfoText = LocalisationManager.GetString(OsuString.User_Neverplayed); } RankText = Rank == 0 ? string.Empty : @"#" + Rank; } if (Sprites != null) { spriteInfo.Text = InfoText; spriteName.Text = Name; if (spriteStatus != null) { spriteStatus.Text = StatusText; } updateLevelBar(); spriteRank.Text = RankText; } }
private void recalculateSlidersToolStripMenuItem_Click(object sender, EventArgs e) { if (DialogResult.OK == MessageBox.Show( LocalisationManager.GetString(OsuString.EditorControl_RecalculateSlidersMessage), @"osu!", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation)) { editor.Timing.RecalculateSliderLengths(); } }