Commit 9dd8dbe

Nick Faro committed on
Refactor options dialog, taken from the centered row highlight branch
commit 9dd8dbe6e8d1da50e68bba54060a360fd09fe0ac parent 4370de9
4 changed files +523−523
Modifiedoptions.lfm +489−490
@@ -1,22 +1,22 @@
1 object frmOptions: TfrmOptions 1 object frmOptions: TfrmOptions
2 Left = 1675 2 Left = 1485
3 Height = 706 3 Height = 678
4 Top = 128 4 Top = 220
5 Width = 927 5 Width = 550
6 BorderStyle = bsDialog 6 BorderStyle = bsDialog
7 Caption = 'Options' 7 Caption = 'Options'
8 ClientHeight = 706 8 ClientHeight = 678
9 ClientWidth = 927 9 ClientWidth = 550
10 OnClose = FormClose 10 OnClose = FormClose
11 OnCreate = FormCreate 11 OnCreate = FormCreate
12 Position = poMainFormCenter 12 Position = poMainFormCenter
13 LCLVersion = '2.2.0.3' 13 LCLVersion = '2.2.3.0'
14 object Button1: TButton 14 object Button1: TButton
15 AnchorSideRight.Side = asrBottom 15 AnchorSideRight.Side = asrBottom
16 AnchorSideBottom.Side = asrBottom 16 AnchorSideBottom.Side = asrBottom
17 Left = 789 17 Left = 412
18 Height = 25 18 Height = 25
19 Top = 673 19 Top = 645
20 Width = 123 20 Width = 123
21 Anchors = [akRight, akBottom] 21 Anchors = [akRight, akBottom]
22 Caption = 'OK' 22 Caption = 'OK'
@@ -24,487 +24,489 @@ object frmOptions: TfrmOptions
24 ParentFont = False 24 ParentFont = False
25 TabOrder = 0 25 TabOrder = 0
26 end 26 end
27 object KeymapGroupBox: TGroupBox 27 object OptionsPageControl: TPageControl
28 Left = 14 28 AnchorSideLeft.Control = Owner
29 Height = 433 29 AnchorSideTop.Control = Owner
30 Top = 240 30 AnchorSideRight.Control = Owner
31 Width = 282 31 AnchorSideRight.Side = asrBottom
32 Caption = 'Custom key map' 32 AnchorSideBottom.Control = Button1
33 ClientHeight = 413 33 Left = 10
34 ClientWidth = 278 34 Height = 628
35 Enabled = False 35 Top = 10
36 ParentFont = False 36 Width = 530
37 ActivePage = GeneralTabSheet
38 Anchors = [akTop, akLeft, akRight, akBottom]
39 BorderSpacing.Left = 10
40 BorderSpacing.Top = 10
41 BorderSpacing.Right = 10
42 BorderSpacing.Bottom = 7
43 TabIndex = 0
37 TabOrder = 1 44 TabOrder = 1
38 object KeyMapStringGrid: TStringGrid 45 object GeneralTabSheet: TTabSheet
39 AnchorSideBottom.Control = Button5 46 Caption = 'General'
40 Left = 5 47 ClientHeight = 600
41 Height = 343 48 ClientWidth = 522
42 Top = 5 49 object OptionsGroupBox: TGroupBox
43 Width = 268 50 Left = 8
44 Align = alClient 51 Height = 568
45 BorderSpacing.Bottom = 60 52 Top = 8
46 BorderSpacing.Around = 5 53 Width = 392
47 ColCount = 2 54 Caption = 'Options'
48 Columns = < 55 ClientHeight = 548
49 item 56 ClientWidth = 388
50 Title.Caption = 'Key' 57 TabOrder = 0
51 end 58 object CheckListBox1: TCheckListBox
52 item 59 Left = 8
53 Title.Caption = 'Note' 60 Height = 528
54 end> 61 Top = 8
55 DefaultColWidth = 120 62 Width = 370
56 FixedCols = 0 63 Items.Strings = (
57 MouseWheelOption = mwGrid 64 'Show scopes (uses more CPU)'
58 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goAutoAddRows, goTabs, goSmoothScroll] 65 'Play preview when placing notes'
59 ParentFont = False 66 'Play preview when bumping notes up/down'
60 TabOrder = 0 67 'Display pattern row numbers in hexadecimal notation'
61 OnValidateEntry = KeyMapStringGridValidateEntry 68 'Display order row numbers in hexadecimal notation'
62 end 69 )
63 object Button2: TButton 70 ItemHeight = 17
64 AnchorSideBottom.Side = asrBottom 71 TabOrder = 0
65 Left = 9 72 Data = {
66 Height = 25 73 050000000000000000
67 Top = 377 74 }
68 Width = 131 75 end
69 Anchors = [akBottom] 76 end
70 Caption = 'Load' 77 end
71 OnClick = Button2Click 78 object KeyboardTabSheet: TTabSheet
72 ParentFont = False 79 Caption = 'Keyboard'
73 TabOrder = 1 80 ClientHeight = 600
74 end 81 ClientWidth = 522
75 object Button3: TButton 82 object KeymapGroupBox: TGroupBox
76 AnchorSideBottom.Side = asrBottom 83 Left = 16
77 Left = 143 84 Height = 544
78 Height = 25 85 Top = 48
79 Top = 377 86 Width = 392
80 Width = 126 87 Caption = 'Custom key map'
81 Anchors = [akBottom] 88 ClientHeight = 524
82 Caption = 'Save' 89 ClientWidth = 388
83 OnClick = Button3Click 90 Enabled = False
84 ParentFont = False 91 ParentFont = False
85 TabOrder = 2 92 TabOrder = 0
86 end 93 object KeyMapStringGrid: TStringGrid
87 object Button4: TButton 94 Left = 8
88 AnchorSideRight.Control = Button3 95 Height = 472
89 AnchorSideRight.Side = asrBottom 96 Top = 8
90 AnchorSideBottom.Control = Button3 97 Width = 368
91 Left = 239 98 AutoFillColumns = True
92 Height = 25 99 ColCount = 2
93 Top = 352 100 Columns = <
94 Width = 30 101 item
95 Anchors = [akRight, akBottom] 102 Title.Caption = 'Key'
96 Caption = '-' 103 Width = 173
97 OnClick = Button4Click 104 end
98 ParentFont = False 105 item
99 TabOrder = 3 106 Title.Caption = 'Note'
100 end 107 Width = 174
101 object Button5: TButton 108 end>
102 AnchorSideRight.Control = Button4 109 DefaultColWidth = 120
103 AnchorSideBottom.Control = Button3 110 FixedCols = 0
104 Left = 209 111 MouseWheelOption = mwGrid
105 Height = 25 112 Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goAutoAddRows, goTabs, goSmoothScroll]
106 Top = 352 113 ParentFont = False
107 Width = 30 114 TabOrder = 0
108 Anchors = [akRight, akBottom] 115 OnValidateEntry = KeyMapStringGridValidateEntry
109 Caption = '+' 116 ColWidths = (
110 OnClick = Button5Click 117 173
111 ParentFont = False 118 174
112 TabOrder = 4 119 )
113 end 120 end
114 end 121 object Button2: TButton
115 object OptionsGroupBox: TGroupBox 122 Left = 8
116 Left = 14 123 Height = 25
117 Height = 224 124 Top = 488
118 Top = 8 125 Width = 131
119 Width = 298 126 Caption = 'Load'
120 Caption = 'Options' 127 OnClick = Button2Click
121 ClientHeight = 204 128 ParentFont = False
122 ClientWidth = 294 129 TabOrder = 1
123 TabOrder = 2 130 end
124 object ScopesCheck: TCheckBox 131 object Button3: TButton
125 Left = 14 132 Left = 144
126 Height = 19 133 Height = 25
127 Top = 8 134 Top = 488
128 Width = 149 135 Width = 126
129 Alignment = taLeftJustify 136 Caption = 'Save'
130 Caption = 'Scopes (Uses More CPU)' 137 OnClick = Button3Click
131 Checked = True 138 ParentFont = False
132 ParentFont = False 139 TabOrder = 2
133 State = cbChecked 140 end
134 TabOrder = 0 141 object Button4: TButton
135 end 142 Left = 346
136 object KeymapCheckbox: TCheckBox 143 Height = 25
137 Left = 14 144 Top = 488
138 Height = 19 145 Width = 30
139 Top = 40 146 Caption = '-'
140 Width = 127 147 OnClick = Button4Click
141 Alignment = taLeftJustify 148 ParentFont = False
142 Caption = 'Use custom keymap' 149 TabOrder = 3
143 OnChange = KeymapCheckboxChange 150 end
144 ParentFont = False 151 object Button5: TButton
145 ParentBidiMode = False 152 Left = 312
146 TabOrder = 1 153 Height = 25
147 end 154 Top = 488
148 object PreviewWhenPlacingCheck: TCheckBox 155 Width = 30
149 Left = 14 156 Caption = '+'
150 Height = 19 157 OnClick = Button5Click
151 Top = 72 158 ParentFont = False
152 Width = 192 159 TabOrder = 4
153 Alignment = taLeftJustify 160 end
154 Caption = 'Play preview when placing notes' 161 end
155 ParentFont = False 162 object UseCustomKeymapCheckbox: TCheckBox
156 TabOrder = 2 163 Left = 24
157 end 164 Height = 19
158 object PreviewWhenBumpingCheck: TCheckBox 165 Top = 16
159 Left = 14 166 Width = 127
160 Height = 19 167 Caption = 'Use custom keymap'
161 Top = 104 168 OnChange = KeymapCheckboxChange
162 Width = 254 169 TabOrder = 1
163 Alignment = taLeftJustify 170 end
164 Caption = 'Play preview when bumping notes up/down' 171 end
165 ParentFont = False 172 object CustomiztaionTabSheet: TTabSheet
166 TabOrder = 3 173 Caption = 'Appearance'
167 end 174 ClientHeight = 600
168 object DisplayHexRowNumbersCheck: TCheckBox 175 ClientWidth = 522
169 Left = 14 176 object Panel1: TPanel
170 Height = 19 177 Left = 312
171 Top = 136 178 Height = 577
172 Width = 262 179 Top = 8
173 Alignment = taLeftJustify 180 Width = 200
174 Caption = 'Display row numbers in hexadecimal notation' 181 BevelWidth = 3
175 ParentFont = False 182 ClientHeight = 577
176 TabOrder = 4 183 ClientWidth = 200
177 end 184 TabOrder = 0
178 object DisplayOrderHexRowNumbersCheck: TCheckBox 185 object SampleTrackerGridPanel: TPanel
179 Left = 14 186 Left = 3
180 Height = 19 187 Height = 571
181 Top = 168 188 Top = 3
182 Width = 270 189 Width = 194
183 Alignment = taLeftJustify 190 Align = alClient
184 Caption = 'Display order numbers in hexadecimal notation' 191 BevelOuter = bvNone
185 ParentFont = False 192 TabOrder = 0
186 TabOrder = 5 193 end
187 end 194 end
188 end 195 object CustomizationGroupBox: TGroupBox
189 object CustomizationGroupBox: TGroupBox 196 Left = 8
190 Left = 320 197 Height = 576
191 Height = 576 198 Top = 8
192 Top = 8 199 Width = 297
193 Width = 297 200 Caption = 'Customization'
194 Caption = 'Customization' 201 ClientHeight = 556
195 ClientHeight = 556 202 ClientWidth = 293
196 ClientWidth = 293 203 TabOrder = 1
197 TabOrder = 3 204 object Label1: TLabel
198 object Label1: TLabel 205 Left = 14
199 Left = 14 206 Height = 15
200 Height = 15 207 Top = 14
201 Top = 14 208 Width = 119
202 Width = 119 209 Caption = 'Pattern editor font size'
203 Caption = 'Pattern editor font size' 210 ParentColor = False
204 ParentFont = False 211 ParentFont = False
205 end 212 end
206 object FontSizeSpinner: TSpinEdit 213 object FontSizeSpinner: TSpinEdit
207 Left = 155 214 Left = 155
208 Height = 23 215 Height = 23
209 Top = 9 216 Top = 9
210 Width = 123 217 Width = 123
211 OnChange = FontSizeSpinnerChange 218 OnChange = FontSizeSpinnerChange
212 ParentFont = False 219 ParentFont = False
213 TabOrder = 0 220 TabOrder = 0
214 Value = 12 221 Value = 12
215 end 222 end
216 object NoteTextColorButton: TColorButton 223 object NoteTextColorButton: TColorButton
217 Left = 155 224 Left = 155
218 Height = 25 225 Height = 25
219 Top = 40 226 Top = 40
220 Width = 123 227 Width = 123
221 BorderWidth = 2 228 BorderWidth = 2
222 ButtonColorSize = 16 229 ButtonColorSize = 16
223 ButtonColor = 8342016 230 ButtonColor = 8342016
224 OnColorChanged = NoteTextColorButtonColorChanged 231 OnColorChanged = NoteTextColorButtonColorChanged
225 end 232 end
226 object Label2: TLabel 233 object Label2: TLabel
227 Left = 14 234 Left = 14
228 Height = 15 235 Height = 15
229 Top = 40 236 Top = 40
230 Width = 79 237 Width = 79
231 Caption = 'Note text color' 238 Caption = 'Note text color'
232 end 239 ParentColor = False
233 object InstrumentTextColorButton: TColorButton 240 end
234 Left = 155 241 object InstrumentTextColorButton: TColorButton
235 Height = 25 242 Left = 155
236 Top = 72 243 Height = 25
237 Width = 123 244 Top = 72
238 BorderWidth = 2 245 Width = 123
239 ButtonColorSize = 16 246 BorderWidth = 2
240 ButtonColor = 8355584 247 ButtonColorSize = 16
241 OnColorChanged = NoteTextColorButtonColorChanged 248 ButtonColor = 8355584
242 end 249 OnColorChanged = NoteTextColorButtonColorChanged
243 object MiscEffectTextColorButton: TColorButton 250 end
244 Left = 155 251 object MiscEffectTextColorButton: TColorButton
245 Height = 25 252 Left = 155
246 Top = 104 253 Height = 25
247 Width = 123 254 Top = 104
248 BorderWidth = 2 255 Width = 123
249 ButtonColorSize = 16 256 BorderWidth = 2
250 ButtonColor = 4145020 257 ButtonColorSize = 16
251 OnColorChanged = NoteTextColorButtonColorChanged 258 ButtonColor = 4145020
252 end 259 OnColorChanged = NoteTextColorButtonColorChanged
253 object PitchEffectTextColorButton: TColorButton 260 end
254 Left = 155 261 object PitchEffectTextColorButton: TColorButton
255 Height = 25 262 Left = 155
256 Top = 136 263 Height = 25
257 Width = 123 264 Top = 136
258 BorderWidth = 2 265 Width = 123
259 ButtonColorSize = 16 266 BorderWidth = 2
260 ButtonColor = 25186 267 ButtonColorSize = 16
261 OnColorChanged = NoteTextColorButtonColorChanged 268 ButtonColor = 25186
262 end 269 OnColorChanged = NoteTextColorButtonColorChanged
263 object VolumeEffectTextColorButton: TColorButton 270 end
264 Left = 155 271 object VolumeEffectTextColorButton: TColorButton
265 Height = 25 272 Left = 155
266 Top = 168 273 Height = 25
267 Width = 123 274 Top = 168
268 BorderWidth = 2 275 Width = 123
269 ButtonColorSize = 16 276 BorderWidth = 2
270 ButtonColor = 32550 277 ButtonColorSize = 16
271 OnColorChanged = NoteTextColorButtonColorChanged 278 ButtonColor = 32550
272 end 279 OnColorChanged = NoteTextColorButtonColorChanged
273 object PanningEffectTextColorButton: TColorButton 280 end
274 Left = 155 281 object PanningEffectTextColorButton: TColorButton
275 Height = 25 282 Left = 155
276 Top = 200 283 Height = 25
277 Width = 123 284 Top = 200
278 BorderWidth = 2 285 Width = 123
279 ButtonColorSize = 16 286 BorderWidth = 2
280 ButtonColor = 8355584 287 ButtonColorSize = 16
281 OnColorChanged = NoteTextColorButtonColorChanged 288 ButtonColor = 8355584
282 end 289 OnColorChanged = NoteTextColorButtonColorChanged
283 object SongEffectTextColorButton: TColorButton 290 end
284 Left = 155 291 object SongEffectTextColorButton: TColorButton
285 Height = 25 292 Left = 155
286 Top = 232 293 Height = 25
287 Width = 123 294 Top = 232
288 BorderWidth = 2 295 Width = 123
289 ButtonColorSize = 16 296 BorderWidth = 2
290 ButtonColor = 127 297 ButtonColorSize = 16
291 OnColorChanged = NoteTextColorButtonColorChanged 298 ButtonColor = 127
292 end 299 OnColorChanged = NoteTextColorButtonColorChanged
293 object Label3: TLabel 300 end
294 Left = 14 301 object Label3: TLabel
295 Height = 15 302 Left = 14
296 Top = 72 303 Height = 15
297 Width = 111 304 Top = 72
298 Caption = 'Instrument text color' 305 Width = 111
299 end 306 Caption = 'Instrument text color'
300 object Label4: TLabel 307 ParentColor = False
301 Left = 14 308 end
302 Height = 15 309 object Label4: TLabel
303 Top = 104 310 Left = 14
304 Width = 114 311 Height = 15
305 Caption = 'Misc. effect text color' 312 Top = 104
306 end 313 Width = 114
307 object Label5: TLabel 314 Caption = 'Misc. effect text color'
308 Left = 14 315 ParentColor = False
309 Height = 15 316 end
310 Top = 136 317 object Label5: TLabel
311 Width = 113 318 Left = 14
312 Caption = 'Pitch effect text color' 319 Height = 15
313 end 320 Top = 136
314 object Label6: TLabel 321 Width = 113
315 Left = 14 322 Caption = 'Pitch effect text color'
316 Height = 15 323 ParentColor = False
317 Top = 168 324 end
318 Width = 126 325 object Label6: TLabel
319 Caption = 'Volume effect text color' 326 Left = 14
320 end 327 Height = 15
321 object Label7: TLabel 328 Top = 168
322 Left = 14 329 Width = 126
323 Height = 15 330 Caption = 'Volume effect text color'
324 Top = 200 331 ParentColor = False
325 Width = 130 332 end
326 Caption = 'Panning effect text color' 333 object Label7: TLabel
327 end 334 Left = 14
328 object Label8: TLabel 335 Height = 15
329 Left = 14 336 Top = 200
330 Height = 15 337 Width = 130
331 Top = 232 338 Caption = 'Panning effect text color'
332 Width = 113 339 ParentColor = False
333 Caption = 'Song effect text color' 340 end
334 end 341 object Label8: TLabel
335 object BackgroundColorButton: TColorButton 342 Left = 14
336 Left = 155 343 Height = 15
337 Height = 25 344 Top = 232
338 Top = 264 345 Width = 113
339 Width = 123 346 Caption = 'Song effect text color'
340 BorderWidth = 2 347 ParentColor = False
341 ButtonColorSize = 16 348 end
342 ButtonColor = 13687777 349 object BackgroundColorButton: TColorButton
343 OnColorChanged = NoteTextColorButtonColorChanged 350 Left = 155
344 end 351 Height = 25
345 object HighlightedColorButton: TColorButton 352 Top = 264
346 Left = 155 353 Width = 123
347 Height = 25 354 BorderWidth = 2
348 Top = 296 355 ButtonColorSize = 16
349 Width = 123 356 ButtonColor = 13687777
350 BorderWidth = 2 357 OnColorChanged = NoteTextColorButtonColorChanged
351 ButtonColorSize = 16 358 end
352 ButtonColor = 8034729 359 object HighlightedColorButton: TColorButton
353 OnColorChanged = NoteTextColorButtonColorChanged 360 Left = 155
354 end 361 Height = 25
355 object SelectedColorButton: TColorButton 362 Top = 296
356 Left = 155 363 Width = 123
357 Height = 25 364 BorderWidth = 2
358 Top = 328 365 ButtonColorSize = 16
359 Width = 123 366 ButtonColor = 8034729
360 BorderWidth = 2 367 OnColorChanged = NoteTextColorButtonColorChanged
361 ButtonColorSize = 16 368 end
362 ButtonColor = 10400960 369 object SelectedColorButton: TColorButton
363 OnColorChanged = NoteTextColorButtonColorChanged 370 Left = 155
364 end 371 Height = 25
365 object FourthRowColorButton: TColorButton 372 Top = 328
366 Left = 155 373 Width = 123
367 Height = 25 374 BorderWidth = 2
368 Top = 360 375 ButtonColorSize = 16
369 Width = 123 376 ButtonColor = 10400960
370 BorderWidth = 2 377 OnColorChanged = NoteTextColorButtonColorChanged
371 ButtonColorSize = 16 378 end
372 ButtonColor = 12833240 379 object FourthRowColorButton: TColorButton
373 OnColorChanged = NoteTextColorButtonColorChanged 380 Left = 155
374 end 381 Height = 25
375 object SixteenthRowColorButton: TColorButton 382 Top = 360
376 Left = 155 383 Width = 123
377 Height = 25 384 BorderWidth = 2
378 Top = 392 385 ButtonColorSize = 16
379 Width = 123 386 ButtonColor = 12833240
380 BorderWidth = 2 387 OnColorChanged = NoteTextColorButtonColorChanged
381 ButtonColorSize = 16 388 end
382 ButtonColor = 11912654 389 object SixteenthRowColorButton: TColorButton
383 OnColorChanged = NoteTextColorButtonColorChanged 390 Left = 155
384 end 391 Height = 25
385 object Label9: TLabel 392 Top = 392
386 Left = 14 393 Width = 123
387 Height = 15 394 BorderWidth = 2
388 Top = 264 395 ButtonColorSize = 16
389 Width = 64 396 ButtonColor = 11912654
390 Caption = 'Background' 397 OnColorChanged = NoteTextColorButtonColorChanged
391 end 398 end
392 object Label10: TLabel 399 object Label9: TLabel
393 Left = 14 400 Left = 14
394 Height = 15 401 Height = 15
395 Top = 296 402 Top = 264
396 Width = 63 403 Width = 64
397 Caption = 'Highlighted' 404 Caption = 'Background'
398 end 405 ParentColor = False
399 object Label11: TLabel 406 end
400 Left = 14 407 object Label10: TLabel
401 Height = 15 408 Left = 14
402 Top = 328 409 Height = 15
403 Width = 44 410 Top = 296
404 Caption = 'Selected' 411 Width = 63
405 end 412 Caption = 'Highlighted'
406 object Label12: TLabel 413 ParentColor = False
407 Left = 14 414 end
408 Height = 15 415 object Label11: TLabel
409 Top = 360 416 Left = 14
410 Width = 87 417 Height = 15
411 Caption = 'Every fourth row' 418 Top = 328
412 end 419 Width = 44
413 object Label13: TLabel 420 Caption = 'Selected'
414 Left = 14 421 ParentColor = False
415 Height = 15 422 end
416 Top = 392 423 object Label12: TLabel
417 Width = 102 424 Left = 14
418 Caption = 'Every sixteenth row' 425 Height = 15
419 end 426 Top = 360
420 object DotsColorButton: TColorButton 427 Width = 87
421 Left = 155 428 Caption = 'Every fourth row'
422 Height = 25 429 ParentColor = False
423 Top = 424 430 end
424 Width = 123 431 object Label13: TLabel
425 BorderWidth = 2 432 Left = 14
426 ButtonColorSize = 16 433 Height = 15
427 ButtonColor = clGray 434 Top = 392
428 OnColorChanged = NoteTextColorButtonColorChanged 435 Width = 102
429 end 436 Caption = 'Every sixteenth row'
430 object DividersColorButton: TColorButton 437 ParentColor = False
431 Left = 155 438 end
432 Height = 25 439 object DotsColorButton: TColorButton
433 Top = 456 440 Left = 155
434 Width = 123 441 Height = 25
435 BorderWidth = 2 442 Top = 424
436 ButtonColorSize = 16 443 Width = 123
437 ButtonColor = 11253692 444 BorderWidth = 2
438 OnColorChanged = NoteTextColorButtonColorChanged 445 ButtonColorSize = 16
439 end 446 ButtonColor = clGray
440 object Label14: TLabel 447 OnColorChanged = NoteTextColorButtonColorChanged
441 Left = 14 448 end
442 Height = 15 449 object DividersColorButton: TColorButton
443 Top = 424 450 Left = 155
444 Width = 24 451 Height = 25
445 Caption = 'Dots' 452 Top = 456
446 end 453 Width = 123
447 object Label15: TLabel 454 BorderWidth = 2
448 Left = 14 455 ButtonColorSize = 16
449 Height = 15 456 ButtonColor = 11253692
450 Top = 456 457 OnColorChanged = NoteTextColorButtonColorChanged
451 Width = 42 458 end
452 Caption = 'Dividers' 459 object Label14: TLabel
453 end 460 Left = 14
454 object Button6: TButton 461 Height = 15
455 Left = 56 462 Top = 424
456 Height = 25 463 Width = 24
457 Top = 520 464 Caption = 'Dots'
458 Width = 188 465 ParentColor = False
459 Caption = 'Reset palette to default' 466 end
460 OnClick = Button6Click 467 object Label15: TLabel
461 TabOrder = 1 468 Left = 14
462 end 469 Height = 15
463 object Button7: TButton 470 Top = 456
464 Left = 56 471 Width = 42
465 Height = 25 472 Caption = 'Dividers'
466 Top = 493 473 ParentColor = False
467 Width = 90 474 end
468 Caption = 'Load palette' 475 object Button6: TButton
469 OnClick = Button7Click 476 Left = 56
470 TabOrder = 2 477 Height = 25
471 end 478 Top = 520
472 object Button8: TButton 479 Width = 188
473 Left = 154 480 Caption = 'Reset palette to default'
474 Height = 25 481 OnClick = Button6Click
475 Top = 493 482 TabOrder = 1
476 Width = 90 483 end
477 Caption = 'Save palette' 484 object Button7: TButton
478 OnClick = Button8Click 485 Left = 56
479 TabOrder = 3 486 Height = 25
480 end 487 Top = 493
481 end 488 Width = 90
482 object Panel1: TPanel 489 Caption = 'Load palette'
483 Left = 632 490 OnClick = Button7Click
484 Height = 657 491 TabOrder = 2
485 Top = 8 492 end
486 Width = 280 493 object Button8: TButton
487 BevelWidth = 3 494 Left = 154
488 ClientHeight = 657 495 Height = 25
489 ClientWidth = 280 496 Top = 493
490 TabOrder = 4 497 Width = 90
491 object SampleTrackerGridPanel: TPanel 498 Caption = 'Save palette'
492 Left = 3 499 OnClick = Button8Click
493 Height = 651 500 TabOrder = 3
494 Top = 3 501 end
495 Width = 274 502 end
496 Align = alClient
497 BevelOuter = bvNone
498 TabOrder = 0
499 end 503 end
500 end 504 end
501 object SaveDialog1: TSaveDialog 505 object SaveDialog1: TSaveDialog
502 Left = 56 506 Left = 376
503 Top = 640
504 end 507 end
505 object OpenDialog1: TOpenDialog 508 object OpenDialog1: TOpenDialog
506 Left = 16 509 Left = 328
507 Top = 640
508 end 510 end
509 object ColorDialog1: TColorDialog 511 object ColorDialog1: TColorDialog
510 Color = clBlack 512 Color = clBlack
@@ -530,15 +532,12 @@ object frmOptions: TfrmOptions
530 'ColorS=F0FBFF' 532 'ColorS=F0FBFF'
531 'ColorT=A4A0A0' 533 'ColorT=A4A0A0'
532 ) 534 )
533 Left = 96 535 Left = 432
534 Top = 640
535 end 536 end
536 object SaveDialog2: TSaveDialog 537 object SaveDialog2: TSaveDialog
537 Left = 400 538 Left = 480
538 Top = 592
539 end 539 end
540 object OpenDialog2: TOpenDialog 540 object OpenDialog2: TOpenDialog
541 Left = 504 541 Left = 520
542 Top = 592
543 end 542 end
544 end 543 end
Modifiedoptions.pas +23−22
@@ -6,8 +6,8 @@ interface
6 6
7 uses 7 uses
8 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Spin, Grids, 8 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, Spin, Grids,
9 LCLProc, Buttons, ExtCtrls, Constants, Keymap, hUGESettings, hUGEDataTypes, 9 LCLProc, Buttons, ExtCtrls, ComCtrls, CheckLst, Constants, Keymap,
10 TrackerGrid; 10 hUGESettings, hUGEDataTypes, TrackerGrid;
11 11
12 type 12 type
13 13
@@ -22,9 +22,11 @@ type
22 Button6: TButton; 22 Button6: TButton;
23 Button7: TButton; 23 Button7: TButton;
24 Button8: TButton; 24 Button8: TButton;
25 DisplayOrderHexRowNumbersCheck: TCheckBox; 25 UseCustomKeymapCheckbox: TCheckBox;
26 CheckListBox1: TCheckListBox;
26 NoteTextColorButton: TColorButton; 27 NoteTextColorButton: TColorButton;
27 OpenDialog2: TOpenDialog; 28 OpenDialog2: TOpenDialog;
29 OptionsPageControl: TPageControl;
28 Panel1: TPanel; 30 Panel1: TPanel;
29 SaveDialog2: TSaveDialog; 31 SaveDialog2: TSaveDialog;
30 SelectedColorButton: TColorButton; 32 SelectedColorButton: TColorButton;
@@ -35,13 +37,15 @@ type
35 InstrumentTextColorButton: TColorButton; 37 InstrumentTextColorButton: TColorButton;
36 MiscEffectTextColorButton: TColorButton; 38 MiscEffectTextColorButton: TColorButton;
37 PitchEffectTextColorButton: TColorButton; 39 PitchEffectTextColorButton: TColorButton;
40 KeyboardTabSheet: TTabSheet;
41 GeneralTabSheet: TTabSheet;
42 CustomiztaionTabSheet: TTabSheet;
38 VolumeEffectTextColorButton: TColorButton; 43 VolumeEffectTextColorButton: TColorButton;
39 PanningEffectTextColorButton: TColorButton; 44 PanningEffectTextColorButton: TColorButton;
40 SongEffectTextColorButton: TColorButton; 45 SongEffectTextColorButton: TColorButton;
41 BackgroundColorButton: TColorButton; 46 BackgroundColorButton: TColorButton;
42 HighlightedColorButton: TColorButton; 47 HighlightedColorButton: TColorButton;
43 ColorDialog1: TColorDialog; 48 ColorDialog1: TColorDialog;
44 DisplayHexRowNumbersCheck: TCheckBox;
45 CustomizationGroupBox: TGroupBox; 49 CustomizationGroupBox: TGroupBox;
46 Label10: TLabel; 50 Label10: TLabel;
47 Label11: TLabel; 51 Label11: TLabel;
@@ -59,13 +63,9 @@ type
59 Label9: TLabel; 63 Label9: TLabel;
60 OptionsGroupBox: TGroupBox; 64 OptionsGroupBox: TGroupBox;
61 SampleTrackerGridPanel: TPanel; 65 SampleTrackerGridPanel: TPanel;
62 PreviewWhenPlacingCheck: TCheckBox;
63 PreviewWhenBumpingCheck: TCheckBox;
64 KeymapCheckbox: TCheckBox;
65 KeymapGroupBox: TGroupBox; 66 KeymapGroupBox: TGroupBox;
66 OpenDialog1: TOpenDialog; 67 OpenDialog1: TOpenDialog;
67 SaveDialog1: TSaveDialog; 68 SaveDialog1: TSaveDialog;
68 ScopesCheck: TCheckBox;
69 Label1: TLabel; 69 Label1: TLabel;
70 FontSizeSpinner: TSpinEdit; 70 FontSizeSpinner: TSpinEdit;
71 KeyMapStringGrid: TStringGrid; 71 KeyMapStringGrid: TStringGrid;
@@ -178,12 +178,12 @@ begin
178 SaveColorsToFile('color_scheme.col'); 178 SaveColorsToFile('color_scheme.col');
179 179
180 TrackerSettings.PatternEditorFontSize := FontSizeSpinner.Value; 180 TrackerSettings.PatternEditorFontSize := FontSizeSpinner.Value;
181 TrackerSettings.UseScopes := ScopesCheck.Checked; 181 TrackerSettings.UseScopes := CheckListBox1.Checked[0];
182 TrackerSettings.UseCustomKeymap := KeymapCheckbox.Checked; 182 TrackerSettings.UseCustomKeymap := UseCustomKeymapCheckbox.Checked;
183 TrackerSettings.PreviewWhenPlacing := PreviewWhenPlacingCheck.Checked; 183 TrackerSettings.PreviewWhenPlacing := CheckListBox1.Checked[1];
184 TrackerSettings.PreviewWhenBumping := PreviewWhenBumpingCheck.Checked; 184 TrackerSettings.PreviewWhenBumping := CheckListBox1.Checked[2];
185 TrackerSettings.DisplayRowNumbersAsHex := DisplayHexRowNumbersCheck.Checked; 185 TrackerSettings.DisplayRowNumbersAsHex := CheckListBox1.Checked[3];
186 TrackerSettings.DisplayOrderRowNumbersAsHex := DisplayOrderHexRowNumbersCheck.Checked; 186 TrackerSettings.DisplayOrderRowNumbersAsHex := CheckListBox1.Checked[4];
187 end; 187 end;
188 188
189 procedure TfrmOptions.FormCreate(Sender: TObject); 189 procedure TfrmOptions.FormCreate(Sender: TObject);
@@ -191,6 +191,7 @@ var
191 SamplePattern: PPattern; 191 SamplePattern: PPattern;
192 I: Integer; 192 I: Integer;
193 begin 193 begin
194 OptionsPageControl.TabIndex := 0;
194 KeyMapStringGrid.SaveOptions := soAll; 195 KeyMapStringGrid.SaveOptions := soAll;
195 196
196 if FileExists('custom_keymap.km') then 197 if FileExists('custom_keymap.km') then
@@ -200,12 +201,12 @@ begin
200 LoadColorsFromFile('color_scheme.col'); 201 LoadColorsFromFile('color_scheme.col');
201 202
202 FontSizeSpinner.Value := TrackerSettings.PatternEditorFontSize; 203 FontSizeSpinner.Value := TrackerSettings.PatternEditorFontSize;
203 ScopesCheck.Checked := TrackerSettings.UseScopes; 204 CheckListBox1.Checked[0] := TrackerSettings.UseScopes;
204 KeymapCheckbox.Checked := TrackerSettings.UseCustomKeymap; 205 UseCustomKeymapCheckbox.Checked := TrackerSettings.UseCustomKeymap;
205 PreviewWhenPlacingCheck.Checked := TrackerSettings.PreviewWhenPlacing; 206 CheckListBox1.Checked[1] := TrackerSettings.PreviewWhenPlacing;
206 PreviewWhenBumpingCheck.Checked := TrackerSettings.PreviewWhenBumping; 207 CheckListBox1.Checked[2] := TrackerSettings.PreviewWhenBumping;
207 DisplayHexRowNumbersCheck.Checked := TrackerSettings.DisplayRowNumbersAsHex; 208 CheckListBox1.Checked[3] := TrackerSettings.DisplayRowNumbersAsHex;
208 DisplayOrderHexRowNumbersCheck.Checked := TrackerSettings.DisplayOrderRowNumbersAsHex; 209 CheckListBox1.Checked[4] := TrackerSettings.DisplayOrderRowNumbersAsHex;
209 210
210 SamplePatternMap := TPatternMap.Create; 211 SamplePatternMap := TPatternMap.Create;
211 SamplePattern := SamplePatternMap.GetOrCreateNew(0); 212 SamplePattern := SamplePatternMap.GetOrCreateNew(0);
@@ -222,7 +223,7 @@ end;
222 223
223 procedure TfrmOptions.KeymapCheckboxChange(Sender: TObject); 224 procedure TfrmOptions.KeymapCheckboxChange(Sender: TObject);
224 begin 225 begin
225 KeymapGroupBox.Enabled := KeymapCheckbox.Checked; 226 KeymapGroupBox.Enabled := UseCustomKeymapCheckbox.Checked;
226 end; 227 end;
227 228
228 procedure TfrmOptions.KeyMapStringGridValidateEntry(sender: TObject; aCol, 229 procedure TfrmOptions.KeyMapStringGridValidateEntry(sender: TObject; aCol,
@@ -314,7 +315,7 @@ begin
314 CloseFile(F); 315 CloseFile(F);
315 except 316 except
316 on E: Exception do begin 317 on E: Exception do begin
317 ShowMessage('Couldn''t load colors from ' + Filename); 318 ShowMessage('Couldn''t save colors to ' + Filename);
318 end; 319 end;
319 end; 320 end;
320 end; 321 end;
Modifiedtracker.lfm +3−3
@@ -1715,7 +1715,7 @@ object frmTracker: TfrmTracker
1715 end 1715 end
1716 end 1716 end
1717 end 1717 end
1718 object Panel2: TPanel 1718 object ScopesPanel: TPanel
1719 Left = 0 1719 Left = 0
1720 Height = 64 1720 Height = 64
1721 Top = 25 1721 Top = 25
@@ -2146,9 +2146,9 @@ object frmTracker: TfrmTracker
2146 object MenuItem25: TMenuItem 2146 object MenuItem25: TMenuItem
2147 Caption = '-' 2147 Caption = '-'
2148 end 2148 end
2149 object MenuItem26: TMenuItem 2149 object OptionsMenuItem: TMenuItem
2150 Caption = 'Options ...' 2150 Caption = 'Options ...'
2151 OnClick = MenuItem26Click 2151 OnClick = OptionsMenuItemClick
2152 end 2152 end
2153 end 2153 end
2154 object MenuItem3: TMenuItem 2154 object MenuItem3: TMenuItem
Modifiedtracker.pas +8−8
@@ -9,8 +9,8 @@ uses
9 FileUtil, math, Instruments, Song, Utils, Constants, sound, vars, machine, 9 FileUtil, math, Instruments, Song, Utils, Constants, sound, vars, machine,
10 about_hugetracker, TrackerGrid, lclintf, lmessages, Buttons, Grids, DBCtrls, 10 about_hugetracker, TrackerGrid, lclintf, lmessages, Buttons, Grids, DBCtrls,
11 HugeDatatypes, LCLType, Clipbrd, RackCtls, Codegen, SymParser, options, 11 HugeDatatypes, LCLType, Clipbrd, RackCtls, Codegen, SymParser, options,
12 bgrabitmap, effecteditor, RenderToWave, modimport, mainloop, strutils, Types, 12 bgrabitmap, effecteditor, RenderToWave, modimport, mainloop, strutils, Rtti,
13 Keymap, hUGESettings, vgm, TBMImport, InstrumentPreview; 13 Types, Keymap, hUGESettings, vgm, TBMImport, InstrumentPreview;
14 14
15 // TODO: Move to config file? 15 // TODO: Move to config file?
16 const 16 const
@@ -107,7 +107,7 @@ type
107 MenuItem23: TMenuItem; 107 MenuItem23: TMenuItem;
108 MenuItem24: TMenuItem; 108 MenuItem24: TMenuItem;
109 MenuItem25: TMenuItem; 109 MenuItem25: TMenuItem;
110 MenuItem26: TMenuItem; 110 OptionsMenuItem: TMenuItem;
111 MenuItem27: TMenuItem; 111 MenuItem27: TMenuItem;
112 MenuItem28: TMenuItem; 112 MenuItem28: TMenuItem;
113 MenuItem31: TMenuItem; 113 MenuItem31: TMenuItem;
@@ -282,7 +282,7 @@ type
282 PageControl1: TPageControl; 282 PageControl1: TPageControl;
283 WavePaintbox: TPaintBox; 283 WavePaintbox: TPaintBox;
284 Panel1: TPanel; 284 Panel1: TPanel;
285 Panel2: TPanel; 285 ScopesPanel: TPanel;
286 InstrumentNumberSpinner: TSpinEdit; 286 InstrumentNumberSpinner: TSpinEdit;
287 Panel4: TPanel; 287 Panel4: TPanel;
288 Splitter1: TSplitter; 288 Splitter1: TSplitter;
@@ -386,7 +386,7 @@ type
386 procedure MenuItem19Click(Sender: TObject); 386 procedure MenuItem19Click(Sender: TObject);
387 procedure MenuItem21Click(Sender: TObject); 387 procedure MenuItem21Click(Sender: TObject);
388 procedure MenuItem22Click(Sender: TObject); 388 procedure MenuItem22Click(Sender: TObject);
389 procedure MenuItem26Click(Sender: TObject); 389 procedure OptionsMenuItemClick(Sender: TObject);
390 procedure MenuItem31Click(Sender: TObject); 390 procedure MenuItem31Click(Sender: TObject);
391 procedure MenuItem33Click(Sender: TObject); 391 procedure MenuItem33Click(Sender: TObject);
392 procedure MenuItem34Click(Sender: TObject); 392 procedure MenuItem34Click(Sender: TObject);
@@ -1492,7 +1492,7 @@ begin
1492 1492
1493 // Start the Oscilloscope repaint timer 1493 // Start the Oscilloscope repaint timer
1494 OscilloscopeUpdateTimer.Enabled := ScopesOn; 1494 OscilloscopeUpdateTimer.Enabled := ScopesOn;
1495 Panel2.Visible := ScopesOn; 1495 ScopesPanel.Visible := ScopesOn;
1496 1496
1497 // Switch to general tab sheet 1497 // Switch to general tab sheet
1498 PageControl1.ActivePageIndex := 0; 1498 PageControl1.ActivePageIndex := 0;
@@ -2318,7 +2318,7 @@ begin
2318 ReloadPatterns; 2318 ReloadPatterns;
2319 end; 2319 end;
2320 2320
2321 procedure TfrmTracker.MenuItem26Click(Sender: TObject); 2321 procedure TfrmTracker.OptionsMenuItemClick(Sender: TObject);
2322 begin 2322 begin
2323 frmOptions.ShowModal; 2323 frmOptions.ShowModal;
2324 2324
@@ -2333,7 +2333,7 @@ begin
2333 ScopesOn := TrackerSettings.UseScopes; 2333 ScopesOn := TrackerSettings.UseScopes;
2334 2334
2335 OscilloscopeUpdateTimer.Enabled := ScopesOn; 2335 OscilloscopeUpdateTimer.Enabled := ScopesOn;
2336 Panel2.Visible := ScopesOn; 2336 ScopesPanel.Visible := ScopesOn;
2337 2337
2338 RecreateRowNumbers; 2338 RecreateRowNumbers;
2339 TrackerGrid.Invalidate; 2339 TrackerGrid.Invalidate;