Commit 9e31f80

Nick Faro committed on
Add option for vertical tab orientation
commit 9e31f807ba7dde5b502e36d58f4e027b9e42571f parent e39ce29
5 changed files +62−38
Modifiedsrc/hugesettings.pas +10−0
@@ -18,6 +18,7 @@ type
18 FPreviewWhenBumping: Boolean; 18 FPreviewWhenBumping: Boolean;
19 FPreviewWhenPlacing: Boolean; 19 FPreviewWhenPlacing: Boolean;
20 FDrawWaveformGrid: Boolean; 20 FDrawWaveformGrid: Boolean;
21 FVerticalTabs: Boolean;
21 SettingsFile: TINIFile; 22 SettingsFile: TINIFile;
22 23
23 FPatternEditorFontSize: Integer; 24 FPatternEditorFontSize: Integer;
@@ -26,6 +27,7 @@ type
26 procedure SetDisplayOrderRowNumbersAsHex(AValue: Boolean); 27 procedure SetDisplayOrderRowNumbersAsHex(AValue: Boolean);
27 procedure SetDisplayRowNumbersAsHex(AValue: Boolean); 28 procedure SetDisplayRowNumbersAsHex(AValue: Boolean);
28 procedure SetDrawWaveformGrid(AValue: Boolean); 29 procedure SetDrawWaveformGrid(AValue: Boolean);
30 procedure SetVerticalTabs(AValue: Boolean);
29 procedure SetPatternEditorFontSize(AValue: Integer); 31 procedure SetPatternEditorFontSize(AValue: Integer);
30 procedure SetPreviewWhenBumping(AValue: Boolean); 32 procedure SetPreviewWhenBumping(AValue: Boolean);
31 procedure SetPreviewWhenPlacing(AValue: Boolean); 33 procedure SetPreviewWhenPlacing(AValue: Boolean);
@@ -40,6 +42,7 @@ type
40 property DisplayRowNumbersAsHex: Boolean read FDisplayRowNumbersAsHex write SetDisplayRowNumbersAsHex; 42 property DisplayRowNumbersAsHex: Boolean read FDisplayRowNumbersAsHex write SetDisplayRowNumbersAsHex;
41 property DisplayOrderRowNumbersAsHex: Boolean read FDisplayOrderRowNumbersAsHex write SetDisplayOrderRowNumbersAsHex; 43 property DisplayOrderRowNumbersAsHex: Boolean read FDisplayOrderRowNumbersAsHex write SetDisplayOrderRowNumbersAsHex;
42 property DrawWaveformGrid: Boolean read FDrawWaveformGrid write SetDrawWaveformGrid; 44 property DrawWaveformGrid: Boolean read FDrawWaveformGrid write SetDrawWaveformGrid;
45 property VerticalTabs: Boolean read FVerticalTabs write SetVerticalTabs;
43 46
44 constructor Create; 47 constructor Create;
45 end; 48 end;
@@ -116,6 +119,12 @@ begin
116 SettingsFile.WriteBool('hUGETracker', 'DrawWaveformGrid', AValue); 119 SettingsFile.WriteBool('hUGETracker', 'DrawWaveformGrid', AValue);
117 end; 120 end;
118 121
122 procedure TTrackerSettings.SetVerticalTabs(AValue: Boolean);
123 begin
124 FVerticalTabs:=AValue;
125 SettingsFile.WriteBool('hUGETracker', 'VerticalTabs', AValue);
126 end;
127
119 procedure TTrackerSettings.SetDisplayOrderRowNumbersAsHex(AValue: Boolean); 128 procedure TTrackerSettings.SetDisplayOrderRowNumbersAsHex(AValue: Boolean);
120 begin 129 begin
121 FDisplayOrderRowNumbersAsHex:=AValue; 130 FDisplayOrderRowNumbersAsHex:=AValue;
@@ -158,6 +167,7 @@ begin
158 FDisplayRowNumbersAsHex := SettingsFile.ReadBool('hUGETracker', 'DisplayRowNumbersAsHex', False); 167 FDisplayRowNumbersAsHex := SettingsFile.ReadBool('hUGETracker', 'DisplayRowNumbersAsHex', False);
159 FDisplayOrderRowNumbersAsHex := SettingsFile.ReadBool('hUGETracker', 'DisplayOrderRowNumbersAsHex', False); 168 FDisplayOrderRowNumbersAsHex := SettingsFile.ReadBool('hUGETracker', 'DisplayOrderRowNumbersAsHex', False);
160 FDrawWaveformGrid := SettingsFile.ReadBool('hUGETracker', 'DrawWaveformGrid', False); 169 FDrawWaveformGrid := SettingsFile.ReadBool('hUGETracker', 'DrawWaveformGrid', False);
170 FVerticalTabs := SettingsFile.ReadBool('hUGETracker', 'VerticalTabs', False);
161 end; 171 end;
162 172
163 finalization 173 finalization
Modifiedsrc/options.lfm +8−7
@@ -68,11 +68,12 @@ object frmOptions: TfrmOptions
68 'Display pattern row numbers in hexadecimal notation' 68 'Display pattern row numbers in hexadecimal notation'
69 'Display order row numbers in hexadecimal notation' 69 'Display order row numbers in hexadecimal notation'
70 'Display grid on waveform editor' 70 'Display grid on waveform editor'
71 'Display tabs vertically'
71 ) 72 )
72 ItemHeight = 28 73 ItemHeight = 28
73 TabOrder = 0 74 TabOrder = 0
74 Data = { 75 Data = {
75 06000000000000000000 76 0700000000000000000000
76 } 77 }
77 end 78 end
78 end 79 end
@@ -104,13 +105,13 @@ object frmOptions: TfrmOptions
104 MinSize = 13 105 MinSize = 13
105 MaxSize = 256 106 MaxSize = 256
106 Title.Caption = 'Key' 107 Title.Caption = 'Key'
107 Width = 235 108 Width = 234
108 end 109 end
109 item 110 item
110 MinSize = 13 111 MinSize = 13
111 MaxSize = 256 112 MaxSize = 256
112 Title.Caption = 'Note' 113 Title.Caption = 'Note'
113 Width = 235 114 Width = 234
114 end> 115 end>
115 DefaultColWidth = 154 116 DefaultColWidth = 154
116 FixedCols = 0 117 FixedCols = 0
@@ -120,8 +121,8 @@ object frmOptions: TfrmOptions
120 TabOrder = 0 121 TabOrder = 0
121 OnValidateEntry = KeyMapStringGridValidateEntry 122 OnValidateEntry = KeyMapStringGridValidateEntry
122 ColWidths = ( 123 ColWidths = (
123 235 124 234
124 235 125 234
125 ) 126 )
126 end 127 end
127 object Button2: TButton 128 object Button2: TButton
@@ -190,9 +191,9 @@ object frmOptions: TfrmOptions
190 TabOrder = 0 191 TabOrder = 0
191 object SampleTrackerGridPanel: TPanel 192 object SampleTrackerGridPanel: TPanel
192 Left = 3 193 Left = 3
193 Height = 733 194 Height = 729
194 Top = 3 195 Top = 3
195 Width = 250 196 Width = 246
196 Align = alClient 197 Align = alClient
197 BevelOuter = bvNone 198 BevelOuter = bvNone
198 TabOrder = 0 199 TabOrder = 0
Modifiedsrc/options.pas +2−0
@@ -185,6 +185,7 @@ begin
185 TrackerSettings.DisplayRowNumbersAsHex := CheckListBox1.Checked[3]; 185 TrackerSettings.DisplayRowNumbersAsHex := CheckListBox1.Checked[3];
186 TrackerSettings.DisplayOrderRowNumbersAsHex := CheckListBox1.Checked[4]; 186 TrackerSettings.DisplayOrderRowNumbersAsHex := CheckListBox1.Checked[4];
187 TrackerSettings.DrawWaveformGrid := CheckListBox1.Checked[5]; 187 TrackerSettings.DrawWaveformGrid := CheckListBox1.Checked[5];
188 TrackerSettings.VerticalTabs := CheckListBox1.Checked[6];
188 end; 189 end;
189 190
190 procedure TfrmOptions.FormCreate(Sender: TObject); 191 procedure TfrmOptions.FormCreate(Sender: TObject);
@@ -209,6 +210,7 @@ begin
209 CheckListBox1.Checked[3] := TrackerSettings.DisplayRowNumbersAsHex; 210 CheckListBox1.Checked[3] := TrackerSettings.DisplayRowNumbersAsHex;
210 CheckListBox1.Checked[4] := TrackerSettings.DisplayOrderRowNumbersAsHex; 211 CheckListBox1.Checked[4] := TrackerSettings.DisplayOrderRowNumbersAsHex;
211 CheckListBox1.Checked[5] := TrackerSettings.DrawWaveformGrid; 212 CheckListBox1.Checked[5] := TrackerSettings.DrawWaveformGrid;
213 CheckListBox1.Checked[6] := TrackerSettings.VerticalTabs;
212 214
213 SamplePatternMap := TPatternMap.Create; 215 SamplePatternMap := TPatternMap.Create;
214 SamplePattern := SamplePatternMap.GetOrCreateNew(0); 216 SamplePattern := SamplePatternMap.GetOrCreateNew(0);
Modifiedsrc/tracker.lfm +31−31
@@ -412,7 +412,7 @@ object frmTracker: TfrmTracker
412 BorderSpacing.Right = 9 412 BorderSpacing.Right = 9
413 BorderSpacing.Bottom = 9 413 BorderSpacing.Bottom = 9
414 Caption = 'Instrument' 414 Caption = 'Instrument'
415 ClientHeight = 346 415 ClientHeight = 326
416 ClientWidth = 355 416 ClientWidth = 355
417 ParentFont = False 417 ParentFont = False
418 TabOrder = 0 418 TabOrder = 0
@@ -634,7 +634,7 @@ object frmTracker: TfrmTracker
634 BorderSpacing.Right = 9 634 BorderSpacing.Right = 9
635 BorderSpacing.Bottom = 9 635 BorderSpacing.Bottom = 9
636 Caption = 'Envelope' 636 Caption = 'Envelope'
637 ClientHeight = 170 637 ClientHeight = 150
638 ClientWidth = 742 638 ClientWidth = 742
639 ParentFont = False 639 ParentFont = False
640 TabOrder = 1 640 TabOrder = 1
@@ -689,16 +689,16 @@ object frmTracker: TfrmTracker
689 Top = 0 689 Top = 0
690 Width = 346 690 Width = 346
691 BevelOuter = bvLowered 691 BevelOuter = bvLowered
692 ClientHeight = 129 692 ClientHeight = 133
693 ClientWidth = 342 693 ClientWidth = 346
694 ParentFont = False 694 ParentFont = False
695 TabOrder = 1 695 TabOrder = 1
696 object EnvelopePaintbox: TPaintBox 696 object EnvelopePaintbox: TPaintBox
697 Left = 1 697 Left = 1
698 Height = 127 698 Height = 131
699 Hint = 'Preview of the volume envelope' 699 Hint = 'Preview of the volume envelope'
700 Top = 1 700 Top = 1
701 Width = 340 701 Width = 344
702 Align = alClient 702 Align = alClient
703 ParentFont = False 703 ParentFont = False
704 OnPaint = EnvelopePaintboxPaint 704 OnPaint = EnvelopePaintboxPaint
@@ -738,7 +738,7 @@ object frmTracker: TfrmTracker
738 BorderSpacing.Right = 9 738 BorderSpacing.Right = 9
739 BorderSpacing.Bottom = 9 739 BorderSpacing.Bottom = 9
740 Caption = 'Square' 740 Caption = 'Square'
741 ClientHeight = 213 741 ClientHeight = 193
742 ClientWidth = 405 742 ClientWidth = 405
743 ParentFont = False 743 ParentFont = False
744 TabOrder = 2 744 TabOrder = 2
@@ -869,7 +869,7 @@ object frmTracker: TfrmTracker
869 BorderSpacing.Right = 9 869 BorderSpacing.Right = 9
870 BorderSpacing.Bottom = 9 870 BorderSpacing.Bottom = 9
871 Caption = 'Wave' 871 Caption = 'Wave'
872 ClientHeight = 213 872 ClientHeight = 193
873 ClientWidth = 377 873 ClientWidth = 377
874 ParentFont = False 874 ParentFont = False
875 TabOrder = 3 875 TabOrder = 3
@@ -929,16 +929,16 @@ object frmTracker: TfrmTracker
929 Top = 102 929 Top = 102
930 Width = 348 930 Width = 348
931 BevelOuter = bvLowered 931 BevelOuter = bvLowered
932 ClientHeight = 72 932 ClientHeight = 76
933 ClientWidth = 344 933 ClientWidth = 348
934 ParentFont = False 934 ParentFont = False
935 TabOrder = 1 935 TabOrder = 1
936 object WavePaintbox: TPaintBox 936 object WavePaintbox: TPaintBox
937 Left = 1 937 Left = 1
938 Height = 70 938 Height = 74
939 Hint = 'Preview of the waveform associated with this instrument' 939 Hint = 'Preview of the waveform associated with this instrument'
940 Top = 1 940 Top = 1
941 Width = 342 941 Width = 346
942 Align = alClient 942 Align = alClient
943 Color = clBlack 943 Color = clBlack
944 ParentColor = False 944 ParentColor = False
@@ -1864,7 +1864,7 @@ object frmTracker: TfrmTracker
1864 ParentShowHint = False 1864 ParentShowHint = False
1865 end 1865 end
1866 object PanicToolButton: TToolButton 1866 object PanicToolButton: TToolButton
1867 Left = 589 1867 Left = 585
1868 Hint = 'Stops all sound output' 1868 Hint = 'Stops all sound output'
1869 Top = 0 1869 Top = 0
1870 AutoSize = True 1870 AutoSize = True
@@ -1875,17 +1875,17 @@ object frmTracker: TfrmTracker
1875 ShowHint = True 1875 ShowHint = True
1876 end 1876 end
1877 object ToolButton2: TToolButton 1877 object ToolButton2: TToolButton
1878 Left = 140 1878 Left = 139
1879 Top = 0 1879 Top = 0
1880 Action = PlayCursorAction 1880 Action = PlayCursorAction
1881 end 1881 end
1882 object ToolButton4: TToolButton 1882 object ToolButton4: TToolButton
1883 Left = 171 1883 Left = 170
1884 Top = 0 1884 Top = 0
1885 Action = StopAction 1885 Action = StopAction
1886 end 1886 end
1887 object ExportGBButton: TToolButton 1887 object ExportGBButton: TToolButton
1888 Left = 245 1888 Left = 242
1889 Hint = 'Export the song as a standalone ROM' 1889 Hint = 'Export the song as a standalone ROM'
1890 Top = 0 1890 Top = 0
1891 AutoSize = True 1891 AutoSize = True
@@ -1901,21 +1901,21 @@ object frmTracker: TfrmTracker
1901 Style = tbsDivider 1901 Style = tbsDivider
1902 end 1902 end
1903 object ToolButton6: TToolButton 1903 object ToolButton6: TToolButton
1904 Left = 202 1904 Left = 201
1905 Height = 28 1905 Height = 28
1906 Top = 0 1906 Top = 0
1907 Caption = 'ToolButton6' 1907 Caption = 'ToolButton6'
1908 Style = tbsDivider 1908 Style = tbsDivider
1909 end 1909 end
1910 object ToolButton7: TToolButton 1910 object ToolButton7: TToolButton
1911 Left = 1280 1911 Left = 1274
1912 Height = 28 1912 Height = 28
1913 Top = 0 1913 Top = 0
1914 Caption = 'ToolButton7' 1914 Caption = 'ToolButton7'
1915 Style = tbsSeparator 1915 Style = tbsSeparator
1916 end 1916 end
1917 object OctaveSpinEdit: TSpinEdit 1917 object OctaveSpinEdit: TSpinEdit
1918 Left = 724 1918 Left = 718
1919 Height = 32 1919 Height = 32
1920 Hint = 'The octave offset for entering new notes' 1920 Hint = 'The octave offset for entering new notes'
1921 Top = 0 1921 Top = 0
@@ -1926,14 +1926,14 @@ object frmTracker: TfrmTracker
1926 TabOrder = 0 1926 TabOrder = 0
1927 end 1927 end
1928 object ToolButton9: TToolButton 1928 object ToolButton9: TToolButton
1929 Left = 659 1929 Left = 655
1930 Height = 28 1930 Height = 28
1931 Top = 0 1931 Top = 0
1932 Caption = 'ToolButton9' 1932 Caption = 'ToolButton9'
1933 Style = tbsSeparator 1933 Style = tbsSeparator
1934 end 1934 end
1935 object Label22: TLabel 1935 object Label22: TLabel
1936 Left = 669 1936 Left = 663
1937 Height = 28 1937 Height = 28
1938 Top = 0 1938 Top = 0
1939 Width = 55 1939 Width = 55
@@ -1944,7 +1944,7 @@ object frmTracker: TfrmTracker
1944 ParentFont = False 1944 ParentFont = False
1945 end 1945 end
1946 object Label23: TLabel 1946 object Label23: TLabel
1947 Left = 807 1947 Left = 801
1948 Height = 28 1948 Height = 28
1949 Top = 0 1949 Top = 0
1950 Width = 90 1950 Width = 90
@@ -1955,7 +1955,7 @@ object frmTracker: TfrmTracker
1955 ParentFont = False 1955 ParentFont = False
1956 end 1956 end
1957 object InstrumentComboBox: TComboBox 1957 object InstrumentComboBox: TComboBox
1958 Left = 897 1958 Left = 891
1959 Height = 30 1959 Height = 30
1960 Hint = 'The selected instrument for new notes' 1960 Hint = 'The selected instrument for new notes'
1961 Top = 0 1961 Top = 0
@@ -1973,7 +1973,7 @@ object frmTracker: TfrmTracker
1973 Text = '(no instrument)' 1973 Text = '(no instrument)'
1974 end 1974 end
1975 object Label24: TLabel 1975 object Label24: TLabel
1976 Left = 1171 1976 Left = 1165
1977 Height = 28 1977 Height = 28
1978 Top = 0 1978 Top = 0
1979 Width = 45 1979 Width = 45
@@ -1984,7 +1984,7 @@ object frmTracker: TfrmTracker
1984 ParentFont = False 1984 ParentFont = False
1985 end 1985 end
1986 object StepSpinEdit: TSpinEdit 1986 object StepSpinEdit: TSpinEdit
1987 Left = 1216 1987 Left = 1210
1988 Height = 32 1988 Height = 32
1989 Hint = 'How many rows to step down after entering a new note' 1989 Hint = 'How many rows to step down after entering a new note'
1990 Top = 0 1990 Top = 0
@@ -1995,12 +1995,12 @@ object frmTracker: TfrmTracker
1995 TabOrder = 2 1995 TabOrder = 2
1996 end 1996 end
1997 object ToolButton3: TToolButton 1997 object ToolButton3: TToolButton
1998 Left = 109 1998 Left = 108
1999 Top = 0 1999 Top = 0
2000 Action = PlayStartAction 2000 Action = PlayStartAction
2001 end 2001 end
2002 object ExportGBSButton: TToolButton 2002 object ExportGBSButton: TToolButton
2003 Left = 348 2003 Left = 345
2004 Hint = 'Export the song as a GBS soundtrack' 2004 Hint = 'Export the song as a GBS soundtrack'
2005 Top = 0 2005 Top = 0
2006 Caption = 'Export GBS' 2006 Caption = 'Export GBS'
@@ -2008,14 +2008,14 @@ object frmTracker: TfrmTracker
2008 OnClick = ExportGBSButtonClick 2008 OnClick = ExportGBSButtonClick
2009 end 2009 end
2010 object ToolButton5: TToolButton 2010 object ToolButton5: TToolButton
2011 Left = 583 2011 Left = 580
2012 Height = 28 2012 Height = 28
2013 Top = 0 2013 Top = 0
2014 Caption = 'ToolButton5' 2014 Caption = 'ToolButton5'
2015 Style = tbsDivider 2015 Style = tbsDivider
2016 end 2016 end
2017 object ToolButton10: TToolButton 2017 object ToolButton10: TToolButton
2018 Left = 459 2018 Left = 456
2019 Hint = 'Export the song as WAV or MP3' 2019 Hint = 'Export the song as WAV or MP3'
2020 Top = 0 2020 Top = 0
2021 Caption = 'Render Song' 2021 Caption = 'Render Song'
@@ -2023,14 +2023,14 @@ object frmTracker: TfrmTracker
2023 OnClick = ToolButton10Click 2023 OnClick = ToolButton10Click
2024 end 2024 end
2025 object ToolButton11: TToolButton 2025 object ToolButton11: TToolButton
2026 Left = 239 2026 Left = 237
2027 Height = 28 2027 Height = 28
2028 Top = 0 2028 Top = 0
2029 Caption = 'ToolButton11' 2029 Caption = 'ToolButton11'
2030 Style = tbsDivider 2030 Style = tbsDivider
2031 end 2031 end
2032 object LoopSongToolButton: TToolButton 2032 object LoopSongToolButton: TToolButton
2033 Left = 208 2033 Left = 206
2034 Top = 0 2034 Top = 0
2035 ImageIndex = 87 2035 ImageIndex = 87
2036 OnClick = LoopSongToolButtonClick 2036 OnClick = LoopSongToolButtonClick
Modifiedsrc/tracker.pas +11−0
@@ -1501,6 +1501,12 @@ begin
1501 OrderEditStringGrid.ColWidths[0]:=50; 1501 OrderEditStringGrid.ColWidths[0]:=50;
1502 OrderEditStringGrid.DrawHexAutonumbering := TrackerSettings.DisplayOrderRowNumbersAsHex; 1502 OrderEditStringGrid.DrawHexAutonumbering := TrackerSettings.DisplayOrderRowNumbersAsHex;
1503 1503
1504 // Set tab position
1505 if TrackerSettings.VerticalTabs then
1506 PageControl1.TabPosition := tpLeft
1507 else
1508 PageControl1.TabPosition := tpTop;
1509
1504 // Get the emulator ready to make sound... 1510 // Get the emulator ready to make sound...
1505 EnableSound; 1511 EnableSound;
1506 HaltPlayback; 1512 HaltPlayback;
@@ -2400,6 +2406,11 @@ begin
2400 OscilloscopeUpdateTimer.Enabled := TrackerSettings.UseScopes; 2406 OscilloscopeUpdateTimer.Enabled := TrackerSettings.UseScopes;
2401 ScopesPanel.Visible := TrackerSettings.UseScopes; 2407 ScopesPanel.Visible := TrackerSettings.UseScopes;
2402 2408
2409 if TrackerSettings.VerticalTabs then
2410 PageControl1.TabPosition := tpLeft
2411 else
2412 PageControl1.TabPosition := tpTop;
2413
2403 RecreateRowNumbers; 2414 RecreateRowNumbers;
2404 TrackerGrid.Invalidate; 2415 TrackerGrid.Invalidate;
2405 2416