Changeset 533 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Apr 12, 2024, 8:58:58 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r531 r533 245 245 procedure FormResize(Sender: TObject); 246 246 procedure PanelBtnClick(Sender: TObject); 247 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);248 247 procedure Toggle(Sender: TObject); 249 248 procedure PanelBoxMouseMove(Sender: TObject; Shift: TShiftState; … … 260 259 Shift: TShiftState; X, Y: Integer); 261 260 procedure FormPaint(Sender: TObject); 261 procedure FormClose(Sender: TObject; var Action: TCloseAction); 262 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); 263 procedure FormShow(Sender: TObject); 262 264 procedure mRepClicked(Sender: TObject); 263 265 procedure mLogClick(Sender: TObject); 264 procedure FormClose(Sender: TObject; var Action: TCloseAction);265 procedure FormShow(Sender: TObject);266 266 procedure Radio(Sender: TObject); 267 267 procedure mManipClick(Sender: TObject); … … 329 329 NoMap: TIsoMap; 330 330 NoMapPanel: TIsoMap; 331 LastResizeWidth: Integer; 332 LastResizeHeight: Integer; 333 LastWindowState: TWindowState; 331 334 // Forms 332 335 FWondersDlg: TWondersDlg; … … 2815 2818 Brush.Style := TBrushStyle.bsClear; 2816 2819 end; 2817 FormResize(nil); // place mini map correctly according to its size2818 2820 Show; 2819 2821 Update; … … 4197 4199 MiniFrame, MaxMapWidth: Integer; 4198 4200 begin 4201 if (LastResizeWidth = Width) and (LastResizeHeight = Height) and 4202 (LastWindowState = WindowState) then Exit 4203 else begin 4204 LastResizeWidth := Width; 4205 LastResizeHeight := Height; 4206 LastWindowState := WindowState; 4207 end; 4208 4199 4209 SmallScreen := Width < 1024; 4200 4210 with MainMap do begin … … 7091 7101 if not Active and (CurrentWindowState = TWindowState.wsFullScreen) then begin 7092 7102 if PrevWindowState = TWindowState.wsMaximized then begin 7093 CurrentWindowState := TWindowState.ws Maximized;7103 CurrentWindowState := TWindowState.wsNormal; 7094 7104 WindowState := CurrentWindowState; 7095 7105 end else begin 7096 CurrentWindowState := TWindowState.wsNormal;7106 CurrentWindowState := PrevWindowState; 7097 7107 WindowState := CurrentWindowState; 7098 7108 WindowState := TWindowState.wsFullScreen; … … 8106 8116 procedure TMainScreen.FormShow(Sender: TObject); 8107 8117 begin 8118 if FullScreen then BoundsRect := Bounds(0, 0, Screen.Width, Screen.Height) 8119 else BoundsRect := TermBounds; 8108 8120 SetFullScreen(FullScreen); 8121 FormResize(nil); // place mini map correctly according to its size 8109 8122 Timer1.Enabled := True; 8110 8123 end; … … 8112 8125 procedure TMainScreen.FormClose(Sender: TObject; var Action: TCloseAction); 8113 8126 begin 8127 TermBounds := BoundsRect; 8114 8128 Timer1.Enabled := False; 8115 8129 end;
Note:
See TracChangeset
for help on using the changeset viewer.