Commit bad74d4

Nick Faro committed on
Implement grid on waveform editor
commit bad74d463a14afb5724742f33f278387f7392ebb parent 9681bd0
4 changed files +281−255
Modifiedsrc/hugesettings.pas +10−0
@@ -17,6 +17,7 @@ type
17 FDisplayOrderRowNumbersAsHex: Boolean; 17 FDisplayOrderRowNumbersAsHex: Boolean;
18 FPreviewWhenBumping: Boolean; 18 FPreviewWhenBumping: Boolean;
19 FPreviewWhenPlacing: Boolean; 19 FPreviewWhenPlacing: Boolean;
20 FDrawWaveformGrid: Boolean;
20 SettingsFile: TINIFile; 21 SettingsFile: TINIFile;
21 22
22 FPatternEditorFontSize: Integer; 23 FPatternEditorFontSize: Integer;
@@ -24,6 +25,7 @@ type
24 25
25 procedure SetDisplayOrderRowNumbersAsHex(AValue: Boolean); 26 procedure SetDisplayOrderRowNumbersAsHex(AValue: Boolean);
26 procedure SetDisplayRowNumbersAsHex(AValue: Boolean); 27 procedure SetDisplayRowNumbersAsHex(AValue: Boolean);
28 procedure SetDrawWaveformGrid(AValue: Boolean);
27 procedure SetPatternEditorFontSize(AValue: Integer); 29 procedure SetPatternEditorFontSize(AValue: Integer);
28 procedure SetPreviewWhenBumping(AValue: Boolean); 30 procedure SetPreviewWhenBumping(AValue: Boolean);
29 procedure SetPreviewWhenPlacing(AValue: Boolean); 31 procedure SetPreviewWhenPlacing(AValue: Boolean);
@@ -37,6 +39,7 @@ type
37 property PreviewWhenBumping: Boolean read FPreviewWhenBumping write SetPreviewWhenBumping; 39 property PreviewWhenBumping: Boolean read FPreviewWhenBumping write SetPreviewWhenBumping;
38 property DisplayRowNumbersAsHex: Boolean read FDisplayRowNumbersAsHex write SetDisplayRowNumbersAsHex; 40 property DisplayRowNumbersAsHex: Boolean read FDisplayRowNumbersAsHex write SetDisplayRowNumbersAsHex;
39 property DisplayOrderRowNumbersAsHex: Boolean read FDisplayOrderRowNumbersAsHex write SetDisplayOrderRowNumbersAsHex; 41 property DisplayOrderRowNumbersAsHex: Boolean read FDisplayOrderRowNumbersAsHex write SetDisplayOrderRowNumbersAsHex;
42 property DrawWaveformGrid: Boolean read FDrawWaveformGrid write SetDrawWaveformGrid;
40 43
41 constructor Create; 44 constructor Create;
42 end; 45 end;
@@ -67,6 +70,12 @@ begin
67 SettingsFile.WriteBool('hUGETracker', 'DisplayRowNumbersAsHex', AValue); 70 SettingsFile.WriteBool('hUGETracker', 'DisplayRowNumbersAsHex', AValue);
68 end; 71 end;
69 72
73 procedure TTrackerSettings.SetDrawWaveformGrid(AValue: Boolean);
74 begin
75 FDrawWaveformGrid:=AValue;
76 SettingsFile.WriteBool('hUGETracker', 'DrawWaveformGrid', AValue);
77 end;
78
70 procedure TTrackerSettings.SetDisplayOrderRowNumbersAsHex(AValue: Boolean); 79 procedure TTrackerSettings.SetDisplayOrderRowNumbersAsHex(AValue: Boolean);
71 begin 80 begin
72 FDisplayOrderRowNumbersAsHex:=AValue; 81 FDisplayOrderRowNumbersAsHex:=AValue;
@@ -108,6 +117,7 @@ begin
108 FPreviewWhenBumping := SettingsFile.ReadBool('hUGETracker', 'PreviewWhenBumping', False); 117 FPreviewWhenBumping := SettingsFile.ReadBool('hUGETracker', 'PreviewWhenBumping', False);
109 FDisplayRowNumbersAsHex := SettingsFile.ReadBool('hUGETracker', 'DisplayRowNumbersAsHex', False); 118 FDisplayRowNumbersAsHex := SettingsFile.ReadBool('hUGETracker', 'DisplayRowNumbersAsHex', False);
110 FDisplayOrderRowNumbersAsHex := SettingsFile.ReadBool('hUGETracker', 'DisplayOrderRowNumbersAsHex', False); 119 FDisplayOrderRowNumbersAsHex := SettingsFile.ReadBool('hUGETracker', 'DisplayOrderRowNumbersAsHex', False);
120 FDrawWaveformGrid := SettingsFile.ReadBool('hUGETracker', 'DrawWaveformGrid', False);
111 end; 121 end;
112 122
113 finalization 123 finalization
Modifiedsrc/options.lfm +257−251
@@ -1,23 +1,24 @@
1 object frmOptions: TfrmOptions 1 object frmOptions: TfrmOptions
2 Left = 1485 2 Left = 1485
3 Height = 678 3 Height = 869
4 Top = 220 4 Top = 220
5 Width = 550 5 Width = 705
6 BorderStyle = bsDialog 6 BorderStyle = bsDialog
7 Caption = 'Options' 7 Caption = 'Options'
8 ClientHeight = 678 8 ClientHeight = 869
9 ClientWidth = 550 9 ClientWidth = 705
10 DesignTimePPI = 123
10 OnClose = FormClose 11 OnClose = FormClose
11 OnCreate = FormCreate 12 OnCreate = FormCreate
12 Position = poMainFormCenter 13 Position = poMainFormCenter
13 LCLVersion = '2.2.3.0' 14 LCLVersion = '2.2.7.0'
14 object Button1: TButton 15 object Button1: TButton
15 AnchorSideRight.Side = asrBottom 16 AnchorSideRight.Side = asrBottom
16 AnchorSideBottom.Side = asrBottom 17 AnchorSideBottom.Side = asrBottom
17 Left = 412 18 Left = 528
18 Height = 25 19 Height = 32
19 Top = 645 20 Top = 827
20 Width = 123 21 Width = 158
21 Anchors = [akRight, akBottom] 22 Anchors = [akRight, akBottom]
22 Caption = 'OK' 23 Caption = 'OK'
23 OnClick = Button1Click 24 OnClick = Button1Click
@@ -30,83 +31,88 @@ object frmOptions: TfrmOptions
30 AnchorSideRight.Control = Owner 31 AnchorSideRight.Control = Owner
31 AnchorSideRight.Side = asrBottom 32 AnchorSideRight.Side = asrBottom
32 AnchorSideBottom.Control = Button1 33 AnchorSideBottom.Control = Button1
33 Left = 10 34 Left = 13
34 Height = 628 35 Height = 805
35 Top = 10 36 Top = 13
36 Width = 530 37 Width = 679
37 ActivePage = KeyboardTabSheet 38 ActivePage = GeneralTabSheet
38 Anchors = [akTop, akLeft, akRight, akBottom] 39 Anchors = [akTop, akLeft, akRight, akBottom]
39 BorderSpacing.Left = 10 40 BorderSpacing.Left = 13
40 BorderSpacing.Top = 10 41 BorderSpacing.Top = 13
41 BorderSpacing.Right = 10 42 BorderSpacing.Right = 13
42 BorderSpacing.Bottom = 7 43 BorderSpacing.Bottom = 9
43 TabIndex = 1 44 TabIndex = 0
44 TabOrder = 1 45 TabOrder = 1
45 object GeneralTabSheet: TTabSheet 46 object GeneralTabSheet: TTabSheet
46 Caption = 'General' 47 Caption = 'General'
47 ClientHeight = 600 48 ClientHeight = 765
48 ClientWidth = 522 49 ClientWidth = 673
49 object OptionsGroupBox: TGroupBox 50 object OptionsGroupBox: TGroupBox
50 Left = 8 51 Left = 10
51 Height = 568 52 Height = 728
52 Top = 8 53 Top = 10
53 Width = 392 54 Width = 502
54 Caption = 'Options' 55 Caption = 'Options'
55 ClientHeight = 548 56 ClientHeight = 704
56 ClientWidth = 388 57 ClientWidth = 498
57 TabOrder = 0 58 TabOrder = 0
58 object CheckListBox1: TCheckListBox 59 object CheckListBox1: TCheckListBox
59 Left = 8 60 Left = 10
60 Height = 528 61 Height = 676
61 Top = 8 62 Top = 10
62 Width = 370 63 Width = 474
63 Items.Strings = ( 64 Items.Strings = (
64 'Show scopes (uses more CPU)' 65 'Show scopes (uses more CPU)'
65 'Play preview when placing notes' 66 'Play preview when placing notes'
66 'Play preview when bumping notes up/down' 67 'Play preview when bumping notes up/down'
67 'Display pattern row numbers in hexadecimal notation' 68 'Display pattern row numbers in hexadecimal notation'
68 'Display order row numbers in hexadecimal notation' 69 'Display order row numbers in hexadecimal notation'
70 'Display grid on waveform editor'
69 ) 71 )
70 ItemHeight = 17 72 ItemHeight = 28
71 TabOrder = 0 73 TabOrder = 0
72 Data = { 74 Data = {
73 050000000000000000 75 06000000000000000000
74 } 76 }
75 end 77 end
76 end 78 end
77 end 79 end
78 object KeyboardTabSheet: TTabSheet 80 object KeyboardTabSheet: TTabSheet
79 Caption = 'Keyboard' 81 Caption = 'Keyboard'
80 ClientHeight = 600 82 ClientHeight = 765
81 ClientWidth = 522 83 ClientWidth = 673
82 object KeymapGroupBox: TGroupBox 84 object KeymapGroupBox: TGroupBox
83 Left = 16 85 Left = 20
84 Height = 544 86 Height = 697
85 Top = 48 87 Top = 62
86 Width = 392 88 Width = 502
87 Caption = 'Custom key map' 89 Caption = 'Custom key map'
88 ClientHeight = 524 90 ClientHeight = 673
89 ClientWidth = 388 91 ClientWidth = 498
90 Enabled = False 92 Enabled = False
91 ParentFont = False 93 ParentFont = False
92 TabOrder = 0 94 TabOrder = 0
93 object KeyMapStringGrid: TStringGrid 95 object KeyMapStringGrid: TStringGrid
94 Left = 8 96 Left = 10
95 Height = 472 97 Height = 605
96 Top = 8 98 Top = 10
97 Width = 368 99 Width = 472
98 AutoFillColumns = True 100 AutoFillColumns = True
99 ColCount = 2 101 ColCount = 2
100 Columns = < 102 Columns = <
101 item 103 item
104 MinSize = 13
105 MaxSize = 256
102 Title.Caption = 'Key' 106 Title.Caption = 'Key'
103 Width = 182 107 Width = 235
104 end 108 end
105 item 109 item
110 MinSize = 13
111 MaxSize = 256
106 Title.Caption = 'Note' 112 Title.Caption = 'Note'
107 Width = 182 113 Width = 235
108 end> 114 end>
109 DefaultColWidth = 120 115 DefaultColWidth = 154
110 FixedCols = 0 116 FixedCols = 0
111 MouseWheelOption = mwGrid 117 MouseWheelOption = mwGrid
112 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goAutoAddRows, goTabs, goSmoothScroll] 118 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goAutoAddRows, goTabs, goSmoothScroll]
@@ -114,45 +120,45 @@ object frmOptions: TfrmOptions
114 TabOrder = 0 120 TabOrder = 0
115 OnValidateEntry = KeyMapStringGridValidateEntry 121 OnValidateEntry = KeyMapStringGridValidateEntry
116 ColWidths = ( 122 ColWidths = (
117 182 123 235
118 182 124 235
119 ) 125 )
120 end 126 end
121 object Button2: TButton 127 object Button2: TButton
122 Left = 8 128 Left = 10
123 Height = 25 129 Height = 32
124 Top = 488 130 Top = 625
125 Width = 131 131 Width = 168
126 Caption = 'Load' 132 Caption = 'Load'
127 OnClick = Button2Click 133 OnClick = Button2Click
128 ParentFont = False 134 ParentFont = False
129 TabOrder = 1 135 TabOrder = 1
130 end 136 end
131 object Button3: TButton 137 object Button3: TButton
132 Left = 144 138 Left = 184
133 Height = 25 139 Height = 32
134 Top = 488 140 Top = 625
135 Width = 126 141 Width = 161
136 Caption = 'Save' 142 Caption = 'Save'
137 OnClick = Button3Click 143 OnClick = Button3Click
138 ParentFont = False 144 ParentFont = False
139 TabOrder = 2 145 TabOrder = 2
140 end 146 end
141 object Button4: TButton 147 object Button4: TButton
142 Left = 346 148 Left = 443
143 Height = 25 149 Height = 32
144 Top = 488 150 Top = 625
145 Width = 30 151 Width = 38
146 Caption = '-' 152 Caption = '-'
147 OnClick = Button4Click 153 OnClick = Button4Click
148 ParentFont = False 154 ParentFont = False
149 TabOrder = 3 155 TabOrder = 3
150 end 156 end
151 object Button5: TButton 157 object Button5: TButton
152 Left = 312 158 Left = 400
153 Height = 25 159 Height = 32
154 Top = 488 160 Top = 625
155 Width = 30 161 Width = 38
156 Caption = '+' 162 Caption = '+'
157 OnClick = Button5Click 163 OnClick = Button5Click
158 ParentFont = False 164 ParentFont = False
@@ -160,10 +166,10 @@ object frmOptions: TfrmOptions
160 end 166 end
161 end 167 end
162 object UseCustomKeymapCheckbox: TCheckBox 168 object UseCustomKeymapCheckbox: TCheckBox
163 Left = 24 169 Left = 31
164 Height = 19 170 Height = 24
165 Top = 16 171 Top = 20
166 Width = 127 172 Width = 167
167 Caption = 'Use custom keymap' 173 Caption = 'Use custom keymap'
168 OnChange = KeymapCheckboxChange 174 OnChange = KeymapCheckboxChange
169 TabOrder = 1 175 TabOrder = 1
@@ -171,330 +177,330 @@ object frmOptions: TfrmOptions
171 end 177 end
172 object CustomiztaionTabSheet: TTabSheet 178 object CustomiztaionTabSheet: TTabSheet
173 Caption = 'Appearance' 179 Caption = 'Appearance'
174 ClientHeight = 600 180 ClientHeight = 765
175 ClientWidth = 522 181 ClientWidth = 673
176 object Panel1: TPanel 182 object Panel1: TPanel
177 Left = 312 183 Left = 400
178 Height = 577 184 Height = 739
179 Top = 8 185 Top = 10
180 Width = 200 186 Width = 256
181 BevelWidth = 3 187 BevelWidth = 3
182 ClientHeight = 577 188 ClientHeight = 739
183 ClientWidth = 200 189 ClientWidth = 256
184 TabOrder = 0 190 TabOrder = 0
185 object SampleTrackerGridPanel: TPanel 191 object SampleTrackerGridPanel: TPanel
186 Left = 3 192 Left = 3
187 Height = 571 193 Height = 733
188 Top = 3 194 Top = 3
189 Width = 194 195 Width = 250
190 Align = alClient 196 Align = alClient
191 BevelOuter = bvNone 197 BevelOuter = bvNone
192 TabOrder = 0 198 TabOrder = 0
193 end 199 end
194 end 200 end
195 object CustomizationGroupBox: TGroupBox 201 object CustomizationGroupBox: TGroupBox
196 Left = 8 202 Left = 10
197 Height = 576 203 Height = 738
198 Top = 8 204 Top = 10
199 Width = 297 205 Width = 381
200 Caption = 'Customization' 206 Caption = 'Customization'
201 ClientHeight = 556 207 ClientHeight = 734
202 ClientWidth = 293 208 ClientWidth = 377
203 TabOrder = 1 209 TabOrder = 1
204 object Label1: TLabel 210 object Label1: TLabel
205 Left = 14 211 Left = 18
206 Height = 15 212 Height = 22
207 Top = 14 213 Top = 18
208 Width = 119 214 Width = 167
209 Caption = 'Pattern editor font size' 215 Caption = 'Pattern editor font size'
210 ParentColor = False 216 ParentColor = False
211 ParentFont = False 217 ParentFont = False
212 end 218 end
213 object FontSizeSpinner: TSpinEdit 219 object FontSizeSpinner: TSpinEdit
214 Left = 155 220 Left = 199
215 Height = 23 221 Height = 32
216 Top = 9 222 Top = 12
217 Width = 123 223 Width = 158
218 OnChange = FontSizeSpinnerChange 224 OnChange = FontSizeSpinnerChange
219 ParentFont = False 225 ParentFont = False
220 TabOrder = 0 226 TabOrder = 0
221 Value = 12 227 Value = 12
222 end 228 end
223 object NoteTextColorButton: TColorButton 229 object NoteTextColorButton: TColorButton
224 Left = 155 230 Left = 199
225 Height = 25 231 Height = 32
226 Top = 40 232 Top = 51
227 Width = 123 233 Width = 158
228 BorderWidth = 2 234 BorderWidth = 3
229 ButtonColorSize = 16 235 ButtonColorSize = 20
230 ButtonColor = 8342016 236 ButtonColor = 8342016
231 OnColorChanged = NoteTextColorButtonColorChanged 237 OnColorChanged = NoteTextColorButtonColorChanged
232 end 238 end
233 object Label2: TLabel 239 object Label2: TLabel
234 Left = 14 240 Left = 18
235 Height = 15 241 Height = 22
236 Top = 40 242 Top = 51
237 Width = 79 243 Width = 107
238 Caption = 'Note text color' 244 Caption = 'Note text color'
239 ParentColor = False 245 ParentColor = False
240 end 246 end
241 object InstrumentTextColorButton: TColorButton 247 object InstrumentTextColorButton: TColorButton
242 Left = 155 248 Left = 199
243 Height = 25 249 Height = 32
244 Top = 72 250 Top = 92
245 Width = 123 251 Width = 158
246 BorderWidth = 2 252 BorderWidth = 3
247 ButtonColorSize = 16 253 ButtonColorSize = 20
248 ButtonColor = 8355584 254 ButtonColor = 8355584
249 OnColorChanged = NoteTextColorButtonColorChanged 255 OnColorChanged = NoteTextColorButtonColorChanged
250 end 256 end
251 object MiscEffectTextColorButton: TColorButton 257 object MiscEffectTextColorButton: TColorButton
252 Left = 155 258 Left = 199
253 Height = 25 259 Height = 32
254 Top = 104 260 Top = 133
255 Width = 123 261 Width = 158
256 BorderWidth = 2 262 BorderWidth = 3
257 ButtonColorSize = 16 263 ButtonColorSize = 20
258 ButtonColor = 4145020 264 ButtonColor = 4145020
259 OnColorChanged = NoteTextColorButtonColorChanged 265 OnColorChanged = NoteTextColorButtonColorChanged
260 end 266 end
261 object PitchEffectTextColorButton: TColorButton 267 object PitchEffectTextColorButton: TColorButton
262 Left = 155 268 Left = 199
263 Height = 25 269 Height = 32
264 Top = 136 270 Top = 174
265 Width = 123 271 Width = 158
266 BorderWidth = 2 272 BorderWidth = 3
267 ButtonColorSize = 16 273 ButtonColorSize = 20
268 ButtonColor = 25186 274 ButtonColor = 25186
269 OnColorChanged = NoteTextColorButtonColorChanged 275 OnColorChanged = NoteTextColorButtonColorChanged
270 end 276 end
271 object VolumeEffectTextColorButton: TColorButton 277 object VolumeEffectTextColorButton: TColorButton
272 Left = 155 278 Left = 199
273 Height = 25 279 Height = 32
274 Top = 168 280 Top = 215
275 Width = 123 281 Width = 158
276 BorderWidth = 2 282 BorderWidth = 3
277 ButtonColorSize = 16 283 ButtonColorSize = 20
278 ButtonColor = 32550 284 ButtonColor = 32550
279 OnColorChanged = NoteTextColorButtonColorChanged 285 OnColorChanged = NoteTextColorButtonColorChanged
280 end 286 end
281 object PanningEffectTextColorButton: TColorButton 287 object PanningEffectTextColorButton: TColorButton
282 Left = 155 288 Left = 199
283 Height = 25 289 Height = 32
284 Top = 200 290 Top = 256
285 Width = 123 291 Width = 158
286 BorderWidth = 2 292 BorderWidth = 3
287 ButtonColorSize = 16 293 ButtonColorSize = 20
288 ButtonColor = 8355584 294 ButtonColor = 8355584
289 OnColorChanged = NoteTextColorButtonColorChanged 295 OnColorChanged = NoteTextColorButtonColorChanged
290 end 296 end
291 object SongEffectTextColorButton: TColorButton 297 object SongEffectTextColorButton: TColorButton
292 Left = 155 298 Left = 199
293 Height = 25 299 Height = 32
294 Top = 232 300 Top = 297
295 Width = 123 301 Width = 158
296 BorderWidth = 2 302 BorderWidth = 3
297 ButtonColorSize = 16 303 ButtonColorSize = 20
298 ButtonColor = 127 304 ButtonColor = 127
299 OnColorChanged = NoteTextColorButtonColorChanged 305 OnColorChanged = NoteTextColorButtonColorChanged
300 end 306 end
301 object Label3: TLabel 307 object Label3: TLabel
302 Left = 14 308 Left = 18
303 Height = 15 309 Height = 22
304 Top = 72 310 Top = 92
305 Width = 111 311 Width = 154
306 Caption = 'Instrument text color' 312 Caption = 'Instrument text color'
307 ParentColor = False 313 ParentColor = False
308 end 314 end
309 object Label4: TLabel 315 object Label4: TLabel
310 Left = 14 316 Left = 18
311 Height = 15 317 Height = 22
312 Top = 104 318 Top = 133
313 Width = 114 319 Width = 153
314 Caption = 'Misc. effect text color' 320 Caption = 'Misc. effect text color'
315 ParentColor = False 321 ParentColor = False
316 end 322 end
317 object Label5: TLabel 323 object Label5: TLabel
318 Left = 14 324 Left = 18
319 Height = 15 325 Height = 22
320 Top = 136 326 Top = 174
321 Width = 113 327 Width = 153
322 Caption = 'Pitch effect text color' 328 Caption = 'Pitch effect text color'
323 ParentColor = False 329 ParentColor = False
324 end 330 end
325 object Label6: TLabel 331 object Label6: TLabel
326 Left = 14 332 Left = 18
327 Height = 15 333 Height = 22
328 Top = 168 334 Top = 215
329 Width = 126 335 Width = 172
330 Caption = 'Volume effect text color' 336 Caption = 'Volume effect text color'
331 ParentColor = False 337 ParentColor = False
332 end 338 end
333 object Label7: TLabel 339 object Label7: TLabel
334 Left = 14 340 Left = 18
335 Height = 15 341 Height = 22
336 Top = 200 342 Top = 256
337 Width = 130 343 Width = 178
338 Caption = 'Panning effect text color' 344 Caption = 'Panning effect text color'
339 ParentColor = False 345 ParentColor = False
340 end 346 end
341 object Label8: TLabel 347 object Label8: TLabel
342 Left = 14 348 Left = 18
343 Height = 15 349 Height = 22
344 Top = 232 350 Top = 297
345 Width = 113 351 Width = 153
346 Caption = 'Song effect text color' 352 Caption = 'Song effect text color'
347 ParentColor = False 353 ParentColor = False
348 end 354 end
349 object BackgroundColorButton: TColorButton 355 object BackgroundColorButton: TColorButton
350 Left = 155 356 Left = 199
351 Height = 25 357 Height = 32
352 Top = 264 358 Top = 338
353 Width = 123 359 Width = 158
354 BorderWidth = 2 360 BorderWidth = 3
355 ButtonColorSize = 16 361 ButtonColorSize = 20
356 ButtonColor = 13687777 362 ButtonColor = 13687777
357 OnColorChanged = NoteTextColorButtonColorChanged 363 OnColorChanged = NoteTextColorButtonColorChanged
358 end 364 end
359 object HighlightedColorButton: TColorButton 365 object HighlightedColorButton: TColorButton
360 Left = 155 366 Left = 199
361 Height = 25 367 Height = 32
362 Top = 296 368 Top = 379
363 Width = 123 369 Width = 158
364 BorderWidth = 2 370 BorderWidth = 3
365 ButtonColorSize = 16 371 ButtonColorSize = 20
366 ButtonColor = 8034729 372 ButtonColor = 8034729
367 OnColorChanged = NoteTextColorButtonColorChanged 373 OnColorChanged = NoteTextColorButtonColorChanged
368 end 374 end
369 object SelectedColorButton: TColorButton 375 object SelectedColorButton: TColorButton
370 Left = 155 376 Left = 199
371 Height = 25 377 Height = 32
372 Top = 328 378 Top = 420
373 Width = 123 379 Width = 158
374 BorderWidth = 2 380 BorderWidth = 3
375 ButtonColorSize = 16 381 ButtonColorSize = 20
376 ButtonColor = 10400960 382 ButtonColor = 10400960
377 OnColorChanged = NoteTextColorButtonColorChanged 383 OnColorChanged = NoteTextColorButtonColorChanged
378 end 384 end
379 object FourthRowColorButton: TColorButton 385 object FourthRowColorButton: TColorButton
380 Left = 155 386 Left = 199
381 Height = 25 387 Height = 32
382 Top = 360 388 Top = 461
383 Width = 123 389 Width = 158
384 BorderWidth = 2 390 BorderWidth = 3
385 ButtonColorSize = 16 391 ButtonColorSize = 20
386 ButtonColor = 12833240 392 ButtonColor = 12833240
387 OnColorChanged = NoteTextColorButtonColorChanged 393 OnColorChanged = NoteTextColorButtonColorChanged
388 end 394 end
389 object SixteenthRowColorButton: TColorButton 395 object SixteenthRowColorButton: TColorButton
390 Left = 155 396 Left = 199
391 Height = 25 397 Height = 32
392 Top = 392 398 Top = 502
393 Width = 123 399 Width = 158
394 BorderWidth = 2 400 BorderWidth = 3
395 ButtonColorSize = 16 401 ButtonColorSize = 20
396 ButtonColor = 11912654 402 ButtonColor = 11912654
397 OnColorChanged = NoteTextColorButtonColorChanged 403 OnColorChanged = NoteTextColorButtonColorChanged
398 end 404 end
399 object Label9: TLabel 405 object Label9: TLabel
400 Left = 14 406 Left = 18
401 Height = 15 407 Height = 22
402 Top = 264 408 Top = 338
403 Width = 64 409 Width = 87
404 Caption = 'Background' 410 Caption = 'Background'
405 ParentColor = False 411 ParentColor = False
406 end 412 end
407 object Label10: TLabel 413 object Label10: TLabel
408 Left = 14 414 Left = 18
409 Height = 15 415 Height = 22
410 Top = 296 416 Top = 379
411 Width = 63 417 Width = 85
412 Caption = 'Highlighted' 418 Caption = 'Highlighted'
413 ParentColor = False 419 ParentColor = False
414 end 420 end
415 object Label11: TLabel 421 object Label11: TLabel
416 Left = 14 422 Left = 18
417 Height = 15 423 Height = 22
418 Top = 328 424 Top = 420
419 Width = 44 425 Width = 61
420 Caption = 'Selected' 426 Caption = 'Selected'
421 ParentColor = False 427 ParentColor = False
422 end 428 end
423 object Label12: TLabel 429 object Label12: TLabel
424 Left = 14 430 Left = 18
425 Height = 15 431 Height = 22
426 Top = 360 432 Top = 461
427 Width = 87 433 Width = 121
428 Caption = 'Every fourth row' 434 Caption = 'Every fourth row'
429 ParentColor = False 435 ParentColor = False
430 end 436 end
431 object Label13: TLabel 437 object Label13: TLabel
432 Left = 14 438 Left = 18
433 Height = 15 439 Height = 22
434 Top = 392 440 Top = 502
435 Width = 102 441 Width = 144
436 Caption = 'Every sixteenth row' 442 Caption = 'Every sixteenth row'
437 ParentColor = False 443 ParentColor = False
438 end 444 end
439 object DotsColorButton: TColorButton 445 object DotsColorButton: TColorButton
440 Left = 155 446 Left = 199
441 Height = 25 447 Height = 32
442 Top = 424 448 Top = 543
443 Width = 123 449 Width = 158
444 BorderWidth = 2 450 BorderWidth = 3
445 ButtonColorSize = 16 451 ButtonColorSize = 20
446 ButtonColor = clGray 452 ButtonColor = clGray
447 OnColorChanged = NoteTextColorButtonColorChanged 453 OnColorChanged = NoteTextColorButtonColorChanged
448 end 454 end
449 object DividersColorButton: TColorButton 455 object DividersColorButton: TColorButton
450 Left = 155 456 Left = 199
451 Height = 25 457 Height = 32
452 Top = 456 458 Top = 584
453 Width = 123 459 Width = 158
454 BorderWidth = 2 460 BorderWidth = 3
455 ButtonColorSize = 16 461 ButtonColorSize = 20
456 ButtonColor = 11253692 462 ButtonColor = 11253692
457 OnColorChanged = NoteTextColorButtonColorChanged 463 OnColorChanged = NoteTextColorButtonColorChanged
458 end 464 end
459 object Label14: TLabel 465 object Label14: TLabel
460 Left = 14 466 Left = 18
461 Height = 15 467 Height = 22
462 Top = 424 468 Top = 543
463 Width = 24 469 Width = 33
464 Caption = 'Dots' 470 Caption = 'Dots'
465 ParentColor = False 471 ParentColor = False
466 end 472 end
467 object Label15: TLabel 473 object Label15: TLabel
468 Left = 14 474 Left = 18
469 Height = 15 475 Height = 22
470 Top = 456 476 Top = 584
471 Width = 42 477 Width = 58
472 Caption = 'Dividers' 478 Caption = 'Dividers'
473 ParentColor = False 479 ParentColor = False
474 end 480 end
475 object Button6: TButton 481 object Button6: TButton
476 Left = 56 482 Left = 72
477 Height = 25 483 Height = 32
478 Top = 520 484 Top = 666
479 Width = 188 485 Width = 241
480 Caption = 'Reset palette to default' 486 Caption = 'Reset palette to default'
481 OnClick = Button6Click 487 OnClick = Button6Click
482 TabOrder = 1 488 TabOrder = 1
483 end 489 end
484 object Button7: TButton 490 object Button7: TButton
485 Left = 56 491 Left = 72
486 Height = 25 492 Height = 32
487 Top = 493 493 Top = 632
488 Width = 90 494 Width = 115
489 Caption = 'Load palette' 495 Caption = 'Load palette'
490 OnClick = Button7Click 496 OnClick = Button7Click
491 TabOrder = 2 497 TabOrder = 2
492 end 498 end
493 object Button8: TButton 499 object Button8: TButton
494 Left = 154 500 Left = 197
495 Height = 25 501 Height = 32
496 Top = 493 502 Top = 632
497 Width = 90 503 Width = 115
498 Caption = 'Save palette' 504 Caption = 'Save palette'
499 OnClick = Button8Click 505 OnClick = Button8Click
500 TabOrder = 3 506 TabOrder = 3
@@ -503,11 +509,11 @@ object frmOptions: TfrmOptions
503 end 509 end
504 end 510 end
505 object SaveDialog1: TSaveDialog 511 object SaveDialog1: TSaveDialog
506 Left = 376 512 Left = 482
507 end 513 end
508 object KeymapOpenDialog: TOpenDialog 514 object KeymapOpenDialog: TOpenDialog
509 InitialDir = './Keymaps' 515 InitialDir = './Keymaps'
510 Left = 328 516 Left = 420
511 end 517 end
512 object ColorDialog1: TColorDialog 518 object ColorDialog1: TColorDialog
513 Color = clBlack 519 Color = clBlack
@@ -533,12 +539,12 @@ object frmOptions: TfrmOptions
533 'ColorS=F0FBFF' 539 'ColorS=F0FBFF'
534 'ColorT=A4A0A0' 540 'ColorT=A4A0A0'
535 ) 541 )
536 Left = 432 542 Left = 554
537 end 543 end
538 object SaveDialog2: TSaveDialog 544 object SaveDialog2: TSaveDialog
539 Left = 480 545 Left = 615
540 end 546 end
541 object OpenDialog2: TOpenDialog 547 object OpenDialog2: TOpenDialog
542 Left = 520 548 Left = 666
543 end 549 end
544 end 550 end
Modifiedsrc/options.pas +2−0
@@ -184,6 +184,7 @@ begin
184 TrackerSettings.PreviewWhenBumping := CheckListBox1.Checked[2]; 184 TrackerSettings.PreviewWhenBumping := CheckListBox1.Checked[2];
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 end; 188 end;
188 189
189 procedure TfrmOptions.FormCreate(Sender: TObject); 190 procedure TfrmOptions.FormCreate(Sender: TObject);
@@ -207,6 +208,7 @@ begin
207 CheckListBox1.Checked[2] := TrackerSettings.PreviewWhenBumping; 208 CheckListBox1.Checked[2] := TrackerSettings.PreviewWhenBumping;
208 CheckListBox1.Checked[3] := TrackerSettings.DisplayRowNumbersAsHex; 209 CheckListBox1.Checked[3] := TrackerSettings.DisplayRowNumbersAsHex;
209 CheckListBox1.Checked[4] := TrackerSettings.DisplayOrderRowNumbersAsHex; 210 CheckListBox1.Checked[4] := TrackerSettings.DisplayOrderRowNumbersAsHex;
211 CheckListBox1.Checked[5] := TrackerSettings.DrawWaveformGrid;
210 212
211 SamplePatternMap := TPatternMap.Create; 213 SamplePatternMap := TPatternMap.Create;
212 SamplePattern := SamplePatternMap.GetOrCreateNew(0); 214 SamplePattern := SamplePatternMap.GetOrCreateNew(0);
Modifiedsrc/tracker.pas +12−4
@@ -522,7 +522,7 @@ type
522 522
523 function CheckUnsavedChanges: Boolean; 523 function CheckUnsavedChanges: Boolean;
524 524
525 procedure DrawWaveform(PB: TPaintBox; Wave: TWave); 525 procedure DrawWaveform(PB: TPaintBox; Wave: TWave; DrawGrid: Boolean);
526 procedure DrawEnvelope(PB: TPaintBox); 526 procedure DrawEnvelope(PB: TPaintBox);
527 procedure DrawVizualizer(PB: TPaintBox; Channel: Integer); 527 procedure DrawVizualizer(PB: TPaintBox; Channel: Integer);
528 528
@@ -681,11 +681,12 @@ begin
681 end; 681 end;
682 end; 682 end;
683 683
684 procedure TfrmTracker.DrawWaveform(PB: TPaintBox; Wave: TWave); 684 procedure TfrmTracker.DrawWaveform(PB: TPaintBox; Wave: TWave; DrawGrid: Boolean);
685 var 685 var
686 Interval: Single; 686 Interval: Single;
687 I: Integer; 687 I: Integer;
688 W, H : Integer; 688 W, H : Integer;
689 X, Y: Integer;
689 begin 690 begin
690 W := PB.Width; 691 W := PB.Width;
691 H := PB.Height-4; 692 H := PB.Height-4;
@@ -701,6 +702,13 @@ begin
701 for I := Low(Wave) to High(Wave) do 702 for I := Low(Wave) to High(Wave) do
702 LineTo(Round(I*Interval), H-Trunc((Wave[I]/$F)*H)+2); 703 LineTo(Round(I*Interval), H-Trunc((Wave[I]/$F)*H)+2);
703 LineTo(W, H-Trunc((Wave[0]/$F)*H)); 704 LineTo(W, H-Trunc((Wave[0]/$F)*H));
705
706 if DrawGrid then begin
707 Pen.Color := clGray;
708 for X := 0 to 32 do
709 for Y := 0 to $F do
710 Ellipse(Trunc((X/32)*W), Trunc((Y/$F)*H)+1, Trunc((X/32)*W)+2, Trunc((Y/$F)*H)+3);
711 end;
704 end; 712 end;
705 end; 713 end;
706 714
@@ -1321,7 +1329,7 @@ begin
1321 end; 1329 end;
1322 end 1330 end
1323 else if WaveformCombobox.ItemIndex > -1 then 1331 else if WaveformCombobox.ItemIndex > -1 then
1324 DrawWaveform(WavePaintbox, Song.Waves[WaveformCombobox.ItemIndex]); 1332 DrawWaveform(WavePaintbox, Song.Waves[WaveformCombobox.ItemIndex], False);
1325 end; 1333 end;
1326 1334
1327 procedure TfrmTracker.WaveVisualizerPaint(Sender: TObject); 1335 procedure TfrmTracker.WaveVisualizerPaint(Sender: TObject);
@@ -2764,7 +2772,7 @@ end;
2764 2772
2765 procedure TfrmTracker.WaveEditPaintBoxPaint(Sender: TObject); 2773 procedure TfrmTracker.WaveEditPaintBoxPaint(Sender: TObject);
2766 begin 2774 begin
2767 DrawWaveform(WaveEditPaintBox, CurrentWave^); 2775 DrawWaveform(WaveEditPaintBox, CurrentWave^, TrackerSettings.DrawWaveformGrid);
2768 end; 2776 end;
2769 2777
2770 procedure TfrmTracker.LengthEnabledCheckboxChange(Sender: TObject); 2778 procedure TfrmTracker.LengthEnabledCheckboxChange(Sender: TObject);