public override void OnKeyTyped(char key) { Bpm.OnKeyTyped(key); Offset.OnKeyTyped(key); UpdateTrack(); }
public override void OnKeyTyped(char key) { Offset.OnKeyTyped(key); SfxOffset.OnKeyTyped(key); JumpMSBox.OnKeyTyped(key); RotateBox.OnKeyTyped(key); UpdateTrack(); }
public override void OnKeyTyped(char key) { color1TextBox.OnKeyTyped(key); color2TextBox.OnKeyTyped(key); NoteColor1TextBox.OnKeyTyped(key); NoteColor2TextBox.OnKeyTyped(key); EditorBGOpacityTextBox.OnKeyTyped(key); GridOpacityTextBox.OnKeyTyped(key); TrackOpacityTextBox.OnKeyTyped(key); ShowColor(); ShowNoteColor(); ShowOpacities(); }
public override void OnKeyTyped(char key) { _tb.OnKeyTyped(key); }
public override void OnKeyTyped(char key) { BPMBox.OnKeyTyped(key); OffsetBox.OnKeyTyped(key); if (BPMBox.Focused) { var text = BPMBox.Text; var decimalPont = false; if (text.Length > 0 && text[text.Length - 1].ToString() == CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator) { text = text + 0; decimalPont = true; } if (text.Contains(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator)) { decimalPont = true; } decimal.TryParse(text, out var bpm); if (bpm < 0) { bpm = 0; } else if (bpm > 5000) { bpm = 5000; } if (!decimalPont && bpm > 0) { BPMBox.Text = bpm.ToString(); } } if (OffsetBox.Focused) { long.TryParse(OffsetBox.Text, out var offset); offset = (long)MathHelper.Clamp(offset, 0, EditorWindow.Instance.MusicPlayer.TotalTime.TotalMilliseconds); if (offset > 0) { OffsetBox.Text = offset.ToString(); } } if (Settings.Default.LegacyBPM) { if (float.TryParse(BPMBox.Text, out float bpm)) { GuiTrack.Bpm = bpm; } if (long.TryParse(OffsetBox.Text, out long offset)) { GuiTrack.BpmOffset = offset; } } }