Changeset 468 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Dec 3, 2023, 11:28:08 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r462 r468 12 12 {$ENDIF} 13 13 Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase, 14 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, DrawDlg,Types,15 Forms, Menus, ExtCtrls, dateutils, Platform, ButtonB, ButtonC, EOTButton, Area,14 LCLIntf, LCLType, SysUtils, Classes, DrawDlg, Types, System.UITypes, 15 DateUtils, Platform, ButtonB, ButtonC, EOTButton, Area, 16 16 GraphicSet, MiniMap, IsoEngine, Wonders, TechTree, Enhance, Nego, CityType, 17 17 Diagram, CityScreen, Rates, Battle, NatStat, UnitStat, Draft, Select, MessgEx, 18 Help; 18 Help, 19 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus, Dpi.ExtCtrls, 20 Dpi.PixelPointer, Dpi.Common{$ELSE} 21 Graphics, Controls, Forms, Menus, ExtCtrls, PixelPointer{$ENDIF}; 19 22 20 23 const … … 642 645 643 646 uses 644 Directories, Log, PixelPointer,Sound, Registry, Global, KeyBindings, CmdList;647 Directories, Log, Sound, Registry, Global, KeyBindings, CmdList; 645 648 646 649 {$R *.lfm} … … 1809 1812 HGrStdUnits := LoadGraphicSet('StdUnits.png'); 1810 1813 SmallImp := TBitmap.Create; 1811 SmallImp.PixelFormat := pf24bit;1814 SmallImp.PixelFormat := TPixelFormat.pf24bit; 1812 1815 InitSmallImp; 1813 1816 SoundPreloadDone := []; … … 1869 1872 Brush.Color := $000000; 1870 1873 FillRect(Rect(0, 0, Panel.width, Panel.height)); 1871 Brush.Style := bsClear;1874 Brush.Style := TBrushStyle.bsClear; 1872 1875 end; 1873 1876 with TopBar.Canvas do … … 1875 1878 Brush.Color := $000000; 1876 1879 FillRect(Rect(0, 0, TopBar.width, TopBar.height)); 1877 Brush.Style := bsClear;1880 Brush.Style := TBrushStyle.bsClear; 1878 1881 end; 1879 1882 Invalidate; … … 2885 2888 Brush.Color := $000000; 2886 2889 FillRect(Rect(0, 0, Panel.width, Panel.height)); 2887 Brush.Style := bsClear;2890 Brush.Style := TBrushStyle.bsClear; 2888 2891 end; 2889 2892 with TopBar.Canvas do … … 2891 2894 Brush.Color := $000000; 2892 2895 FillRect(Rect(0, 0, TopBar.width, TopBar.height)); 2893 Brush.Style := bsClear;2896 Brush.Style := TBrushStyle.bsClear; 2894 2897 end; 2895 2898 FormResize(nil); // place mini map correctly according to its size … … 3634 3637 MiniMap := TMiniMap.Create; 3635 3638 Panel := TBitmap.Create; 3636 Panel.PixelFormat := pf24bit;3639 Panel.PixelFormat := TPixelFormat.pf24bit; 3637 3640 Panel.Canvas.Font.Assign(UniFont[ftSmall]); 3638 Panel.Canvas.Brush.Style := bsClear;3641 Panel.Canvas.Brush.Style := TBrushStyle.bsClear; 3639 3642 TopBar := TBitmap.Create; 3640 TopBar.PixelFormat := pf24bit;3643 TopBar.PixelFormat := TPixelFormat.pf24bit; 3641 3644 TopBar.Canvas.Font.Assign(UniFont[ftNormal]); 3642 TopBar.Canvas.Brush.Style := bsClear;3645 TopBar.Canvas.Brush.Style := TBrushStyle.bsClear; 3643 3646 Buffer := TBitmap.Create; 3644 Buffer.PixelFormat := pf24bit;3647 Buffer.PixelFormat := TPixelFormat.pf24bit; 3645 3648 if 2 * lxmax > 3 * xSizeBig then Buffer.width := 2 * lxmax 3646 3649 else Buffer.width := 3 * xSizeBig; … … 4806 4809 Brush.Color := $000000; 4807 4810 FillRect(Rect(0, 0, MapWidth, MapHeight)); 4808 Brush.Style := bsClear;4811 Brush.Style := TBrushStyle.bsClear; 4809 4812 OffscreenUser := self; 4810 4813 Exit; … … 4991 4994 xRightPanel + 2, PanelHeight, ClientWidth div 2); 4992 4995 4993 Brush.Style := bsClear;4996 Brush.Style := TBrushStyle.bsClear; 4994 4997 Pen.Color := $000000; 4995 4998 MoveTo(0, 0); … … 5216 5219 else if TroopLoc >= 0 then 5217 5220 begin 5218 Brush.Style := bsClear;5221 Brush.Style := TBrushStyle.bsClear; 5219 5222 if UnFocus >= 0 then 5220 5223 with MyUn^[UnFocus] do … … 5709 5712 begin 5710 5713 if Idle and (Me >= 0) and (GameMode <> cMovie) then 5711 if ( fsModal in Screen.ActiveForm.FormState) or5714 if (TFormStateType.fsModal in Screen.ActiveForm.FormState) or 5712 5715 (Screen.ActiveForm is TBufferedDrawDlg) and 5713 5716 (TBufferedDrawDlg(Screen.ActiveForm).WindowMode <> wmPersistent) then … … 5865 5868 if (MouseLoc < 0) or (MouseLoc >= G.lx * G.ly) then 5866 5869 Exit; 5867 if (Button = mbLeft) and not(ssShift in Shift) then5870 if (Button = TMouseButton.mbLeft) and not(ssShift in Shift) then 5868 5871 begin 5869 5872 DoCenter := True; … … 5992 5995 end; 5993 5996 end 5994 else if (ClientMode <> cEditMap) and (Button = mbRight) and5997 else if (ClientMode <> cEditMap) and (Button = TMouseButton.mbRight) and 5995 5998 not(ssShift in Shift) then 5996 5999 begin … … 6075 6078 end; 6076 6079 end 6077 else if (Button = mbMiddle) and (UnFocus >= 0) and6080 else if (Button = TMouseButton.mbMiddle) and (UnFocus >= 0) and 6078 6081 (MyModel[MyUn[UnFocus].mix].Kind in [mkSettler, mkSlaves]) then 6079 6082 begin … … 6088 6091 mEnhance.Click; 6089 6092 end 6090 else if (Button = mbLeft) and (ssShift in Shift) and6093 else if (Button = TMouseButton.mbLeft) and (ssShift in Shift) and 6091 6094 (MyMap[MouseLoc] and fTerrain <> fUNKNOWN) then 6092 6095 HelpOnTerrain(MouseLoc, wmPersistent) 6093 else if (ClientMode <= cContinue) and (Button = mbRight) and6096 else if (ClientMode <= cContinue) and (Button = TMouseButton.mbRight) and 6094 6097 (ssShift in Shift) and (UnFocus >= 0) and 6095 6098 (MyMap[MouseLoc] and (fUnit or fOwned) = fUnit) then … … 6867 6870 Exit; 6868 6871 6869 if Button = mbLeft then6872 if Button = TMouseButton.mbLeft then 6870 6873 begin 6871 6874 if (X >= xMini + 2) and (Y >= yMini + 2) and (X < xMini + 2 + 2 * G.lx) and … … 7160 7163 procedure TMainScreen.SetFullScreen(Active: Boolean); 7161 7164 begin 7162 if Active and (CurrentWindowState <> wsFullScreen) then begin7165 if Active and (CurrentWindowState <> TWindowState.wsFullScreen) then begin 7163 7166 PrevWindowState := WindowState; 7164 CurrentWindowState := wsFullScreen;7167 CurrentWindowState := TWindowState.wsFullScreen; 7165 7168 WindowState := CurrentWindowState; 7166 7169 {$IFDEF WINDOWS} … … 7169 7172 BorderIcons := []; 7170 7173 end else 7171 if not Active and (CurrentWindowState = wsFullScreen) then begin7172 if PrevWindowState = wsMaximized then begin7173 CurrentWindowState := wsMaximized;7174 if not Active and (CurrentWindowState = TWindowState.wsFullScreen) then begin 7175 if PrevWindowState = TWindowState.wsMaximized then begin 7176 CurrentWindowState := TWindowState.wsMaximized; 7174 7177 WindowState := CurrentWindowState; 7175 7178 end else begin 7176 CurrentWindowState := wsNormal;7179 CurrentWindowState := TWindowState.wsNormal; 7177 7180 WindowState := CurrentWindowState; 7178 WindowState := wsFullScreen;7181 WindowState := TWindowState.wsFullScreen; 7179 7182 WindowState := CurrentWindowState; 7180 7183 end; … … 7182 7185 BorderStyle := bsSizeable; 7183 7186 {$ENDIF} 7184 BorderIcons := [biSystemMenu, biMinimize, biMaximize]; 7187 BorderIcons := [TBorderIcon.biSystemMenu, TBorderIcon.biMinimize, 7188 TBorderIcon.biMaximize]; 7185 7189 end; 7186 7190 end; … … 7954 7958 MouseLoc := LocationOfScreenPixel(X, Y); 7955 7959 if MouseLoc <> BrushLoc then 7956 MapBoxMouseDown(nil, mbLeft, Shift, X, Y);7960 MapBoxMouseDown(nil, TMouseButton.mbLeft, Shift, X, Y); 7957 7961 end 7958 7962 (* else if Idle and (UnFocus>=0) then … … 8067 8071 TopBarHeight + MapHeight - overlap)); 8068 8072 end; 8069 Brush.Style := bsClear;8073 Brush.Style := TBrushStyle.bsClear; 8070 8074 end; 8071 8075 BitBltCanvas(Canvas, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap,
Note:
See TracChangeset
for help on using the changeset viewer.