@@ -16,6 +16,8 @@ type |
| 16 |
{ TfrmTracker } |
16 |
{ TfrmTracker } |
| 17 |
|
17 |
|
| 18 |
TfrmTracker = class(TForm) |
18 |
TfrmTracker = class(TForm) |
|
|
19 |
IncrementCurrentInstrumentAction: TAction; |
|
|
20 |
DecrementCurrentInstrumentAction: TAction; |
| 19 |
GotoGeneralAction: TAction; |
21 |
GotoGeneralAction: TAction; |
| 20 |
GotoPatternsAction: TAction; |
22 |
GotoPatternsAction: TAction; |
| 21 |
GotoInstrumentsAction: TAction; |
23 |
GotoInstrumentsAction: TAction; |
@@ -240,6 +242,7 @@ type |
| 240 |
TreeView1: TTreeView; |
242 |
TreeView1: TTreeView; |
| 241 |
TrackerGrid: TTrackerGrid; |
243 |
TrackerGrid: TTrackerGrid; |
| 242 |
procedure Button1Click(Sender: TObject); |
244 |
procedure Button1Click(Sender: TObject); |
|
|
245 |
procedure DecrementCurrentInstrumentActionExecute(Sender: TObject); |
| 243 |
procedure DeleteRowActionExecute(Sender: TObject); |
246 |
procedure DeleteRowActionExecute(Sender: TObject); |
| 244 |
procedure DeleteRowActionUpdate(Sender: TObject); |
247 |
procedure DeleteRowActionUpdate(Sender: TObject); |
| 245 |
procedure DeleteRowForAllActionExecute(Sender: TObject); |
248 |
procedure DeleteRowForAllActionExecute(Sender: TObject); |
@@ -255,6 +258,7 @@ type |
| 255 |
procedure GotoRoutinesActionExecute(Sender: TObject); |
258 |
procedure GotoRoutinesActionExecute(Sender: TObject); |
| 256 |
procedure GotoWavesActionExecute(Sender: TObject); |
259 |
procedure GotoWavesActionExecute(Sender: TObject); |
| 257 |
procedure HexWaveEditEditingDone(Sender: TObject); |
260 |
procedure HexWaveEditEditingDone(Sender: TObject); |
|
|
261 |
procedure IncrementCurrentInstrumentActionExecute(Sender: TObject); |
| 258 |
procedure InsertRowActionExecute(Sender: TObject); |
262 |
procedure InsertRowActionExecute(Sender: TObject); |
| 259 |
procedure InsertRowActionUpdate(Sender: TObject); |
263 |
procedure InsertRowActionUpdate(Sender: TObject); |
| 260 |
procedure InsertRowForAllActionExecute(Sender: TObject); |
264 |
procedure InsertRowForAllActionExecute(Sender: TObject); |
@@ -453,7 +457,7 @@ type |
| 453 |
procedure Panic; |
457 |
procedure Panic; |
| 454 |
public |
458 |
public |
| 455 |
procedure OnTrackerGridResize(Sender: TObject); |
459 |
procedure OnTrackerGridResize(Sender: TObject); |
| 456 |
|
460 |
procedure OnTrackerGridCursorOutOfBounds; |
| 457 |
end; |
461 |
end; |
| 458 |
|
462 |
|
| 459 |
var |
463 |
var |
@@ -777,6 +781,21 @@ begin |
| 777 |
(Section as THeaderSection).Width := TrackerGrid.ColumnWidth; |
781 |
(Section as THeaderSection).Width := TrackerGrid.ColumnWidth; |
| 778 |
end; |
782 |
end; |
| 779 |
|
783 |
|
|
|
784 |
procedure TfrmTracker.OnTrackerGridCursorOutOfBounds; |
|
|
785 |
begin |
|
|
786 |
if (TrackerGrid.Cursor.Y > High(TPattern)) |
|
|
787 |
and (OrderEditStringGrid.Row < OrderEditStringGrid.RowCount-1) then begin |
|
|
788 |
OrderEditStringGrid.Row := OrderEditStringGrid.Row+1; |
|
|
789 |
TrackerGrid.Cursor.Y := Low(TPattern); |
|
|
790 |
end; |
|
|
791 |
|
|
|
792 |
if (TrackerGrid.Cursor.Y < Low(TPattern)) |
|
|
793 |
and (OrderEditStringGrid.Row > 1) then begin |
|
|
794 |
OrderEditStringGrid.Row := OrderEditStringGrid.Row-1; |
|
|
795 |
TrackerGrid.Cursor.Y := High(TPattern); |
|
|
796 |
end; |
|
|
797 |
end; |
|
|
798 |
|
| 780 |
procedure TfrmTracker.LoadWave(Wave: Integer); |
799 |
procedure TfrmTracker.LoadWave(Wave: Integer); |
| 781 |
begin |
800 |
begin |
| 782 |
CurrentWave := @Song.Waves[Wave]; |
801 |
CurrentWave := @Song.Waves[Wave]; |
@@ -974,6 +993,7 @@ begin |
| 974 |
if Assigned(TrackerGrid) then TrackerGrid.Free; |
993 |
if Assigned(TrackerGrid) then TrackerGrid.Free; |
| 975 |
TrackerGrid := TTrackerGrid.Create(Self, ScrollBox1, Song.Patterns); |
994 |
TrackerGrid := TTrackerGrid.Create(Self, ScrollBox1, Song.Patterns); |
| 976 |
TrackerGrid.OnResize:=@OnTrackerGridResize; |
995 |
TrackerGrid.OnResize:=@OnTrackerGridResize; |
|
|
996 |
TrackerGrid.OnCursorOutOfBounds:=@OnTrackerGridCursorOutOfBounds; |
| 977 |
|
997 |
|
| 978 |
TrackerGrid.FontSize := OptionsFile.ReadInteger('hUGETracker', 'fontsize', 12); |
998 |
TrackerGrid.FontSize := OptionsFile.ReadInteger('hUGETracker', 'fontsize', 12); |
| 979 |
ScopesOn := OptionsFile.ReadBool('hUGETracker', 'ScopesOn', True); |
999 |
ScopesOn := OptionsFile.ReadBool('hUGETracker', 'ScopesOn', True); |
@@ -1574,6 +1594,11 @@ begin |
| 1574 |
end; |
1594 |
end; |
| 1575 |
end; |
1595 |
end; |
| 1576 |
|
1596 |
|
|
|
1597 |
procedure TfrmTracker.IncrementCurrentInstrumentActionExecute(Sender: TObject); |
|
|
1598 |
begin |
|
|
1599 |
InstrumentComboBox.ItemIndex := EnsureRange(InstrumentComboBox.ItemIndex+1, 0, InstrumentComboBox.Items.Count-1); |
|
|
1600 |
end; |
|
|
1601 |
|
| 1577 |
procedure TfrmTracker.InsertRowActionExecute(Sender: TObject); |
1602 |
procedure TfrmTracker.InsertRowActionExecute(Sender: TObject); |
| 1578 |
begin |
1603 |
begin |
| 1579 |
TrackerGrid.InsertRowInPatternAtCursor(TrackerGrid.Cursor.X); |
1604 |
TrackerGrid.InsertRowInPatternAtCursor(TrackerGrid.Cursor.X); |
@@ -1669,6 +1694,11 @@ begin |
| 1669 |
PreviewC5; |
1694 |
PreviewC5; |
| 1670 |
end; |
1695 |
end; |
| 1671 |
|
1696 |
|
|
|
1697 |
procedure TfrmTracker.DecrementCurrentInstrumentActionExecute(Sender: TObject); |
|
|
1698 |
begin |
|
|
1699 |
InstrumentComboBox.ItemIndex := EnsureRange(InstrumentComboBox.ItemIndex-1, 0, InstrumentComboBox.Items.Count-1); |
|
|
1700 |
end; |
|
|
1701 |
|
| 1672 |
procedure TfrmTracker.DeleteRowActionExecute(Sender: TObject); |
1702 |
procedure TfrmTracker.DeleteRowActionExecute(Sender: TObject); |
| 1673 |
begin |
1703 |
begin |
| 1674 |
TrackerGrid.DeleteRowInPatternAtCursor(TrackerGrid.Cursor.X); |
1704 |
TrackerGrid.DeleteRowInPatternAtCursor(TrackerGrid.Cursor.X); |