Changeset 447 for trunk/Direct.pas
- Timestamp:
- May 19, 2022, 10:39:34 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Direct.pas
r423 r447 29 29 Gone: Boolean; 30 30 Quick: Boolean; 31 procedure SetInfo( x: string);32 procedure SetState( x: integer);31 procedure SetInfo(X: string); 32 procedure SetState(X: Integer); 33 33 procedure OnGo(var Msg: TMessage); message WM_GO; 34 34 procedure OnChangeClient(var Msg: TMessage); message WM_CHANGECLIENT; … … 57 57 // hMem: Cardinal; 58 58 // p: pointer; 59 s: string;59 S: string; 60 60 Begin 61 61 case ID of … … 72 72 if visible then 73 73 begin 74 s:= Format(Phrases.Lookup('BUSY_MOD'), [Brains[Index].Name]);75 while BiColorTextWidth(Canvas, s) + 64 > ClientWidth do76 Delete( s, Length(s), 1);77 SetInfo( s);74 S := Format(Phrases.Lookup('BUSY_MOD'), [Brains[Index].Name]); 75 while BiColorTextWidth(Canvas, S) + 64 > ClientWidth do 76 Delete(S, Length(S), 1); 77 SetInfo(S); 78 78 end; 79 79 ntCreateWorld: … … 111 111 hMem := GlobalAlloc(GMEM_MOVEABLE or GMEM_DDESHARE, 112 112 Length(NotifyMessage)); 113 p:= GlobalLock(hMem);114 if p<> nil then115 move(NotifyMessage[1], p^, Length(NotifyMessage));113 P := GlobalLock(hMem); 114 if P <> nil then 115 Move(NotifyMessage[1], P^, Length(NotifyMessage)); 116 116 GlobalUnlock(hMem); 117 117 SetClipboardData(CF_TEXT, hMem); … … 198 198 begin 199 199 PostMessage(Handle, WM_GO, 0, 0); 200 Gone := true;200 Gone := True; 201 201 end; 202 202 end; … … 209 209 procedure TDirectDlg.OnGo(var Msg: TMessage); 210 210 var 211 i: integer;212 s: string;211 I: Integer; 212 S: string; 213 213 FileName: string; 214 214 begin … … 220 220 Exit; 221 221 end; 222 Quick := false;222 Quick := False; 223 223 if ParamCount > 0 then 224 224 begin 225 s:= ParamStr(1);226 if ( s[1] = '-') {$IFDEF WINDOWS}or (s[1] = '/'){$ENDIF} then225 S := ParamStr(1); 226 if (S[1] = '-') {$IFDEF WINDOWS}or (S[1] = '/'){$ENDIF} then 227 227 begin // special mode 228 Delete( s, 1, 1);229 for i := 1 to Length(s) do230 if s[i] in ['a' .. 'z'] then231 dec(s[i], 32);232 if s= 'MAN' then228 Delete(S, 1, 1); 229 for I := 1 to Length(S) do 230 if S[I] in ['a' .. 'z'] then 231 Dec(S[I], 32); 232 if S = 'MAN' then 233 233 begin 234 Quick := true;234 Quick := True; 235 235 DirectHelp(cHelpOnly); 236 236 Close; … … 242 242 Quick := True; 243 243 if not LoadGame(ExtractFilePath(ParamStr(1)), ExtractFileName(ParamStr(1) 244 ), -1, false) then begin244 ), -1, False) then begin 245 245 SimpleMessage(Phrases.Lookup('LOADERR')); 246 246 Close; … … 297 297 end; 298 298 299 procedure TDirectDlg.SetInfo( x: string);300 begin 301 Info := x;299 procedure TDirectDlg.SetInfo(X: string); 300 begin 301 Info := X; 302 302 Invalidate; 303 303 Update; … … 307 307 end; 308 308 309 procedure TDirectDlg.SetState( x: integer);310 begin 311 if ( x< 0) <> (State < 0) then begin312 State := x;309 procedure TDirectDlg.SetState(X: Integer); 310 begin 311 if (X < 0) <> (State < 0) then begin 312 State := X; 313 313 Invalidate; 314 314 Update; 315 315 end 316 else if x<> State then begin317 State := x;316 else if X <> State then begin 317 State := X; 318 318 PaintProgressBar(Canvas, 6, ClientWidth div 2 - 64, 40, State, 128 - State, 319 319 128, MainTexture);
Note:
See TracChangeset
for help on using the changeset viewer.