Commit 9007586

Nick committed on
Adding clickability to oscilloscopes
commit 900758687241108c7c5397f5a09e73b2ff10276d parent aefa08c
3 changed files +22−7
ModifiedGBEmu.lpr +2−5
@@ -46,15 +46,12 @@ end;
46 {$endif} 46 {$endif}
47 47
48 begin 48 begin
49 {$IFDEF DEBUG} 49 //{$IFDEF DEBUG}
50 // Assuming your build mode sets -dDEBUG in Project Options/Other when defining -gh
51 // This avoids interference when running a production/default build without -gh
52
53 // Set up -gh output for the Leakview package: 50 // Set up -gh output for the Leakview package:
54 {if FileExists('heap.trc') then 51 {if FileExists('heap.trc') then
55 DeleteFile('heap.trc'); 52 DeleteFile('heap.trc');
56 SetHeapTraceOutput('heap.trc');} 53 SetHeapTraceOutput('heap.trc');}
57 {$ENDIF DEBUG} 54 //{$ENDIF DEBUG}
58 55
59 { Before the LCL starts, embed Pixelite so users dont have to install it. 56 { Before the LCL starts, embed Pixelite so users dont have to install it.
60 Unfortunately there isn't really a cross-platform way to do it, so here's an 57 Unfortunately there isn't really a cross-platform way to do it, so here's an
Modifiedtracker.lfm +6−2
@@ -1,7 +1,7 @@
1 object frmTracker: TfrmTracker 1 object frmTracker: TfrmTracker
2 Left = 800 2 Left = 199
3 Height = 1250 3 Height = 1250
4 Top = 202 4 Top = 245
5 Width = 2067 5 Width = 2067
6 Caption = 'hUGETracker' 6 Caption = 'hUGETracker'
7 ClientHeight = 1216 7 ClientHeight = 1216
@@ -1578,6 +1578,7 @@ object frmTracker: TfrmTracker
1578 Top = 1 1578 Top = 1
1579 Width = 345 1579 Width = 345
1580 ParentFont = False 1580 ParentFont = False
1581 OnClick = Duty1VisualizerClick
1581 OnPaint = Duty1VisualizerPaint 1582 OnPaint = Duty1VisualizerPaint
1582 end 1583 end
1583 object WaveVisualizer: TPaintBox 1584 object WaveVisualizer: TPaintBox
@@ -1586,6 +1587,7 @@ object frmTracker: TfrmTracker
1586 Top = 149 1587 Top = 149
1587 Width = 345 1588 Width = 345
1588 ParentFont = False 1589 ParentFont = False
1590 OnClick = Duty1VisualizerClick
1589 OnPaint = WaveVisualizerPaint 1591 OnPaint = WaveVisualizerPaint
1590 end 1592 end
1591 object Duty2Visualizer: TPaintBox 1593 object Duty2Visualizer: TPaintBox
@@ -1594,6 +1596,7 @@ object frmTracker: TfrmTracker
1594 Top = 1 1596 Top = 1
1595 Width = 345 1597 Width = 345
1596 ParentFont = False 1598 ParentFont = False
1599 OnClick = Duty1VisualizerClick
1597 OnPaint = Duty2VisualizerPaint 1600 OnPaint = Duty2VisualizerPaint
1598 end 1601 end
1599 object NoiseVisualizer: TPaintBox 1602 object NoiseVisualizer: TPaintBox
@@ -1602,6 +1605,7 @@ object frmTracker: TfrmTracker
1602 Top = 149 1605 Top = 149
1603 Width = 345 1606 Width = 345
1604 ParentFont = False 1607 ParentFont = False
1608 OnClick = Duty1VisualizerClick
1605 OnPaint = NoiseVisualizerPaint 1609 OnPaint = NoiseVisualizerPaint
1606 end 1610 end
1607 end 1611 end
Modifiedtracker.pas +14−0
@@ -198,6 +198,7 @@ type
198 TreeView1: TTreeView; 198 TreeView1: TTreeView;
199 TrackerGrid: TTrackerGrid; 199 TrackerGrid: TTrackerGrid;
200 procedure Button1Click(Sender: TObject); 200 procedure Button1Click(Sender: TObject);
201 procedure Duty1VisualizerClick(Sender: TObject);
201 procedure EditDelete1Execute(Sender: TObject); 202 procedure EditDelete1Execute(Sender: TObject);
202 procedure FormShow(Sender: TObject); 203 procedure FormShow(Sender: TObject);
203 procedure InstrumentComboBoxChange(Sender: TObject); 204 procedure InstrumentComboBoxChange(Sender: TObject);
@@ -1212,6 +1213,19 @@ begin
1212 PreviewC5; 1213 PreviewC5;
1213 end; 1214 end;
1214 1215
1216 procedure TfrmTracker.Duty1VisualizerClick(Sender: TObject);
1217 var
1218 Section: THeaderSection;
1219 begin
1220 if Sender = Duty1Visualizer then Section := HeaderControl1.Sections.Items[0]
1221 else if Sender = Duty2Visualizer then Section := HeaderControl1.Sections.Items[1]
1222 else if Sender = WaveVisualizer then Section := HeaderControl1.Sections.Items[2]
1223 else {if Sender = NoiseVisualizer then} Section := HeaderControl1.Sections.Items[3];
1224
1225 Section.ImageIndex := (Section.ImageIndex + 1) mod 2;
1226 snd[HeaderControl1.Sections.Items[0].OriginalIndex+1].ChannelOFF := Section.ImageIndex = 0;
1227 end;
1228
1215 procedure TfrmTracker.PasteActionExecute(Sender: TObject); 1229 procedure TfrmTracker.PasteActionExecute(Sender: TObject);
1216 begin 1230 begin
1217 PostMessage(Screen.ActiveControl.Handle, LM_PASTE, 0, 0); 1231 PostMessage(Screen.ActiveControl.Handle, LM_PASTE, 0, 0);