public GuiScreenCreate() : base(0, 0, 0, 0) { _tb = new GuiTextBox(0, 0, 256, 64) { Centered = true, Focused = true }; _btnCreate = new GuiButton(0, 0, 0, 256, 64, "CREATE", false); _btnBack = new GuiButton(1, 0, 0, 256, 64, "BACK", false); _lbl.Color = Color.FromArgb(255, 255, 255); OnResize(EditorWindow.Instance.ClientSize); Buttons.Add(_btnCreate); Buttons.Add(_btnBack); if (File.Exists(Path.Combine(EditorWindow.Instance.LauncherDir, "background_menu.png"))) { bgImg = true; using (Bitmap img = new Bitmap(Path.Combine(EditorWindow.Instance.LauncherDir, "background_menu.png"))) { _textureId = TextureManager.GetOrRegister("createbg", img, true); } } }
public GuiScreenCreate() : base(0, 0, 0, 0) { _tb = new GuiTextBox(0, 0, 256, 64) { Centered = true, Focused = true }; _btnCreate = new GuiButton(0, 0, 0, 256, 64, "CREATE"); _btnBack = new GuiButton(1, 0, 0, 256, 64, "BACK"); _lbl.Color = Color.FromArgb(0, 255, 200); OnResize(EditorWindow.Instance.ClientSize); Buttons.Add(_btnCreate); Buttons.Add(_btnBack); }
public GuiScreenLoadCreate() : base(0, 0, EditorWindow.Instance.ClientSize.Width, EditorWindow.Instance.ClientSize.Height) { using (var img = Properties.Resources.logo) { _textureId = TextureManager.GetOrRegister("logo", img, true); } _createButton = new GuiButton(0, 0, 0, 192, 64, "CREATE MAP"); _loadButton = new GuiButton(1, 0, 0, 192, 64, "LOAD MAP"); _pasteButton = new GuiButton(2, 0, 0, 192, 64, "PASTE MAP"); Buttons.Add(_createButton); Buttons.Add(_loadButton); Buttons.Add(_pasteButton); OnResize(EditorWindow.Instance.ClientSize); }
public GuiScreenTimings() : base(0, 0, 0, 0) { BPMBox = new GuiTextBox(0, 0, 256, 48) { Text = GuiTrack.Bpm.ToString(), Centered = true, Numeric = true, CanBeNegative = false, Timings = true }; OffsetBox = new GuiTextBox(0, 0, 256, 48) { Text = GuiTrack.BpmOffset.ToString(), Centered = true, Numeric = true, CanBeNegative = false, Timings = true }; AddPoint = new GuiButton(0, 0, 0, 256, 48, "ADD POINT", true); RemovePoint = new GuiButton(1, 0, 0, 256, 48, "REMOVE POINT", true); UpdatePoint = new GuiButton(2, 0, 0, 256, 48, "UPDATE POINT", true); CurrentMs = new GuiButton(3, 0, 0, 256, 48, "USE CURRENT MS", true); BPMLabel.Color = Color.FromArgb(255, 255, 255); OffsetLabel.Color = Color.FromArgb(255, 255, 255); BPMBox.Focused = true; OffsetBox.Focused = true; BPMBox.OnKeyDown(Key.Right, false); OffsetBox.OnKeyDown(Key.Right, false); BPMBox.Focused = false; OffsetBox.Focused = false; ScrollBar = new GuiSlider(0, 0, 20, 100) { MaxValue = GuiTrack.BPMs.Count, Value = GuiTrack.BPMs.Count, }; OnResize(TimingPoints.Instance.ClientSize); Buttons.Add(AddPoint); Buttons.Add(RemovePoint); Buttons.Add(UpdatePoint); Buttons.Add(CurrentMs); Buttons.Add(ScrollBar); }
//private bool importmapclicked = false; //private readonly int _textureId; //private bool bgImg = false; public GuiScreenSelectMap() : base(0, 0, EditorWindow.Instance.ClientSize.Width, EditorWindow.Instance.ClientSize.Height) { using (var img = Properties.Resources.logo) { logoTxt = TextureManager.GetOrRegister("logo", img, true); } /* * if (File.Exists(Path.Combine(EditorWindow.Instance.LauncherDir, "background_menu.png"))) * { * bgImg = true; * using (Bitmap img = new Bitmap(Path.Combine(EditorWindow.Instance.LauncherDir, "background_menu.png"))) * { * _textureId = TextureManager.GetOrRegister("bg", img, true); * } * } */ if (File.Exists(Properties.Settings.Default.LastFile)) { _lastMapButton = new GuiButton(3, 0, 0, 256, 48, "EDIT LAST MAP", false); Buttons.Add(_lastMapButton); } _createMapButton = new GuiButton(0, 0, 0, 256, 48, "CREATE NEW MAP", false); _loadMapButton = new GuiButton(1, 0, 0, 256, 48, "EDIT EXISTING MAP", false); _importButton = new GuiButton(2, 0, 0, 256, 48, "IMPORT MAP", false); _pasteDataButton = new GuiButton(4, 0, 0, 256, 36, "PASTE DATA", false); _githubButton = new GuiButton(5, 0, 0, 256, 36, "GITHUB LINK", false); _pasteDataButton.Visible = false; _githubButton.Visible = false; Buttons.Add(_createMapButton); Buttons.Add(_loadMapButton); Buttons.Add(_importButton); Buttons.Add(_pasteDataButton); Buttons.Add(_githubButton); OnResize(EditorWindow.Instance.ClientSize); }
public GuiScreenEditor() : base(0, EditorWindow.Instance.ClientSize.Height - 64, EditorWindow.Instance.ClientSize.Width - 512 - 64, 64) { _toast = new GuiLabel(0, 0, "") { Centered = true, FontSize = 36 }; var playPause = new GuiButtonPlayPause(0, EditorWindow.Instance.ClientSize.Width - 512 - 64, EditorWindow.Instance.ClientSize.Height - 64, 64, 64); Bpm = new GuiTextBox(0, 0, 128, 32) { Text = "0", Centered = true, Numeric = true, Decimal = true }; Offset = new GuiTextBox(0, 0, 128, 32) { Text = "0", Centered = true, Numeric = true, CanBeNegative = true }; Reposition = new GuiCheckBox(1, "Offset Notes", 10, 0, 32, 32, false); BeatSnapDivisor = new GuiSlider(0, 0, 256, 40); Timeline = new GuiSliderTimeline(0, 0, EditorWindow.Instance.ClientSize.Width, 64); Tempo = new GuiSlider(0, 0, 512, 64) { MaxValue = 8, Value = 8 }; Timeline.Snap = false; BeatSnapDivisor.Value = Track.BeatDivisor - 1; BeatSnapDivisor.MaxValue = 23; MasterVolume = new GuiSlider(0, 0, 40, 256) { MaxValue = 50 }; SfxVolume = new GuiSlider(0, 0, 40, 256) { MaxValue = 50 }; SetOffset = new GuiButton(2, 0, 0, 64, 32, "SET"); BackButton = new GuiButton(3, 0, 0, Grid.ClientRectangle.Width + 1, 42, "BACK TO MENU"); CopyButton = new GuiButton(4, 0, 0, Grid.ClientRectangle.Width + 1, 42, "COPY MAP DATA"); Autoplay = new GuiCheckBox(5, "Autoplay", 0, 0, 32, 32, Settings.Default.Autoplay); ApproachSquares = new GuiCheckBox(5, "Approach Squares", 0, 0, 32, 32, Settings.Default.ApproachSquares); GridNumbers = new GuiCheckBox(5, "Grid Numbers", 0, 0, 32, 32, Settings.Default.GridNumbers); AnimateBackground = new GuiCheckBox(5, "Animate Background", 0, 0, 32, 32, Settings.Default.AnimateBackground); Bpm.Focused = true; Offset.Focused = true; Bpm.OnKeyDown(Key.Right, false); Offset.OnKeyDown(Key.Right, false); Bpm.Focused = false; Offset.Focused = false; Buttons.Add(playPause); Buttons.Add(Timeline); Buttons.Add(Tempo); Buttons.Add(MasterVolume); Buttons.Add(SfxVolume); Buttons.Add(BeatSnapDivisor); Buttons.Add(Reposition); Buttons.Add(Autoplay); Buttons.Add(ApproachSquares); Buttons.Add(GridNumbers); Buttons.Add(AnimateBackground); Buttons.Add(SetOffset); Buttons.Add(BackButton); Buttons.Add(CopyButton); OnResize(EditorWindow.Instance.ClientSize); EditorWindow.Instance.MusicPlayer.Volume = (float)Settings.Default.MasterVolume; MasterVolume.Value = (int)(Settings.Default.MasterVolume * MasterVolume.MaxValue); SfxVolume.Value = (int)(Settings.Default.SFXVolume * SfxVolume.MaxValue); }
//private object TimingPanel; //TimingPoints TimingPoints; public GuiScreenEditor() : base(0, EditorWindow.Instance.ClientSize.Height - 64, EditorWindow.Instance.ClientSize.Width - 512 - 64, 64) { if (File.Exists(Path.Combine(EditorWindow.Instance.LauncherDir, "background_editor.png"))) { this.bgImg = true; using (Bitmap img = new Bitmap(Path.Combine(EditorWindow.Instance.LauncherDir, "background_editor.png"))) { this._textureId = TextureManager.GetOrRegister("bg", img, true); } } _toast = new GuiLabel(0, 0, "", false) { Centered = true, FontSize = 36 }; var playPause = new GuiButtonPlayPause(0, EditorWindow.Instance.ClientSize.Width - 512 - 64, EditorWindow.Instance.ClientSize.Height - 64, 64, 64); Offset = new GuiTextBox(0, 0, 128, 32) { Text = "0", Centered = true, Numeric = true, CanBeNegative = false }; JumpMSBox = new GuiTextBox(0, 0, 128, 32) { Text = "0", Centered = true, Numeric = true, CanBeNegative = false, }; RotateBox = new GuiTextBox(0, 0, 128, 32) { Text = "0", Centered = true, Numeric = true, CanBeNegative = false, }; SfxOffset = new GuiTextBox(EditorWindow.Instance.ClientSize.Width - 128, 0, 128, 32) { Text = "0", Centered = true, Numeric = true, CanBeNegative = true }; NoteAlign = new GuiSlider(0, 0, 256, 40) { MaxValue = 59, Value = 2 }; BeatSnapDivisor = new GuiSlider(0, 0, 256, 40); Timeline = new GuiSliderTimeline(0, 0, EditorWindow.Instance.ClientSize.Width, 64); Tempo = new GuiSlider(0, 0, 512, 64) { MaxValue = 26, Value = 16 }; Timeline.Snap = false; BeatSnapDivisor.Value = GuiTrack.BeatDivisor - 1; BeatSnapDivisor.MaxValue = 31; MasterVolume = new GuiSlider(0, 0, 40, 256) { MaxValue = 50 }; SfxVolume = new GuiSlider(0, 0, 40, 256) { MaxValue = 50 }; SetOffset = new GuiButton(2, 0, 0, 64, 32, "SET", false); BackButton = new GuiButton(3, 0, 0, Grid.ClientRectangle.Width + 1, 42, "BACK TO MENU", false); CopyButton = new GuiButton(4, 0, 0, (Grid.ClientRectangle.Width - 5) / 2, 42, "COPY MAP DATA", false); PlayButton = new GuiButton(99, 0, 0, (Grid.ClientRectangle.Width - 5) / 2, 42, "PLAY MAP", false); JumpMSButton = new GuiButton(6, 0, 0, 64, 32, "JUMP", false); RotateButton = new GuiButton(7, 0, 0, 64, 32, "ROTATE", false); OpenTimings = new GuiButton(8, 0, 0, 200, 32, "OPEN TIMING SETUP PANEL", false); UseCurrentMs = new GuiButton(9, 0, 0, 200, 32, "USE CURRENT MS", false); Autoplay = new GuiCheckBox(5, "Autoplay", 0, 0, 32, 32, Settings.Default.Autoplay); ApproachSquares = new GuiCheckBox(5, "Approach Squares", 0, 0, 32, 32, Settings.Default.ApproachSquares); GridNumbers = new GuiCheckBox(5, "Grid Numbers", 0, 0, 32, 32, Settings.Default.GridNumbers); Quantum = new GuiCheckBox(5, "Quantum", 0, 0, 32, 32, Settings.Default.Quantum); AutoAdvance = new GuiCheckBox(5, "Auto-Advance", 0, 0, 32, 32, Settings.Default.AutoAdvance); Numpad = new GuiCheckBox(5, "Use Numpad", 0, 0, 32, 32, Settings.Default.Numpad); QuantumGridLines = new GuiCheckBox(5, "Quantum Grid Lines", 0, 0, 32, 32, Settings.Default.QuantumGridLines); QuantumGridSnap = new GuiCheckBox(5, "Snap to Grid", 0, 0, 32, 32, Settings.Default.QuantumGridSnap); Metronome = new GuiCheckBox(5, "Metronome", 0, 0, 32, 32, Settings.Default.Metronome); //LegacyBPM = new GuiCheckBox(5, "Use Legacy Panel", 0, 0, 24, 24, Settings.Default.LegacyBPM); Offset.Focused = true; SfxOffset.Focused = true; JumpMSBox.Focused = true; RotateBox.Focused = true; Offset.OnKeyDown(Key.Right, false); SfxOffset.OnKeyDown(Key.Right, false); JumpMSBox.OnKeyDown(Key.Right, false); RotateBox.OnKeyDown(Key.Right, false); Offset.Focused = false; SfxOffset.Focused = false; JumpMSBox.Focused = false; RotateBox.Focused = false; Buttons.Add(playPause); Buttons.Add(Timeline); Buttons.Add(Tempo); Buttons.Add(NoteAlign); Buttons.Add(MasterVolume); Buttons.Add(SfxVolume); Buttons.Add(BeatSnapDivisor); Buttons.Add(Autoplay); Buttons.Add(ApproachSquares); Buttons.Add(GridNumbers); Buttons.Add(Quantum); Buttons.Add(AutoAdvance); Buttons.Add(Numpad); Buttons.Add(QuantumGridLines); Buttons.Add(QuantumGridSnap); Buttons.Add(Metronome); //Buttons.Add(LegacyBPM); Buttons.Add(SetOffset); Buttons.Add(BackButton); Buttons.Add(CopyButton); Buttons.Add(PlayButton); Buttons.Add(JumpMSButton); Buttons.Add(RotateButton); Buttons.Add(OpenTimings); Buttons.Add(UseCurrentMs); OnResize(EditorWindow.Instance.ClientSize); EditorWindow.Instance.MusicPlayer.Volume = (float)Settings.Default.MasterVolume; SfxOffset.Text = Settings.Default.SfxOffset; MasterVolume.Value = (int)(Settings.Default.MasterVolume * MasterVolume.MaxValue); SfxVolume.Value = (int)(Settings.Default.SFXVolume * SfxVolume.MaxValue); // NoteAlign.Value = (int)(Settings.Default.NoteAlign * NoteAlign.MaxValue); SfxOffset.OnChanged += (_, value) => { Settings.Default.SfxOffset = SfxOffset.Text; }; }