- Timestamp:
- May 11, 2020, 11:15:35 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Back.pas
r219 r220 65 65 begin 66 66 if FullScreen then begin 67 WindowState := ws Maximized;67 WindowState := wsFullScreen; 68 68 if not Assigned(Img) then begin 69 69 FileName := GetGraphicsDir + DirectorySeparator + 'Background.png'; -
trunk/LocalPlayer/TechTree.pas
r205 r220 9 9 10 10 type 11 12 { TTechTreeDlg } 13 11 14 TTechTreeDlg = class(TDrawDlg) 12 15 CloseBtn: TButtonB; 13 16 procedure FormCreate(Sender: TObject); 17 procedure FormDestroy(Sender: TObject); 14 18 procedure FormPaint(Sender: TObject); 15 19 procedure FormShow(Sender: TObject); … … 24 28 xOffset, yOffset, xDown, yDown: Integer; 25 29 Image: TBitmap; 26 dragging: boolean;30 Dragging: Boolean; 27 31 end; 28 32 … … 72 76 InitButtons; 73 77 Image := nil; 78 end; 79 80 procedure TTechTreeDlg.FormDestroy(Sender: TObject); 81 begin 82 FreeAndNil(Image); 74 83 end; 75 84 … … 121 130 X, Y, ad: Integer; 122 131 s: string; 132 NewWidth: Integer; 133 NewHeight: Integer; 123 134 const 124 135 TransparentColor = $7F007F; … … 164 175 165 176 // fit window to image, center image in window, center window to screen 166 width := min(Screen.width - 40, Image.width + LeftBorder + RightBorder + 2 * 167 BlackBorder); 168 height := min(Screen.height - 40, Image.height + TopBorder + BottomBorder + 2 169 * BlackBorder); 170 Left := (Screen.width - width) div 2; 171 Top := (Screen.height - height) div 2; 177 NewWidth := Min(Screen.Width - 40, Image.Width + LeftBorder + RightBorder + 2 * BlackBorder); 178 NewHeight := Min(Screen.Height - 40, Image.Height + TopBorder + BottomBorder + 2 * BlackBorder); 179 BoundsRect := Bounds((Screen.Width - NewWidth) div 2, 180 (Screen.Height - NewHeight) div 2, 181 NewWidth, NewHeight); 172 182 CloseBtn.Left := width - CloseBtn.width - BlackBorder - 8; 173 183 CloseBtn.Top := BlackBorder + 8; 174 xOffset := (ClientWidth - Image. width + LeftBorder - RightBorder) div 2 -184 xOffset := (ClientWidth - Image.Width + LeftBorder - RightBorder) div 2 - 175 185 BlackBorder; 176 yOffset := ClientHeight - 2 * BlackBorder - Image. height - BottomBorder;186 yOffset := ClientHeight - 2 * BlackBorder - Image.Height - BottomBorder; 177 187 end; 178 188 -
trunk/LocalPlayer/Term.pas
r219 r220 7795 7795 begin 7796 7796 if FullScreen then begin 7797 WindowState := ws Maximized;7797 WindowState := wsFullScreen; 7798 7798 BorderStyle := bsNone; 7799 7799 BorderIcons := [];
Note:
See TracChangeset
for help on using the changeset viewer.