@@ -113,8 +113,6 @@ type |
| 113 |
Performed: TUndoDeque; |
113 |
Performed: TUndoDeque; |
| 114 |
Recall: TRedoStack; |
114 |
Recall: TRedoStack; |
| 115 |
|
115 |
|
| 116 |
DigitInputting: Boolean; |
|
|
| 117 |
|
|
|
| 118 |
FHighlightedRow: Integer; |
116 |
FHighlightedRow: Integer; |
| 119 |
public |
117 |
public |
| 120 |
Cursor, Other: TSelectionPos; |
118 |
Cursor, Other: TSelectionPos; |
@@ -290,7 +288,6 @@ begin |
| 290 |
if Button = mbLeft then |
288 |
if Button = mbLeft then |
| 291 |
MouseButtonDown := True; |
289 |
MouseButtonDown := True; |
| 292 |
Selecting := False; |
290 |
Selecting := False; |
| 293 |
DigitInputting := False; |
|
|
| 294 |
|
291 |
|
| 295 |
if not (csDesigning in ComponentState) and CanFocus then |
292 |
if not (csDesigning in ComponentState) and CanFocus then |
| 296 |
SetFocus; |
293 |
SetFocus; |
@@ -324,7 +321,6 @@ begin |
| 324 |
NormalizeCursors; |
321 |
NormalizeCursors; |
| 325 |
|
322 |
|
| 326 |
MouseButtonDown := False; |
323 |
MouseButtonDown := False; |
| 327 |
DigitInputting := False; |
|
|
| 328 |
end; |
324 |
end; |
| 329 |
|
325 |
|
| 330 |
procedure TTrackerGrid.DblClick; |
326 |
procedure TTrackerGrid.DblClick; |
@@ -343,7 +339,6 @@ begin |
| 343 |
NormalizeCursors; |
339 |
NormalizeCursors; |
| 344 |
|
340 |
|
| 345 |
MouseButtonDown := False; |
341 |
MouseButtonDown := False; |
| 346 |
DigitInputting := False; |
|
|
| 347 |
|
342 |
|
| 348 |
Invalidate; |
343 |
Invalidate; |
| 349 |
end; |
344 |
end; |
@@ -385,28 +380,24 @@ begin |
| 385 |
EraseSelection; |
380 |
EraseSelection; |
| 386 |
end; |
381 |
end; |
| 387 |
VK_UP: begin |
382 |
VK_UP: begin |
| 388 |
Cursor.Y -= 1; |
383 |
Dec(Cursor.Y); |
| 389 |
DigitInputting := False; |
|
|
| 390 |
end; |
384 |
end; |
| 391 |
VK_DOWN: begin |
385 |
VK_DOWN: begin |
| 392 |
Cursor.Y += 1; |
386 |
Inc(Cursor.Y); |
| 393 |
DigitInputting := False; |
|
|
| 394 |
end; |
387 |
end; |
| 395 |
VK_LEFT: begin |
388 |
VK_LEFT: begin |
| 396 |
if ssCtrl in Shift then |
389 |
if ssCtrl in Shift then |
| 397 |
Cursor.X -= 1 |
390 |
Dec(Cursor.X) |
| 398 |
else if Cursor.SelectedPart > Low(TCellPart) then begin |
391 |
else if Cursor.SelectedPart > Low(TCellPart) then begin |
| 399 |
Cursor.SelectedPart := Pred(Cursor.SelectedPart); |
392 |
Cursor.SelectedPart := Pred(Cursor.SelectedPart); |
| 400 |
end; |
393 |
end; |
| 401 |
DigitInputting := False; |
|
|
| 402 |
end; |
394 |
end; |
| 403 |
VK_RIGHT: begin |
395 |
VK_RIGHT: begin |
| 404 |
if ssCtrl in Shift then |
396 |
if ssCtrl in Shift then |
| 405 |
Cursor.X += 1 |
397 |
Inc(Cursor.X) |
| 406 |
else if Cursor.SelectedPart < High(TCellPart) then begin |
398 |
else if Cursor.SelectedPart < High(TCellPart) then begin |
| 407 |
Cursor.SelectedPart := Succ(Cursor.SelectedPart); |
399 |
Cursor.SelectedPart := Succ(Cursor.SelectedPart); |
| 408 |
end; |
400 |
end; |
| 409 |
DigitInputting := False; |
|
|
| 410 |
end; |
401 |
end; |
| 411 |
else begin |
402 |
else begin |
| 412 |
if (not (ssCtrl in Shift)) and (not (ssShift in Shift)) then |
403 |
if (not (ssCtrl in Shift)) and (not (ssShift in Shift)) then |
@@ -698,7 +689,7 @@ var |
| 698 |
begin |
689 |
begin |
| 699 |
with Patterns[Cursor.X]^[Cursor.Y] do |
690 |
with Patterns[Cursor.X]^[Cursor.Y] do |
| 700 |
if Key = VK_DELETE then Instrument := 0 |
691 |
if Key = VK_DELETE then Instrument := 0 |
| 701 |
else if KeycodeToHexNumber(Key, Temp) and (Temp <= 9) then |
692 |
else if KeycodeToHexNumber(Key, Temp) and InRange(Temp, 0, 9) then |
| 702 |
Instrument := ((Instrument mod 10) * 10) + Temp; |
693 |
Instrument := ((Instrument mod 10) * 10) + Temp; |
| 703 |
|
694 |
|
| 704 |
Invalidate; |
695 |
Invalidate; |
@@ -732,17 +723,8 @@ begin |
| 732 |
EffectCode := 0; |
723 |
EffectCode := 0; |
| 733 |
EffectParams.Value := 0; |
724 |
EffectParams.Value := 0; |
| 734 |
end |
725 |
end |
| 735 |
else if not DigitInputting then begin |
726 |
else if KeycodeToHexNumber(Key, Temp) then |
| 736 |
if KeycodeToHexNumber(Key, Temp) then begin |
727 |
EffectParams.Value := ((EffectParams.Value mod $10) * $10) + Temp; |
| 737 |
EffectParams.Param2 := EffectParams.Param1; |
|
|
| 738 |
EffectParams.Param1 := Temp; |
|
|
| 739 |
DigitInputting := True; |
|
|
| 740 |
end; |
|
|
| 741 |
end |
|
|
| 742 |
else if KeycodeToHexNumber(Key, Temp) then begin |
|
|
| 743 |
EffectParams.Param2 := Temp; |
|
|
| 744 |
DigitInputting := False; |
|
|
| 745 |
end; |
|
|
| 746 |
|
728 |
|
| 747 |
Invalidate; |
729 |
Invalidate; |
| 748 |
SaveUndoState; |
730 |
SaveUndoState; |