Skip to content

Commit

Permalink
Implement the MouseWheel as RIT
Browse files Browse the repository at this point in the history
  • Loading branch information
f6fvy committed Nov 2, 2018
1 parent 7095a0e commit 0f5786c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
8 changes: 5 additions & 3 deletions Main.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ object MainForm: TMainForm
OnKeyDown = FormKeyDown
OnKeyPress = FormKeyPress
OnKeyUp = FormKeyUp
OnMouseWheelDown = FormMouseWheelDown
OnMouseWheelUp = FormMouseWheelUp
Position = poDesktopCenter
LCLVersion = '1.8.2.0'
object Bevel1: TBevel
Expand Down Expand Up @@ -357,7 +359,7 @@ object MainForm: TMainForm
Height = 40
Top = 58
Width = 359
Caption = 'Morse Runner 1.68.3+'
Caption = 'Morse Runner 1.68.4+'
Font.CharSet = ANSI_CHARSET
Font.Color = 12369084
Font.Height = -35
Expand All @@ -371,7 +373,7 @@ object MainForm: TMainForm
Height = 40
Top = 54
Width = 359
Caption = 'Morse Runner 1.68.3+'
Caption = 'Morse Runner 1.68.4+'
Font.CharSet = ANSI_CHARSET
Font.Color = clAqua
Font.Height = -35
Expand All @@ -385,7 +387,7 @@ object MainForm: TMainForm
Height = 40
Top = 53
Width = 359
Caption = 'Morse Runner 1.68.3+'
Caption = 'Morse Runner 1.68.4+'
Font.CharSet = ANSI_CHARSET
Font.Color = clGreen
Font.Height = -35
Expand Down
24 changes: 21 additions & 3 deletions Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface
Buttons, SndCustm, SndOut, Contest, Ini, MorseKey, CallLst,
VolmSldr, VolumCtl, StdCtrls, Station, Menus, ExtCtrls, Log, MAth,
ComCtrls, Spin, SndTypes, ToolWin, ImgList, LazFileUtils, Crc32,
WavFile, IniFiles, Windows, UdpHandler;
WavFile, IniFiles, Windows, UdpHandler, Types;

const
WM_TBDOWN = WM_USER+1;
Expand Down Expand Up @@ -214,6 +214,10 @@ TMainForm = class(TForm)
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Edit1Enter(Sender: TObject);
procedure FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: Boolean);
procedure FormMouseWheelUp(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: Boolean);
procedure N40dB1Click(Sender: TObject);
procedure N50dB1Click(Sender: TObject);
procedure SendClick(Sender: TObject);
Expand Down Expand Up @@ -550,6 +554,20 @@ procedure TMainForm.Edit1Enter(Sender: TObject);
begin Edit1.SelStart := P-1; Edit1.SelLength := 1; end;
end;

procedure TMainForm.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: Boolean);
begin
if GetKeyState(VK_CONTROL) >= 0 then IncRit(1)
else if RunMode <> rmHst then SetBw(ComboBox2.ItemIndex-1);
end;

procedure TMainForm.FormMouseWheelUp(Sender: TObject; Shift: TShiftState;
MousePos: TPoint; var Handled: Boolean);
begin
if GetKeyState(VK_CONTROL) >= 0 then IncRit(-1)
else if RunMode <> rmHst then SetBw(ComboBox2.ItemIndex+1);
end;

procedure TMainForm.N40dB1Click(Sender: TObject);
begin

Expand Down Expand Up @@ -707,8 +725,8 @@ procedure TMainForm.About1Click(Sender: TObject);
'Copyright © 2004-2006 Alex Shovkoplyas, VE3NEA'#13#13 +
'[email protected]'#13;
begin
Application.MessageBox(Msg, 'Morse Runner 1.68.1+', MB_OK or MB_ICONINFORMATION);
end;
Application.MessageBox(Msg, 'Morse Runner 1.68.4+', MB_OK or MB_ICONINFORMATION);
end;


procedure TMainForm.Readme1Click(Sender: TObject);
Expand Down
3 changes: 3 additions & 0 deletions Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ command.

VERSION HISTORY

1.68.4+
- The mouse wheel now acts as RIT. (F6FVY)

1.68.3+
- After a CQ, if nothing is caught or if what you caught is wrong, you can use
F7 ('?') to instruct the callers to call again. (F6FVY)
Expand Down

0 comments on commit 0f5786c

Please sign in to comment.