protected override void OnDirect2DInitialized(Direct2DGraphics g) { theme = Theme.CreateResourcesForGraphics(g); bmpTracks[Channel.Square1] = g.ConvertBitmap(Resources.Square); bmpTracks[Channel.Square2] = g.ConvertBitmap(Resources.Square); bmpTracks[Channel.Triangle] = g.ConvertBitmap(Resources.Triangle); bmpTracks[Channel.Noise] = g.ConvertBitmap(Resources.Noise); bmpTracks[Channel.DPCM] = g.ConvertBitmap(Resources.DPCM); bmpEdit = g.ConvertBitmap(Resources.EditSmall); bmpGhostNote = g.ConvertBitmap(Resources.GhostSmall); playPositionBrush = g.CreateSolidBrush(new RawColor4(Theme.LightGreyFillColor1.R, Theme.LightGreyFillColor1.G, Theme.LightGreyFillColor1.B, 0.75f)); whiteKeyBrush = g.CreateHorizontalGradientBrush(0, TrackNameSizeX, Theme.LightGreyFillColor1, Theme.LightGreyFillColor2); patternHeaderBrush = g.CreateVerticalGradientBrush(0, PatternHeaderSizeY, Theme.LightGreyFillColor1, Theme.LightGreyFillColor2); selectedPatternBrush = g.CreateSolidBrush(new RawColor4(Theme.LightGreyFillColor1.R, Theme.LightGreyFillColor1.G, Theme.LightGreyFillColor1.B, 0.5f)); }
protected override void OnDirect2DInitialized(Direct2DGraphics g) { theme = Theme.CreateResourcesForGraphics(g); toolbarBrush = g.CreateHorizontalGradientBrush(0, 81, Theme.LightGreyFillColor1, Theme.LightGreyFillColor2); bmpLoopNone = g.ConvertBitmap(Resources.LoopNone); bmpLoopSong = g.ConvertBitmap(Resources.Loop); bmpLoopPattern = g.ConvertBitmap(Resources.LoopPattern); bmpPlay = g.ConvertBitmap(Resources.Play); bmpPause = g.ConvertBitmap(Resources.Pause); buttons[ButtonNew] = new Button { X = 4, Y = 4, Bmp = g.ConvertBitmap(Resources.File), Click = OnNew }; buttons[ButtonOpen] = new Button { X = 44, Y = 4, Bmp = g.ConvertBitmap(Resources.Open), Click = OnOpen }; buttons[ButtonSave] = new Button { X = 84, Y = 4, Bmp = g.ConvertBitmap(Resources.Save), Click = OnSave, RightClick = OnSaveAs }; buttons[ButtonExport] = new Button { X = 124, Y = 4, Bmp = g.ConvertBitmap(Resources.Export), Click = OnExport, Enabled = OnExportEnabled }; buttons[ButtonUndo] = new Button { X = 164, Y = 4, Bmp = g.ConvertBitmap(Resources.Undo), Click = OnUndo, Enabled = OnUndoEnabled }; buttons[ButtonRedo] = new Button { X = 204, Y = 4, Bmp = g.ConvertBitmap(Resources.Redo), Click = OnRedo, Enabled = OnRedoEnabled }; buttons[ButtonPlay] = new Button { X = 436, Y = 4, Click = OnPlay, GetBitmap = OnPlayGetBitmap }; buttons[ButtonRewind] = new Button { X = 476, Y = 4, Bmp = g.ConvertBitmap(Resources.Rewind), Click = OnRewind }; buttons[ButtonLoop] = new Button { X = 516, Y = 4, Click = OnLoop, GetBitmap = OnLoopGetBitmap }; buttons[ButtonNew].ToolTip = "New Project (Ctrl-N)"; buttons[ButtonOpen].ToolTip = "Open Project (Ctrl-O)"; buttons[ButtonSave].ToolTip = "Save Project (Ctrl-S) [Right-Click: Save As...]"; buttons[ButtonExport].ToolTip = "Export to various formats (Ctrl+E)"; buttons[ButtonUndo].ToolTip = "Undo (Ctrl+Z)"; buttons[ButtonRedo].ToolTip = "Redo (Ctrl+Y)"; buttons[ButtonPlay].ToolTip = "Play/Pause (Space) [Ctrl+Space: Play pattern loop, Shift-Space: Play song loop]"; buttons[ButtonRewind].ToolTip = "Rewind (Home) [Ctrl+Home: Rewind to beginning of current pattern]"; buttons[ButtonLoop].ToolTip = "Toggle Loop Mode"; }
protected override void OnDirect2DInitialized(Direct2DGraphics g) { theme = Theme.CreateResourcesForGraphics(g); bmpVolume = g.ConvertBitmap(Resources.Volume); bmpPitch = g.ConvertBitmap(Resources.Pitch); bmpArpeggio = g.ConvertBitmap(Resources.Arpeggio); bmpDuty[0] = g.ConvertBitmap(Resources.Duty0); bmpDuty[1] = g.ConvertBitmap(Resources.Duty1); bmpDuty[2] = g.ConvertBitmap(Resources.Duty2); bmpDuty[3] = g.ConvertBitmap(Resources.Duty3); bmpDPCM = g.ConvertBitmap(Resources.DPCM); bmpSong = g.ConvertBitmap(Resources.Music); bmpAdd = g.ConvertBitmap(Resources.Add); bmpInstrument = g.ConvertBitmap(Resources.Pattern); }
protected override void OnDirect2DInitialized(Direct2DGraphics g) { theme = Theme.CreateResourcesForGraphics(g); bmpButtonIcons[(int)ButtonType.Song] = g.ConvertBitmap(Resources.Music); bmpButtonIcons[(int)ButtonType.Instrument] = g.ConvertBitmap(Resources.Pattern); bmpSubButtonIcons[(int)SubButtonType.Add] = g.ConvertBitmap(Resources.Add); bmpSubButtonIcons[(int)SubButtonType.DPCM] = g.ConvertBitmap(Resources.DPCM); bmpSubButtonIcons[(int)SubButtonType.DutyCycle0] = g.ConvertBitmap(Resources.Duty0); bmpSubButtonIcons[(int)SubButtonType.DutyCycle1] = g.ConvertBitmap(Resources.Duty1); bmpSubButtonIcons[(int)SubButtonType.DutyCycle2] = g.ConvertBitmap(Resources.Duty2); bmpSubButtonIcons[(int)SubButtonType.DutyCycle3] = g.ConvertBitmap(Resources.Duty3); bmpSubButtonIcons[(int)SubButtonType.Arpeggio] = g.ConvertBitmap(Resources.Arpeggio); bmpSubButtonIcons[(int)SubButtonType.Pitch] = g.ConvertBitmap(Resources.Pitch); bmpSubButtonIcons[(int)SubButtonType.Volume] = g.ConvertBitmap(Resources.Volume); }