Changeset 447 for trunk/Log.pas
- Timestamp:
- May 19, 2022, 10:39:34 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Log.pas
r442 r447 27 27 procedure mClearClick(Sender: TObject); 28 28 procedure mSlotClick(Sender: TObject); 29 procedure FormKeyDown(Sender: TObject; var Key: word; Shift: TShiftState);29 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 30 30 procedure Toggle(Sender: TObject); 31 31 procedure ListMouseDown(Sender: TObject; Button: TMouseButton; 32 32 Shift: TShiftState; X, Y: Integer); 33 procedure FormKeyUp(Sender: TObject; var Key: word; Shift: TShiftState);33 procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); 34 34 public 35 35 Host: TForm; 36 procedure Add(Level, Turn: Integer; Text: pchar);36 procedure Add(Level, Turn: Integer; Text: PChar); 37 37 private 38 38 MaxLevel: Integer; … … 61 61 begin 62 62 MaxLevel := TMenuItem(Sender).Tag; 63 TMenuItem(Sender).Checked := true;63 TMenuItem(Sender).Checked := True; 64 64 end; 65 65 66 procedure TLogDlg.Add(Level, Turn: Integer; Text: pchar);66 procedure TLogDlg.Add(Level, Turn: Integer; Text: PChar); 67 67 begin 68 68 if (MaxLevel > 0) and (Level <= MaxLevel) or (Level = 1 shl 16 + 1) and … … 89 89 var 90 90 X, Y: Integer; 91 s: string;91 S: string; 92 92 begin 93 93 for Y := 0 to 2 do 94 94 begin 95 s:= '| ';95 S := '| '; 96 96 for X := 0 to 2 do 97 97 if G.Difficulty[SlotNo[Y, X]] = 0 then 98 s := s+ 'SUP |'98 S := S + 'SUP |' 99 99 else if G.Difficulty[SlotNo[Y, X]] < 0 then 100 s := s+ '--- |'100 S := S + '--- |' 101 101 else 102 102 begin … … 104 104 begin // check multi control 105 105 if G.Difficulty[SlotNo[Y, X] + 3] >= 0 then 106 s := s+ Tribe[SlotNo[Y, X] + 3].TPhrase('SHORTNAME') + '+';106 S := S + Tribe[SlotNo[Y, X] + 3].TPhrase('SHORTNAME') + '+'; 107 107 if G.Difficulty[SlotNo[Y, X] + 6] >= 0 then 108 s := s+ Tribe[SlotNo[Y, X] + 6].TPhrase('SHORTNAME') + '+';108 S := S + Tribe[SlotNo[Y, X] + 6].TPhrase('SHORTNAME') + '+'; 109 109 end; 110 s := s+ Tribe[SlotNo[Y, X]].TPhrase('SHORTNAME') + ' | ';110 S := S + Tribe[SlotNo[Y, X]].TPhrase('SHORTNAME') + ' | '; 111 111 end; 112 List.Lines.Add( s);112 List.Lines.Add(S); 113 113 end; 114 114 PostMessage(List.Handle, WM_VSCROLL, SB_BOTTOM, 0); 115 115 end; 116 116 117 procedure TLogDlg.FormKeyDown(Sender: TObject; var Key: word;117 procedure TLogDlg.FormKeyDown(Sender: TObject; var Key: Word; 118 118 Shift: TShiftState); 119 119 begin … … 134 134 end; 135 135 136 procedure TLogDlg.FormKeyUp(Sender: TObject; var Key: word; Shift: TShiftState);136 procedure TLogDlg.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); 137 137 begin 138 138 if Host <> nil then
Note:
See TracChangeset
for help on using the changeset viewer.