Commit f5503c9

Nick committed on
Add hotkey suggestions for octave increase/decrease, and tab wraparound in pattern grid
commit f5503c9e6d55d262cf801f868a98e46098c745bc parent eccba43
4 changed files +36−4
ModifiedhUGEDriver +1−1
@@ -1 +1 @@
1 Subproject commit 3d2f75b77a0a3e78127d09fe41098b0883be2821 1 Subproject commit bc5e9b0da4cb99968a131fb1c5cd712a4087350d
Modifiedtracker.lfm +12−2
@@ -1,7 +1,7 @@
1 object frmTracker: TfrmTracker 1 object frmTracker: TfrmTracker
2 Left = 1675 2 Left = 1698
3 Height = 653 3 Height = 653
4 Top = 120 4 Top = 248
5 Width = 1232 5 Width = 1232
6 AllowDropFiles = True 6 AllowDropFiles = True
7 Caption = 'hUGETracker' 7 Caption = 'hUGETracker'
@@ -5377,6 +5377,16 @@ object frmTracker: TfrmTracker
5377 OnExecute = DecrementCurrentInstrumentActionExecute 5377 OnExecute = DecrementCurrentInstrumentActionExecute
5378 ShortCut = 8381 5378 ShortCut = 8381
5379 end 5379 end
5380 object IncreaseOctaveAction: TAction
5381 Caption = 'IncreaseOctaveAction'
5382 OnExecute = IncreaseOctaveActionExecute
5383 ShortCut = 106
5384 end
5385 object DecreaseOctaveAction: TAction
5386 Caption = 'DecreaseOctaveAction'
5387 OnExecute = DecreaseOctaveActionExecute
5388 ShortCut = 111
5389 end
5380 end 5390 end
5381 object GBDKCSaveDialog: TSaveDialog 5391 object GBDKCSaveDialog: TSaveDialog
5382 Filter = 'GBDK C File|*.c' 5392 Filter = 'GBDK C File|*.c'
Modifiedtracker.pas +16−0
@@ -25,6 +25,8 @@ type
25 { TfrmTracker } 25 { TfrmTracker }
26 26
27 TfrmTracker = class(TForm) 27 TfrmTracker = class(TForm)
28 DecreaseOctaveAction: TAction;
29 IncreaseOctaveAction: TAction;
28 IncrementCurrentInstrumentAction: TAction; 30 IncrementCurrentInstrumentAction: TAction;
29 DecrementCurrentInstrumentAction: TAction; 31 DecrementCurrentInstrumentAction: TAction;
30 GotoGeneralAction: TAction; 32 GotoGeneralAction: TAction;
@@ -259,6 +261,7 @@ type
259 TrackerGrid: TTrackerGrid; 261 TrackerGrid: TTrackerGrid;
260 procedure Button1Click(Sender: TObject); 262 procedure Button1Click(Sender: TObject);
261 procedure DebugButtonClick(Sender: TObject); 263 procedure DebugButtonClick(Sender: TObject);
264 procedure DecreaseOctaveActionExecute(Sender: TObject);
262 procedure DecrementCurrentInstrumentActionExecute(Sender: TObject); 265 procedure DecrementCurrentInstrumentActionExecute(Sender: TObject);
263 procedure DeleteRowActionExecute(Sender: TObject); 266 procedure DeleteRowActionExecute(Sender: TObject);
264 procedure DeleteRowActionUpdate(Sender: TObject); 267 procedure DeleteRowActionUpdate(Sender: TObject);
@@ -276,6 +279,7 @@ type
276 procedure GotoRoutinesActionExecute(Sender: TObject); 279 procedure GotoRoutinesActionExecute(Sender: TObject);
277 procedure GotoWavesActionExecute(Sender: TObject); 280 procedure GotoWavesActionExecute(Sender: TObject);
278 procedure HexWaveEditEditingDone(Sender: TObject); 281 procedure HexWaveEditEditingDone(Sender: TObject);
282 procedure IncreaseOctaveActionExecute(Sender: TObject);
279 procedure IncrementCurrentInstrumentActionExecute(Sender: TObject); 283 procedure IncrementCurrentInstrumentActionExecute(Sender: TObject);
280 procedure InsertRowActionExecute(Sender: TObject); 284 procedure InsertRowActionExecute(Sender: TObject);
281 procedure InsertRowActionUpdate(Sender: TObject); 285 procedure InsertRowActionUpdate(Sender: TObject);
@@ -1751,6 +1755,12 @@ begin
1751 end; 1755 end;
1752 end; 1756 end;
1753 1757
1758 procedure TfrmTracker.IncreaseOctaveActionExecute(Sender: TObject);
1759 begin
1760 OctaveSpinEdit.Value := OctaveSpinEdit.Value + 1;
1761 TrackerGrid.SelectedOctave := OctaveSpinEdit.Value;
1762 end;
1763
1754 procedure TfrmTracker.IncrementCurrentInstrumentActionExecute(Sender: TObject); 1764 procedure TfrmTracker.IncrementCurrentInstrumentActionExecute(Sender: TObject);
1755 begin 1765 begin
1756 InstrumentComboBox.ItemIndex := EnsureRange(InstrumentComboBox.ItemIndex+1, 0, InstrumentComboBox.Items.Count-1); 1766 InstrumentComboBox.ItemIndex := EnsureRange(InstrumentComboBox.ItemIndex+1, 0, InstrumentComboBox.Items.Count-1);
@@ -1961,6 +1971,12 @@ begin
1961 UpdateUIAfterLoad('Yeah!'); 1971 UpdateUIAfterLoad('Yeah!');
1962 end; 1972 end;
1963 1973
1974 procedure TfrmTracker.DecreaseOctaveActionExecute(Sender: TObject);
1975 begin
1976 OctaveSpinEdit.Value := OctaveSpinEdit.Value - 1;
1977 TrackerGrid.SelectedOctave := OctaveSpinEdit.Value;
1978 end;
1979
1964 procedure TfrmTracker.DecrementCurrentInstrumentActionExecute(Sender: TObject); 1980 procedure TfrmTracker.DecrementCurrentInstrumentActionExecute(Sender: TObject);
1965 begin 1981 begin
1966 InstrumentComboBox.ItemIndex := EnsureRange(InstrumentComboBox.ItemIndex-1, 0, InstrumentComboBox.Items.Count-1); 1982 InstrumentComboBox.ItemIndex := EnsureRange(InstrumentComboBox.ItemIndex-1, 0, InstrumentComboBox.Items.Count-1);
Modifiedtrackergrid.pas +7−1
@@ -452,12 +452,18 @@ begin
452 VK_HOME: Cursor.Y := Low(TPattern); 452 VK_HOME: Cursor.Y := Low(TPattern);
453 VK_END: Cursor.Y := High(TPattern); 453 VK_END: Cursor.Y := High(TPattern);
454 VK_TAB: begin 454 VK_TAB: begin
455 if ssShift in Shift then begin 455 if ssShift in Shift then begin
456 Dec(Cursor.X); 456 Dec(Cursor.X);
457 Exclude(Shift, ssShift) 457 Exclude(Shift, ssShift)
458 end 458 end
459 else 459 else
460 Inc(Cursor.X); 460 Inc(Cursor.X);
461
462 if Cursor.X > High(TPatternGrid) then
463 Cursor.X := Low(TPatternGrid);
464 if Cursor.X < Low(TPatternGrid) then
465 Cursor.X := High(TPatternGrid);
466
461 Key := 0; 467 Key := 0;
462 end 468 end
463 else 469 else