- Timestamp:
- Apr 28, 2022, 10:40:37 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityScreen.pas
r423 r431 96 96 CloseAction: TCityCloseAction; 97 97 procedure OffscreenPaint; override; 98 procedure ShowNewContent(NewMode ,Loc: integer; ShowEvent: cardinal);98 procedure ShowNewContent(NewMode: TWindowMode; Loc: integer; ShowEvent: cardinal); 99 99 procedure Reset; 100 100 procedure CheckAge; … … 1109 1109 end; 1110 1110 1111 procedure TCityDlg.ShowNewContent(NewMode ,Loc: integer; ShowEvent: cardinal);1111 procedure TCityDlg.ShowNewContent(NewMode: TWindowMode; Loc: integer; ShowEvent: cardinal); 1112 1112 begin 1113 1113 if MyMap[Loc] and fOwned <> 0 then … … 1204 1204 if iix >= 0 then 1205 1205 if ssShift in Shift then 1206 HelpDlg.ShowNewContent( FWindowMode or wmPersistent, hkImp, iix)1206 HelpDlg.ShowNewContent(WindowModePersistent(FWindowMode), hkImp, iix) 1207 1207 else if (ClientMode < scContact) then 1208 1208 with MessgExDlg do … … 1335 1335 Loc1 := dLoc(cLoc, dx, dy); 1336 1336 if (Loc1 >= 0) and (Loc1 < G.lx * G.ly) then 1337 HelpOnTerrain(Loc1, FWindowMode or wmPersistent)1337 HelpOnTerrain(Loc1, WindowModePersistent(FWindowMode)) 1338 1338 end 1339 1339 else if (ClientMode < scContact) and (cGov <> gAnarchy) and -
trunk/LocalPlayer/CityType.pas
r352 r431 24 24 procedure DeleteBtnClick(Sender: TObject); 25 25 public 26 procedure ShowNewContent(NewMode: integer);26 procedure ShowNewContent(NewMode: TWindowMode); 27 27 protected 28 28 procedure OffscreenPaint; override; … … 226 226 end; 227 227 228 procedure TCityTypeDlg.ShowNewContent(NewMode: integer);228 procedure TCityTypeDlg.ShowNewContent(NewMode: TWindowMode); 229 229 begin 230 230 inherited ShowNewContent(NewMode); … … 246 246 begin 247 247 if ssShift in Shift then 248 HelpDlg.ShowNewContent( FWindowMode or wmPersistent, hkImp,248 HelpDlg.ShowNewContent(WindowModePersistent(FWindowMode), hkImp, 249 249 MyData.ImpOrder[ctype, i]) 250 250 else … … 263 263 begin 264 264 if ssShift in Shift then 265 HelpDlg.ShowNewContent( FWindowMode or wmPersistent, hkImp, Pooliix[i])265 HelpDlg.ShowNewContent(WindowModePersistent(FWindowMode), hkImp, Pooliix[i]) 266 266 else 267 267 begin -
trunk/LocalPlayer/Diagram.pas
r352 r431 23 23 public 24 24 procedure OffscreenPaint; override; 25 procedure ShowNewContent_Charts(NewMode: integer);26 procedure ShowNewContent_Ship(NewMode: integer; p: integer = -1);25 procedure ShowNewContent_Charts(NewMode: TWindowMode); 26 procedure ShowNewContent_Ship(NewMode: TWindowMode; p: integer = -1); 27 27 28 28 private … … 299 299 end; 300 300 301 procedure TDiaDlg.ShowNewContent_Charts(NewMode: integer);301 procedure TDiaDlg.ShowNewContent_Charts(NewMode: TWindowMode); 302 302 begin 303 303 Kind := dkChart; … … 309 309 end; 310 310 311 procedure TDiaDlg.ShowNewContent_Ship(NewMode ,p: integer);311 procedure TDiaDlg.ShowNewContent_Ship(NewMode: TWindowMode; p: integer); 312 312 begin 313 313 Kind := dkShip; -
trunk/LocalPlayer/Draft.pas
r352 r431 28 28 Shift: TShiftState; x, y: integer); 29 29 public 30 procedure ShowNewContent(NewMode: integer);30 procedure ShowNewContent(NewMode: TWindowMode); 31 31 protected 32 32 procedure OffscreenPaint; override; … … 502 502 end; 503 503 504 procedure TDraftDlg.ShowNewContent(NewMode: integer);504 procedure TDraftDlg.ShowNewContent(NewMode: TWindowMode); 505 505 begin 506 506 inherited ShowNewContent(NewMode); … … 532 532 i := (y - yFeature) div LinePitch; 533 533 if (x >= xFeature - 21) and (x < ClientWidth) and (ssShift in Shift) then 534 HelpDlg.ShowNewContent( FWindowMode or wmPersistent, hkFeature, code[i])534 HelpDlg.ShowNewContent(WindowModePersistent(FWindowMode), hkFeature, code[i]) 535 535 else if not(code[i] in AutoFeature) then 536 536 begin -
trunk/LocalPlayer/Enhance.pas
r350 r431 39 39 NoMap: TIsoMap; 40 40 public 41 procedure ShowNewContent(NewMode: integer; TerrType: integer = -1);41 procedure ShowNewContent(NewMode: TWindowMode; TerrType: integer = -1); 42 42 protected 43 43 Page: integer; … … 117 117 end; 118 118 119 procedure TEnhanceDlg.ShowNewContent(NewMode ,TerrType: integer);119 procedure TEnhanceDlg.ShowNewContent(NewMode: TWindowMode; TerrType: integer); 120 120 begin 121 121 if (TerrType < fGrass) or (TerrType > fMountains) then … … 384 384 ShortCut := KeyToShortCut(Key, Shift); 385 385 if BHelp.Test(ShortCut) then 386 HelpDlg.ShowNewContent( FWindowMode or wmPersistent, hkText,386 HelpDlg.ShowNewContent(WindowModePersistent(FWindowMode), hkText, 387 387 HelpDlg.TextIndex('MACRO')) 388 388 end; -
trunk/LocalPlayer/Help.pas
r424 r431 108 108 procedure Line(ca: TCanvas; i: Integer; lit: Boolean); 109 109 procedure Prepare(sbPos: Integer = 0); 110 procedure ShowNewContentProcExecute(NewMode: Integer; HelpContext: string);110 procedure ShowNewContentProcExecute(NewMode: TWindowMode; HelpContext: string); 111 111 procedure WaterSign(x0, y0, iix: Integer); 112 112 procedure Search(SearchString: string); … … 117 117 Difficulty: Integer; 118 118 procedure ClearHistory; 119 procedure ShowNewContent(NewMode ,Category, Index: Integer);119 procedure ShowNewContent(NewMode: TWindowMode; Category, Index: Integer); 120 120 function TextIndex(Item: string): Integer; 121 121 end; … … 316 316 end; 317 317 318 procedure THelpDlg.ShowNewContentProcExecute(NewMode: Integer;318 procedure THelpDlg.ShowNewContentProcExecute(NewMode: TWindowMode; 319 319 HelpContext: string); 320 320 begin … … 1931 1931 end; 1932 1932 1933 procedure THelpDlg.ShowNewContent(NewMode ,Category, Index: Integer);1933 procedure THelpDlg.ShowNewContent(NewMode: TWindowMode; Category, Index: Integer); 1934 1934 begin 1935 1935 if (Category <> Kind) or (Index <> no) or (Category = hkMisc) and -
trunk/LocalPlayer/NatStat.pas
r414 r431 32 32 public 33 33 procedure CheckAge; 34 procedure ShowNewContent(NewMode: integer; p: integer = -1);34 procedure ShowNewContent(NewMode: TWindowMode; p: integer = -1); 35 35 procedure EcoChange; 36 36 protected … … 145 145 end; 146 146 147 procedure TNatStatDlg.ShowNewContent(NewMode ,p: integer);147 procedure TNatStatDlg.ShowNewContent(NewMode: TWindowMode; p: integer); 148 148 begin 149 149 if p < 0 then -
trunk/LocalPlayer/Nego.pas
r417 r431 75 75 procedure Start; // next turn of negotiation 76 76 procedure OffscreenPaint; override; 77 procedure ShowNewContent(NewMode: integer);77 procedure ShowNewContent(NewMode: TWindowMode); 78 78 79 79 private … … 192 192 end; 193 193 194 procedure TNegoDlg.ShowNewContent(NewMode: integer);194 procedure TNegoDlg.ShowNewContent(NewMode: TWindowMode); 195 195 begin 196 196 inherited ShowNewContent(NewMode); … … 648 648 if (X >= xNationPicture0) and (X < xNationPicture0 + 64) and 649 649 (Y >= yNationPicture) and (Y < yNationPicture + 48) then 650 NatStatDlg.ShowNewContent( FWindowMode or wmPersistent, DipMem[me].pContact)650 NatStatDlg.ShowNewContent(WindowModePersistent(FWindowMode), DipMem[me].pContact) 651 651 else if (X >= xNationPicture1) and (X < xNationPicture1 + 64) and 652 652 (Y >= yNationPicture) and (Y < yNationPicture + 48) then 653 NatStatDlg.ShowNewContent( FWindowMode or wmPersistent, me)653 NatStatDlg.ShowNewContent(WindowModePersistent(FWindowMode), me) 654 654 end; 655 655 -
trunk/LocalPlayer/Rates.pas
r426 r431 23 23 public 24 24 procedure OffscreenPaint; override; 25 procedure ShowNewContent(NewMode: integer);25 procedure ShowNewContent(NewMode: TWindowMode); 26 26 end; 27 27 … … 157 157 end; 158 158 159 procedure TRatesDlg.ShowNewContent(NewMode: integer);159 procedure TRatesDlg.ShowNewContent(NewMode: TWindowMode); 160 160 begin 161 161 inherited ShowNewContent(NewMode); -
trunk/LocalPlayer/Select.pas
r363 r431 74 74 // -2=empty, -1=ambiguous, other=only choice 75 75 procedure OffscreenPaint; override; 76 procedure ShowNewContent(NewMode: integer; ListKind: TListKind);77 procedure ShowNewContent_CityProject(NewMode ,cix: integer);78 procedure ShowNewContent_MilReport(NewMode ,p: integer);76 procedure ShowNewContent(NewMode: TWindowMode; ListKind: TListKind); 77 procedure ShowNewContent_CityProject(NewMode: TWindowMode; cix: integer); 78 procedure ShowNewContent_MilReport(NewMode: TWindowMode; p: integer); 79 79 procedure EcoChange; 80 80 procedure TechChange; … … 928 928 kModels, kChooseModel: 929 929 if lix <> mixAll then 930 UnitStatDlg.ShowNewContent_OwnModel(FWindowMode or 931 wmPersistent, lix); 930 UnitStatDlg.ShowNewContent_OwnModel(wmPersistent, lix); 932 931 kEModels: 933 UnitStatDlg.ShowNewContent_EnemyModel( FWindowMode orwmPersistent,932 UnitStatDlg.ShowNewContent_EnemyModel(wmPersistent, 934 933 code[1, sb.Position + Sel]); 935 934 kAllEModels, kChooseEModel: 936 935 if lix <> mixAll then 937 UnitStatDlg.ShowNewContent_EnemyModel(FWindowMode or 938 wmPersistent, lix); 936 UnitStatDlg.ShowNewContent_EnemyModel(wmPersistent, lix); 939 937 kAdvance, kFarAdvance, kScience, kChooseTech, kChooseETech, kStealTech: 940 938 if lix = adMilitary then 941 HelpDlg.ShowNewContent( FWindowMode orwmPersistent, hkText,939 HelpDlg.ShowNewContent(wmPersistent, hkText, 942 940 HelpDlg.TextIndex('MILRES')) 943 941 else if lix < adMilitary then 944 HelpDlg.ShowNewContent( FWindowMode orwmPersistent, hkAdv, lix);942 HelpDlg.ShowNewContent(wmPersistent, hkAdv, lix); 945 943 kProject: 946 944 if lix = cpImp + imTrGoods then 947 HelpDlg.ShowNewContent( FWindowMode orwmPersistent, hkText,945 HelpDlg.ShowNewContent(wmPersistent, hkText, 948 946 HelpDlg.TextIndex('TRADINGGOODS')) 949 947 else if lix and (cpImp + cpType) = 0 then 950 UnitStatDlg.ShowNewContent_OwnModel( FWindowMode orwmPersistent,948 UnitStatDlg.ShowNewContent_OwnModel(wmPersistent, 951 949 lix and cpIndex) 952 950 else if (lix and cpType = 0) and (lix <> cpImp + imTrGoods) then 953 HelpDlg.ShowNewContent( FWindowMode orwmPersistent, hkImp,951 HelpDlg.ShowNewContent(wmPersistent, hkImp, 954 952 lix and cpIndex); 955 953 kGov: 956 HelpDlg.ShowNewContent( FWindowMode orwmPersistent, hkMisc,954 HelpDlg.ShowNewContent(wmPersistent, hkMisc, 957 955 miscGovList); 958 956 kShipPart, kEShipPart: … … 1655 1653 end; 1656 1654 1657 procedure TListDlg.ShowNewContent(NewMode: integer; ListKind: TListKind);1655 procedure TListDlg.ShowNewContent(NewMode: TWindowMode; ListKind: TListKind); 1658 1656 var 1659 1657 i: integer; … … 1740 1738 end; // ShowNewContent 1741 1739 1742 procedure TListDlg.ShowNewContent_CityProject(NewMode ,cix: integer);1740 procedure TListDlg.ShowNewContent_CityProject(NewMode: TWindowMode; cix: integer); 1743 1741 begin 1744 1742 cixProject := cix; … … 1746 1744 end; 1747 1745 1748 procedure TListDlg.ShowNewContent_MilReport(NewMode ,p: integer);1746 procedure TListDlg.ShowNewContent_MilReport(NewMode: TWindowMode; p: integer); 1749 1747 begin 1750 1748 pView := p; -
trunk/LocalPlayer/Term.pas
r428 r431 573 573 procedure ImpImage(ca: TCanvas; x, y, iix: integer; Government: integer = -1; 574 574 IsControl: boolean = false); 575 procedure HelpOnTerrain(Loc , NewMode: integer);575 procedure HelpOnTerrain(Loc: Integer; NewMode: TWindowMode); 576 576 577 577 … … 748 748 end; 749 749 750 procedure HelpOnTerrain(Loc , NewMode: integer);750 procedure HelpOnTerrain(Loc: Integer; NewMode: TWindowMode); 751 751 begin 752 752 if MyMap[Loc] and fDeadLands <> 0 then -
trunk/LocalPlayer/UnitStat.pas
r380 r431 28 28 public 29 29 procedure CheckAge; 30 procedure ShowNewContent_OwnModel(NewMode ,mix: integer);31 procedure ShowNewContent_OwnUnit(NewMode ,uix: integer);32 procedure ShowNewContent_EnemyUnit(NewMode ,euix: integer);33 procedure ShowNewContent_EnemyLoc(NewMode ,Loc: integer);34 procedure ShowNewContent_EnemyModel(NewMode ,emix: integer);35 procedure ShowNewContent_EnemyCity(NewMode ,Loc: integer);30 procedure ShowNewContent_OwnModel(NewMode: TWindowMode; mix: integer); 31 procedure ShowNewContent_OwnUnit(NewMode: TWindowMode; uix: integer); 32 procedure ShowNewContent_EnemyUnit(NewMode: TWindowMode; euix: integer); 33 procedure ShowNewContent_EnemyLoc(NewMode: TWindowMode; Loc: integer); 34 procedure ShowNewContent_EnemyModel(NewMode: TWindowMode; emix: integer); 35 procedure ShowNewContent_EnemyCity(NewMode: TWindowMode; Loc: integer); 36 36 37 37 protected … … 218 218 end; 219 219 220 procedure TUnitStatDlg.ShowNewContent_OwnModel(NewMode ,mix: integer);220 procedure TUnitStatDlg.ShowNewContent_OwnModel(NewMode: TWindowMode; mix: integer); 221 221 begin 222 222 Kind := dkOwnModel; … … 225 225 end; 226 226 227 procedure TUnitStatDlg.ShowNewContent_OwnUnit(NewMode ,uix: integer);227 procedure TUnitStatDlg.ShowNewContent_OwnUnit(NewMode: TWindowMode; uix: integer); 228 228 begin 229 229 Kind := dkOwnUnit; … … 232 232 end; 233 233 234 procedure TUnitStatDlg.ShowNewContent_EnemyUnit(NewMode ,euix: integer);234 procedure TUnitStatDlg.ShowNewContent_EnemyUnit(NewMode: TWindowMode; euix: integer); 235 235 begin 236 236 Kind := dkEnemyUnit; … … 240 240 end; 241 241 242 procedure TUnitStatDlg.ShowNewContent_EnemyLoc(NewMode ,Loc: integer);242 procedure TUnitStatDlg.ShowNewContent_EnemyLoc(NewMode: TWindowMode; Loc: integer); 243 243 begin 244 244 Kind := dkEnemyUnit; … … 248 248 end; 249 249 250 procedure TUnitStatDlg.ShowNewContent_EnemyModel(NewMode ,emix: integer);250 procedure TUnitStatDlg.ShowNewContent_EnemyModel(NewMode: TWindowMode; emix: integer); 251 251 begin 252 252 Kind := dkEnemyModel; … … 255 255 end; 256 256 257 procedure TUnitStatDlg.ShowNewContent_EnemyCity(NewMode ,Loc: integer);257 procedure TUnitStatDlg.ShowNewContent_EnemyCity(NewMode: TWindowMode; Loc: integer); 258 258 begin 259 259 if MyMap[Loc] and fUnit <> 0 then -
trunk/LocalPlayer/Wonders.pas
r426 r431 28 28 public 29 29 procedure OffscreenPaint; override; 30 procedure ShowNewContent(NewMode: Integer);30 procedure ShowNewContent(NewMode: TWindowMode); 31 31 end; 32 32 … … 81 81 end; 82 82 83 procedure TWondersDlg.ShowNewContent(NewMode: Integer);83 procedure TWondersDlg.ShowNewContent(NewMode: TWindowMode); 84 84 begin 85 85 inherited ShowNewContent(NewMode); … … 351 351 begin 352 352 if Selection >= 0 then 353 HelpDlg.ShowNewContent( FWindowMode or wmPersistent, hkImp, Selection);353 HelpDlg.ShowNewContent(WindowModePersistent(FWindowMode), hkImp, Selection); 354 354 end; 355 355 -
trunk/Packages/CevoComponents/BaseWin.pas
r408 r431 8 8 9 9 type 10 TShowNewContent = procedure (NewMode: Integer; HelpContext: string) of object; 10 TWindowMode = (wmNone, wmModal, wmPersistent, wmSubmodal); 11 TShowNewContent = procedure (NewMode: TWindowMode; HelpContext: string) of object; 11 12 12 13 { TBufferedDrawDlg } … … 25 26 procedure StayOnTop_Workaround; 26 27 protected 27 FWindowMode: Integer;28 FWindowMode: TWindowMode; 28 29 ModalFrameIndent: Integer; 29 30 HelpContext: string; 30 procedure ShowNewContent(NewMode: Integer; ForceClose: Boolean = False);31 procedure ShowNewContent(NewMode: TWindowMode; ForceClose: Boolean = False); 31 32 procedure MarkUsedOffscreen(xMax, yMax: Integer); 32 33 procedure OffscreenPaint; virtual; … … 37 38 Offscreen: TBitmap; 38 39 OffscreenUser: TForm; 39 property WindowMode: integerread FWindowMode;40 property WindowMode: TWindowMode read FWindowMode; 40 41 end; 41 42 … … 64 65 65 66 const 66 // window modes67 wmNone = 0;68 wmModal = $1;69 wmPersistent = $2;70 wmSubmodal = $3;71 72 67 yUnused = 161; 73 68 NarrowFrame = 11; … … 76 71 77 72 procedure CreateOffscreen(var Offscreen: TBitmap); 73 function WindowModePersistent(Mode: TWindowMode): TWindowMode; 78 74 procedure Register; 79 75 … … 83 79 uses 84 80 ButtonBase, Area; 81 82 function WindowModeMakePersistent(Mode: TWindowMode): TWindowMode; 83 begin 84 if Mode = wmModal then Result := wmSubmodal 85 else Result := wmPersistent; 86 end; 85 87 86 88 procedure Register; … … 142 144 if Key = VK_F1 then begin 143 145 if Assigned(ShowNewContentProc) then 144 ShowNewContentProc( FWindowMode or wmPersistent, HelpContext);146 ShowNewContentProc(WindowModePersistent(FWindowMode), HelpContext); 145 147 end else 146 148 if FWindowMode = wmPersistent then begin … … 168 170 end; 169 171 170 procedure TBufferedDrawDlg.ShowNewContent(NewMode: Integer;172 procedure TBufferedDrawDlg.ShowNewContent(NewMode: TWindowMode; 171 173 ForceClose: Boolean); 172 174 begin -
trunk/Packages/CevoComponents/ButtonA.pas
r315 r431 54 54 end else begin 55 55 Brush.Color := $0000FF; 56 FrameRect(Rect(0, 0, 100, 25)) 56 FrameRect(Rect(0, 0, 100, 25)); 57 57 end; 58 58 end; -
trunk/Packages/CevoComponents/ButtonBase.pas
r355 r431 9 9 TButtonBase = class(TGraphicControl) 10 10 protected 11 FDown, FPermanent: boolean; 11 FDown: Boolean; 12 FPermanent: Boolean; 12 13 FGraphic: TBitmap; 13 14 // FDownSound, FUpSound: string; … … 59 60 begin 60 61 Active := true; 61 MouseMove(Shift, x, y) 62 MouseMove(Shift, x, y); 62 63 end; 63 64 … … 93 94 DownChangedProc(self); 94 95 end; 95 end 96 end; 96 97 end; 97 98 -
trunk/Packages/CevoComponents/ButtonC.pas
r290 r431 46 46 begin 47 47 Brush.Color := $0000FF; 48 FrameRect(Rect(0, 0, 12, 12)) 48 FrameRect(Rect(0, 0, 12, 12)); 49 49 end; 50 50 end;
Note:
See TracChangeset
for help on using the changeset viewer.