- Timestamp:
- Feb 2, 2018, 4:40:46 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 7 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Components/Area.pas
r10 r111 26 26 begin 27 27 inherited; 28 Enabled :=false;29 ShowHint :=true;28 Enabled := false; 29 ShowHint := true; 30 30 end; 31 31 … … 34 34 if csDesigning in ComponentState then 35 35 with Canvas do 36 begin Brush.Color:=$FF0000; FrameRect(Rect(0,0,width,height)) end 36 begin 37 Brush.Color := $FF0000; 38 FrameRect(Rect(0, 0, width, height)); 39 end; 37 40 end; 38 41 -
trunk/Components/ButtonBase.pas
r14 r111 122 122 begin 123 123 FDown := x; 124 Invalidate 124 Invalidate; 125 125 end; 126 126 -
trunk/Components/ButtonC.pas
r14 r111 11 11 constructor Create(aOwner: TComponent); override; 12 12 private 13 FIndex: integer;14 procedure SetIndex(x: integer);13 FIndex: Integer; 14 procedure SetIndex(x: Integer); 15 15 published 16 16 property Visible; … … 33 33 begin 34 34 inherited Create(aOwner); 35 ShowHint := true;35 ShowHint := True; 36 36 SetBounds(0, 0, 12, 12); 37 37 end; … … 55 55 begin 56 56 FIndex := x; 57 Invalidate 58 end 57 Invalidate; 58 end; 59 59 end; 60 60 -
trunk/Components/CevoComponents.lpk
r100 r111 15 15 <SyntaxMode Value="Delphi"/> 16 16 <CStyleOperator Value="False"/> 17 <IncludeAssertionCode Value="True"/> 17 18 <AllowLabel Value="False"/> 18 19 <CPPInline Value="False"/> … … 20 21 </Parsing> 21 22 <CodeGeneration> 23 <Checks> 24 <IOChecks Value="True"/> 25 <RangeChecks Value="True"/> 26 <OverflowChecks Value="True"/> 27 <StackChecks Value="True"/> 28 </Checks> 29 <VerifyObjMethodCallValidity Value="True"/> 22 30 <Optimizations> 23 31 <OptimizationLevel Value="0"/> 24 32 </Optimizations> 25 33 </CodeGeneration> 26 <Linking>27 <Debugging>28 <GenerateDebugInfo Value="False"/>29 </Debugging>30 </Linking>31 34 <Other> 32 35 <CompilerMessages> … … 35 38 </Other> 36 39 </CompilerOptions> 37 <Files Count=" 7">40 <Files Count="12"> 38 41 <Item1> 39 42 <Filename Value="Area.pas"/> … … 70 73 <UnitName Value="ButtonBase"/> 71 74 </Item7> 75 <Item8> 76 <Filename Value="DrawDlg.pas"/> 77 <HasRegisterProc Value="True"/> 78 <UnitName Value="DrawDlg"/> 79 </Item8> 80 <Item9> 81 <Filename Value="ScreenTools.pas"/> 82 <Type Value="Include"/> 83 </Item9> 84 <Item10> 85 <Filename Value="Directories.pas"/> 86 <Type Value="Include"/> 87 </Item10> 88 <Item11> 89 <Filename Value="StringTables.pas"/> 90 <Type Value="Include"/> 91 </Item11> 92 <Item12> 93 <Filename Value="Sound.pas"/> 94 <UnitName Value="Sound"/> 95 </Item12> 72 96 </Files> 73 97 <RequiredPkgs Count="2"> -
trunk/Components/CevoComponents.pas
r10 r111 5 5 unit CevoComponents; 6 6 7 {$warn 5023 off : no warning about unused units} 7 8 interface 8 9 9 10 uses 10 Area, ButtonA, ButtonB, ButtonC, ButtonN, EOTButton, ButtonBase, 11 LazarusPackageIntf;11 Area, ButtonA, ButtonB, ButtonC, ButtonN, EOTButton, ButtonBase, DrawDlg, 12 Sound, LazarusPackageIntf; 12 13 13 14 implementation … … 21 22 RegisterUnit('ButtonN', @ButtonN.Register); 22 23 RegisterUnit('EOTButton', @EOTButton.Register); 24 RegisterUnit('DrawDlg', @DrawDlg.Register); 23 25 end; 24 26 -
trunk/Direct.pas
r53 r111 7 7 Messg, 8 8 9 LCLIntf, LCLType, {$IFDEF Linux}LMessages, {$ENDIF}Messages, SysUtils, Classes, Graphics, Controls, Forms; 9 LCLIntf, LCLType, {$IFDEF Linux}LMessages, {$ENDIF}Messages, SysUtils, Classes, 10 Graphics, Controls, Forms, DrawDlg; 10 11 11 12 const -
trunk/Inp.pas
r104 r111 6 6 uses 7 7 ScreenTools, Messg, 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, DrawDlg, 9 9 ButtonA, StdCtrls; 10 10 -
trunk/Integrated.lpi
r100 r111 90 90 </Item2> 91 91 </RequiredPackages> 92 <Units Count="4 4">92 <Units Count="40"> 93 93 <Unit0> 94 94 <Filename Value="Integrated.lpr"/> … … 96 96 </Unit0> 97 97 <Unit1> 98 <Filename Value=" StringTables.pas"/>98 <Filename Value="Protocol.pas"/> 99 99 <IsPartOfProject Value="True"/> 100 100 </Unit1> 101 101 <Unit2> 102 <Filename Value=" Directories.pas"/>102 <Filename Value="CmdList.pas"/> 103 103 <IsPartOfProject Value="True"/> 104 104 </Unit2> 105 105 <Unit3> 106 <Filename Value=" Protocol.pas"/>106 <Filename Value="Database.pas"/> 107 107 <IsPartOfProject Value="True"/> 108 108 </Unit3> 109 109 <Unit4> 110 <Filename Value=" CmdList.pas"/>110 <Filename Value="GameServer.pas"/> 111 111 <IsPartOfProject Value="True"/> 112 112 </Unit4> 113 113 <Unit5> 114 <Filename Value=" Database.pas"/>114 <Filename Value="CityProcessing.pas"/> 115 115 <IsPartOfProject Value="True"/> 116 116 </Unit5> 117 117 <Unit6> 118 <Filename Value=" GameServer.pas"/>118 <Filename Value="UnitProcessing.pas"/> 119 119 <IsPartOfProject Value="True"/> 120 120 </Unit6> 121 121 <Unit7> 122 <Filename Value="CityProcessing.pas"/> 123 <IsPartOfProject Value="True"/> 122 <Filename Value="Direct.pas"/> 123 <IsPartOfProject Value="True"/> 124 <ComponentName Value="DirectDlg"/> 125 <HasResources Value="True"/> 126 <ResourceBaseClass Value="Form"/> 124 127 </Unit7> 125 128 <Unit8> 126 <Filename Value="UnitProcessing.pas"/> 127 <IsPartOfProject Value="True"/> 129 <Filename Value="Start.pas"/> 130 <IsPartOfProject Value="True"/> 131 <ComponentName Value="StartDlg"/> 132 <HasResources Value="True"/> 133 <ResourceBaseClass Value="Form"/> 128 134 </Unit8> 129 135 <Unit9> 130 <Filename Value=" Direct.pas"/>131 <IsPartOfProject Value="True"/> 132 <ComponentName Value=" DirectDlg"/>136 <Filename Value="Messg.pas"/> 137 <IsPartOfProject Value="True"/> 138 <ComponentName Value="MessgDlg"/> 133 139 <HasResources Value="True"/> 134 140 <ResourceBaseClass Value="Form"/> 135 141 </Unit9> 136 142 <Unit10> 137 <Filename Value="ScreenTools.pas"/> 138 <IsPartOfProject Value="True"/> 143 <Filename Value="Inp.pas"/> 144 <IsPartOfProject Value="True"/> 145 <ComponentName Value="InputDlg"/> 146 <HasResources Value="True"/> 147 <ResourceBaseClass Value="Form"/> 139 148 </Unit10> 140 149 <Unit11> 141 <Filename Value=" Start.pas"/>142 <IsPartOfProject Value="True"/> 143 <ComponentName Value=" StartDlg"/>150 <Filename Value="Back.pas"/> 151 <IsPartOfProject Value="True"/> 152 <ComponentName Value="Background"/> 144 153 <HasResources Value="True"/> 145 154 <ResourceBaseClass Value="Form"/> 146 155 </Unit11> 147 156 <Unit12> 148 <Filename Value=" Messg.pas"/>149 <IsPartOfProject Value="True"/> 150 <ComponentName Value=" MessgDlg"/>157 <Filename Value="Log.pas"/> 158 <IsPartOfProject Value="True"/> 159 <ComponentName Value="LogDlg"/> 151 160 <HasResources Value="True"/> 152 161 <ResourceBaseClass Value="Form"/> 153 162 </Unit12> 154 163 <Unit13> 155 <Filename Value="Inp.pas"/> 156 <IsPartOfProject Value="True"/> 157 <ComponentName Value="InputDlg"/> 158 <HasResources Value="True"/> 159 <ResourceBaseClass Value="Form"/> 164 <Filename Value="LocalPlayer\PVSB.pas"/> 165 <IsPartOfProject Value="True"/> 160 166 </Unit13> 161 167 <Unit14> 162 <Filename Value="Back.pas"/> 163 <IsPartOfProject Value="True"/> 164 <ComponentName Value="Background"/> 165 <HasResources Value="True"/> 166 <ResourceBaseClass Value="Form"/> 168 <Filename Value="LocalPlayer\LocalPlayer.pas"/> 169 <IsPartOfProject Value="True"/> 167 170 </Unit14> 168 171 <Unit15> 169 <Filename Value="Log.pas"/> 170 <IsPartOfProject Value="True"/> 171 <ComponentName Value="LogDlg"/> 172 <HasResources Value="True"/> 173 <ResourceBaseClass Value="Form"/> 172 <Filename Value="LocalPlayer\ClientTools.pas"/> 173 <IsPartOfProject Value="True"/> 174 174 </Unit15> 175 175 <Unit16> 176 <Filename Value="LocalPlayer\ PVSB.pas"/>176 <Filename Value="LocalPlayer\Diplomacy.pas"/> 177 177 <IsPartOfProject Value="True"/> 178 178 </Unit16> 179 179 <Unit17> 180 <Filename Value="LocalPlayer\ LocalPlayer.pas"/>180 <Filename Value="LocalPlayer\Tribes.pas"/> 181 181 <IsPartOfProject Value="True"/> 182 182 </Unit17> 183 183 <Unit18> 184 <Filename Value="LocalPlayer\ ClientTools.pas"/>184 <Filename Value="LocalPlayer\IsoEngine.pas"/> 185 185 <IsPartOfProject Value="True"/> 186 186 </Unit18> 187 187 <Unit19> 188 <Filename Value="LocalPlayer\Diplomacy.pas"/> 189 <IsPartOfProject Value="True"/> 188 <Filename Value="LocalPlayer\Term.pas"/> 189 <IsPartOfProject Value="True"/> 190 <ComponentName Value="MainScreen"/> 191 <HasResources Value="True"/> 192 <ResourceBaseClass Value="Form"/> 190 193 </Unit19> 191 194 <Unit20> 192 <Filename Value="LocalPlayer\Tribes.pas"/> 193 <IsPartOfProject Value="True"/> 195 <Filename Value="LocalPlayer\MessgEx.pas"/> 196 <IsPartOfProject Value="True"/> 197 <ComponentName Value="MessgExDlg"/> 198 <HasResources Value="True"/> 199 <ResourceBaseClass Value="Form"/> 194 200 </Unit20> 195 201 <Unit21> 196 <Filename Value="LocalPlayer\ IsoEngine.pas"/>202 <Filename Value="LocalPlayer\BaseWin.pas"/> 197 203 <IsPartOfProject Value="True"/> 198 204 </Unit21> 199 205 <Unit22> 200 <Filename Value="LocalPlayer\ Term.pas"/>201 <IsPartOfProject Value="True"/> 202 <ComponentName Value=" MainScreen"/>206 <Filename Value="LocalPlayer\Help.pas"/> 207 <IsPartOfProject Value="True"/> 208 <ComponentName Value="HelpDlg"/> 203 209 <HasResources Value="True"/> 204 210 <ResourceBaseClass Value="Form"/> 205 211 </Unit22> 206 212 <Unit23> 207 <Filename Value="LocalPlayer\ MessgEx.pas"/>208 <IsPartOfProject Value="True"/> 209 <ComponentName Value=" MessgExDlg"/>213 <Filename Value="LocalPlayer\Select.pas"/> 214 <IsPartOfProject Value="True"/> 215 <ComponentName Value="ListDlg"/> 210 216 <HasResources Value="True"/> 211 217 <ResourceBaseClass Value="Form"/> 212 218 </Unit23> 213 219 <Unit24> 214 <Filename Value="LocalPlayer\BaseWin.pas"/> 215 <IsPartOfProject Value="True"/> 220 <Filename Value="LocalPlayer\CityScreen.pas"/> 221 <IsPartOfProject Value="True"/> 222 <ComponentName Value="CityDlg"/> 223 <HasResources Value="True"/> 224 <ResourceBaseClass Value="Form"/> 216 225 </Unit24> 217 226 <Unit25> 218 <Filename Value="LocalPlayer\ Help.pas"/>219 <IsPartOfProject Value="True"/> 220 <ComponentName Value=" HelpDlg"/>227 <Filename Value="LocalPlayer\UnitStat.pas"/> 228 <IsPartOfProject Value="True"/> 229 <ComponentName Value="UnitStatDlg"/> 221 230 <HasResources Value="True"/> 222 231 <ResourceBaseClass Value="Form"/> 223 232 </Unit25> 224 233 <Unit26> 225 <Filename Value="LocalPlayer\ Select.pas"/>226 <IsPartOfProject Value="True"/> 227 <ComponentName Value=" ListDlg"/>234 <Filename Value="LocalPlayer\Draft.pas"/> 235 <IsPartOfProject Value="True"/> 236 <ComponentName Value="DraftDlg"/> 228 237 <HasResources Value="True"/> 229 238 <ResourceBaseClass Value="Form"/> 230 239 </Unit26> 231 240 <Unit27> 232 <Filename Value="LocalPlayer\ CityScreen.pas"/>233 <IsPartOfProject Value="True"/> 234 <ComponentName Value=" CityDlg"/>241 <Filename Value="LocalPlayer\NatStat.pas"/> 242 <IsPartOfProject Value="True"/> 243 <ComponentName Value="NatStatDlg"/> 235 244 <HasResources Value="True"/> 236 245 <ResourceBaseClass Value="Form"/> 237 246 </Unit27> 238 247 <Unit28> 239 <Filename Value="LocalPlayer\ UnitStat.pas"/>240 <IsPartOfProject Value="True"/> 241 <ComponentName Value=" UnitStatDlg"/>248 <Filename Value="LocalPlayer\Diagram.pas"/> 249 <IsPartOfProject Value="True"/> 250 <ComponentName Value="DiaDlg"/> 242 251 <HasResources Value="True"/> 243 252 <ResourceBaseClass Value="Form"/> 244 253 </Unit28> 245 254 <Unit29> 246 <Filename Value="LocalPlayer\ Draft.pas"/>247 <IsPartOfProject Value="True"/> 248 <ComponentName Value=" DraftDlg"/>255 <Filename Value="LocalPlayer\Wonders.pas"/> 256 <IsPartOfProject Value="True"/> 257 <ComponentName Value="WondersDlg"/> 249 258 <HasResources Value="True"/> 250 259 <ResourceBaseClass Value="Form"/> 251 260 </Unit29> 252 261 <Unit30> 253 <Filename Value="LocalPlayer\N atStat.pas"/>254 <IsPartOfProject Value="True"/> 255 <ComponentName Value="N atStatDlg"/>262 <Filename Value="LocalPlayer\Nego.pas"/> 263 <IsPartOfProject Value="True"/> 264 <ComponentName Value="NegoDlg"/> 256 265 <HasResources Value="True"/> 257 266 <ResourceBaseClass Value="Form"/> 258 267 </Unit30> 259 268 <Unit31> 260 <Filename Value="LocalPlayer\ Diagram.pas"/>261 <IsPartOfProject Value="True"/> 262 <ComponentName Value=" DiaDlg"/>269 <Filename Value="LocalPlayer\CityType.pas"/> 270 <IsPartOfProject Value="True"/> 271 <ComponentName Value="CityTypeDlg"/> 263 272 <HasResources Value="True"/> 264 273 <ResourceBaseClass Value="Form"/> 265 274 </Unit31> 266 275 <Unit32> 267 <Filename Value="LocalPlayer\ Wonders.pas"/>268 <IsPartOfProject Value="True"/> 269 <ComponentName Value=" WondersDlg"/>276 <Filename Value="LocalPlayer\Enhance.pas"/> 277 <IsPartOfProject Value="True"/> 278 <ComponentName Value="EnhanceDlg"/> 270 279 <HasResources Value="True"/> 271 280 <ResourceBaseClass Value="Form"/> 272 281 </Unit32> 273 282 <Unit33> 274 <Filename Value=" LocalPlayer\Nego.pas"/>275 <IsPartOfProject Value="True"/> 276 <ComponentName Value="N egoDlg"/>283 <Filename Value="NoTerm.pas"/> 284 <IsPartOfProject Value="True"/> 285 <ComponentName Value="NoTermDlg"/> 277 286 <HasResources Value="True"/> 278 287 <ResourceBaseClass Value="Form"/> 279 288 </Unit33> 280 289 <Unit34> 281 <Filename Value="LocalPlayer\ CityType.pas"/>282 <IsPartOfProject Value="True"/> 283 <ComponentName Value=" CityTypeDlg"/>290 <Filename Value="LocalPlayer\Battle.pas"/> 291 <IsPartOfProject Value="True"/> 292 <ComponentName Value="BattleDlg"/> 284 293 <HasResources Value="True"/> 285 294 <ResourceBaseClass Value="Form"/> 286 295 </Unit34> 287 296 <Unit35> 288 <Filename Value="LocalPlayer\ Enhance.pas"/>289 <IsPartOfProject Value="True"/> 290 <ComponentName Value=" EnhanceDlg"/>297 <Filename Value="LocalPlayer\Rates.pas"/> 298 <IsPartOfProject Value="True"/> 299 <ComponentName Value="RatesDlg"/> 291 300 <HasResources Value="True"/> 292 301 <ResourceBaseClass Value="Form"/> 293 302 </Unit35> 294 303 <Unit36> 295 <Filename Value="NoTerm.pas"/> 296 <IsPartOfProject Value="True"/> 297 <HasResources Value="True"/> 304 <Filename Value="LocalPlayer\TechTree.pas"/> 305 <IsPartOfProject Value="True"/> 306 <ComponentName Value="TechTreeDlg"/> 307 <HasResources Value="True"/> 308 <ResourceBaseClass Value="Form"/> 298 309 </Unit36> 299 310 <Unit37> 300 <Filename Value="Sound.pas"/> 301 <IsPartOfProject Value="True"/> 302 <HasResources Value="True"/> 311 <Filename Value="Platform.pas"/> 312 <IsPartOfProject Value="True"/> 303 313 </Unit37> 304 314 <Unit38> 305 <Filename Value="LocalPlayer\Battle.pas"/> 306 <IsPartOfProject Value="True"/> 307 <ComponentName Value="BattleDlg"/> 308 <HasResources Value="True"/> 309 <ResourceBaseClass Value="Form"/> 315 <Filename Value="Switches.inc"/> 316 <IsPartOfProject Value="True"/> 310 317 </Unit38> 311 318 <Unit39> 312 <Filename Value="Local Player\Rates.pas"/>313 <IsPartOfProject Value="True"/> 314 <ComponentName Value=" RatesDlg"/>319 <Filename Value="Locale.pas"/> 320 <IsPartOfProject Value="True"/> 321 <ComponentName Value="LocaleDlg"/> 315 322 <HasResources Value="True"/> 316 323 <ResourceBaseClass Value="Form"/> 317 324 </Unit39> 318 <Unit40>319 <Filename Value="LocalPlayer\TechTree.pas"/>320 <IsPartOfProject Value="True"/>321 <ComponentName Value="TechTreeDlg"/>322 <HasResources Value="True"/>323 <ResourceBaseClass Value="Form"/>324 </Unit40>325 <Unit41>326 <Filename Value="Platform.pas"/>327 <IsPartOfProject Value="True"/>328 </Unit41>329 <Unit42>330 <Filename Value="Switches.inc"/>331 <IsPartOfProject Value="True"/>332 </Unit42>333 <Unit43>334 <Filename Value="Locale.pas"/>335 <IsPartOfProject Value="True"/>336 <ComponentName Value="LocaleDlg"/>337 <HasResources Value="True"/>338 <ResourceBaseClass Value="Form"/>339 </Unit43>340 325 </Units> 341 326 </ProjectOptions> … … 384 369 <IgnoredMessages idx5024="True"/> 385 370 </CompilerMessages> 386 <CustomOptions Value="-d Borland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dDEBUG"/>371 <CustomOptions Value="-dDEBUG"/> 387 372 </Other> 388 373 </CompilerOptions> -
trunk/Integrated.lpr
r64 r111 4 4 uses 5 5 Forms, Interfaces, SysUtils, 6 StringTables in 'StringTables.pas',7 Directories in 'Directories.pas',8 6 Protocol in 'Protocol.pas', 9 7 CmdList in 'CmdList.pas', … … 13 11 UnitProcessing in 'UnitProcessing.pas', 14 12 Direct in 'Direct.pas' {DirectDlg} , 15 ScreenTools in 'ScreenTools.pas',16 13 Start in 'Start.pas' {StartDlg} , 17 14 Messg in 'Messg.pas' {MessgDlg} , … … 40 37 Enhance in 'LocalPlayer\Enhance.pas' {EnhanceDlg} , 41 38 NoTerm in 'NoTerm.pas' {NoTermDlg} , 42 Sound in 'Sound.pas' {SoundPlayer} ,43 39 Battle in 'LocalPlayer\Battle.pas' {BattleDlg} , 44 40 Rates in 'LocalPlayer\Rates.pas' {RatesDlg} , 45 TechTree in 'LocalPlayer\TechTree.pas' {TechTreeDlg}; 41 TechTree in 'LocalPlayer\TechTree.pas' {TechTreeDlg}, 42 ScreenTools, Directories; 46 43 47 44 {$R cevo.res} … … 64 61 Application.Initialize; 65 62 Application.Title := 'c-evo'; 63 Directories.InitUnit; 64 ScreenTools.UnitInit; 66 65 Application.CreateForm(TDirectDlg, DirectDlg); 67 66 Application.CreateForm(TStartDlg, StartDlg); … … 71 70 Application.CreateForm(TLogDlg, LogDlg); 72 71 Application.Run; 73 72 ScreenTools.UnitDone; 74 73 end. -
trunk/LocalPlayer/BaseWin.pas
r104 r111 7 7 ScreenTools, Messg, 8 8 9 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms ;9 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, DrawDlg; 10 10 11 11 type -
trunk/LocalPlayer/Battle.pas
r57 r111 6 6 uses 7 7 ScreenTools, Protocol, Messg, ButtonBase, ButtonA, Types, LCLIntf, LCLType, 8 SysUtils, Classes, Graphics, Controls, Forms ;8 SysUtils, Classes, Graphics, Controls, Forms, DrawDlg; 9 9 10 10 type -
trunk/LocalPlayer/MessgEx.pas
r62 r111 7 7 Messg, Protocol, ScreenTools, Platform, DateUtils, 8 8 LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonA, 9 ButtonB, StdCtrls ;9 ButtonB, StdCtrls, DrawDlg; 10 10 11 11 type -
trunk/LocalPlayer/TechTree.pas
r73 r111 5 5 6 6 uses 7 ScreenTools, Messg, LCLIntf, LCLType, 8 9 Messages, SysUtils, Classes, Graphics, Controls, Forms, 10 ButtonBase, ButtonB; 7 ScreenTools, Messg, LCLIntf, LCLType, Messages, SysUtils, Classes, Graphics, 8 Controls, Forms, ButtonBase, ButtonB, DrawDlg; 11 9 12 10 type -
trunk/LocalPlayer/Term.pas
r99 r111 12 12 {$ENDIF} 13 13 Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase, 14 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, 15 Forms, Menus, ExtCtrls, dateutils, Platform, ButtonB, ButtonC, EOTButton, Area , Types;14 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, DrawDlg, Types, 15 Forms, Menus, ExtCtrls, dateutils, Platform, ButtonB, ButtonC, EOTButton, Area; 16 16 17 17 const -
trunk/Locale.pas
r77 r111 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ScreenTools, Messg, ButtonA, Registry, fgl, Directories ;9 ScreenTools, Messg, ButtonA, Registry, fgl, Directories, DrawDlg; 10 10 11 11 type -
trunk/Messg.lfm
r9 r111 1 1 object MessgDlg: TMessgDlg 2 2 Left = 493 3 Height = 134 3 4 Top = 431 5 Width = 418 4 6 BorderIcons = [] 5 7 BorderStyle = bsNone … … 8 10 ClientWidth = 418 9 11 Color = clBtnFace 10 Font.Charset = DEFAULT_CHARSET12 DesignTimePPI = 125 11 13 Font.Color = clWindowText 12 14 Font.Height = -13 13 15 Font.Name = 'MS Sans Serif' 14 Font.Style = []15 16 FormStyle = fsStayOnTop 16 17 OnCreate = FormCreate … … 18 19 OnPaint = FormPaint 19 20 OnShow = FormShow 20 PixelsPerInch = 9621 LCLVersion = '1.8.0.6' 21 22 object Button1: TButtonA 22 23 Left = 101 24 Height = 25 23 25 Top = 104 24 26 Width = 100 25 Height = 2526 27 Down = False 27 28 Permanent = False 28 29 OnClick = Button1Click 29 Caption = ''30 30 end 31 31 object Button2: TButtonA 32 32 Left = 217 33 Height = 25 33 34 Top = 104 34 35 Width = 100 35 Height = 2536 36 Down = False 37 37 Permanent = False 38 38 OnClick = Button2Click 39 Caption = ''40 39 end 41 40 end -
trunk/Messg.pas
r104 r111 5 5 6 6 uses 7 ScreenTools, 8 9 LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ButtonBase, 10 ButtonA, 11 ButtonB, Area; 7 ScreenTools, LCLIntf, LCLType, LMessages, Messages, SysUtils, Classes, 8 Graphics, Controls, Forms, ButtonBase, ButtonA, ButtonB, Area, DrawDlg; 12 9 13 10 const … … 15 12 16 13 type 17 TDrawDlg = class(TForm)18 public19 constructor Create(AOwner: TComponent); override;20 procedure SmartInvalidate; virtual;21 protected22 TitleHeight: integer;23 // defines area to grip the window for moving (from top)24 procedure InitButtons();25 procedure OnEraseBkgnd(var m: TMessage); message WM_ERASEBKGND;26 procedure OnHitTest(var Msg: TMessage); message WM_NCHITTEST;27 end;28 29 TBaseMessgDlg = class(TDrawDlg)30 procedure FormCreate(Sender: TObject);31 procedure FormPaint(Sender: TObject);32 public33 MessgText: string;34 protected35 Lines, TopSpace: integer;36 procedure SplitText(preview: boolean);37 procedure CorrectHeight;38 end;39 40 14 TMessgDlg = class(TBaseMessgDlg) 41 15 Button1: TButtonA; … … 60 34 mkYesNo = 3; 61 35 62 Border = 3;63 MessageLineSpacing = 20;64 65 36 var 66 37 MessgDlg: TMessgDlg; … … 69 40 procedure SoundMessage(SimpleText, SoundItem: string); 70 41 42 71 43 implementation 72 44 73 45 {$R *.lfm} 74 75 constructor TDrawDlg.Create(AOwner: TComponent);76 begin77 inherited;78 TitleHeight := 0;79 end;80 81 procedure TDrawDlg.OnEraseBkgnd(var m: TMessage);82 begin83 end;84 85 procedure TDrawDlg.OnHitTest(var Msg: TMessage);86 var87 i: integer;88 ControlBounds: TRect;89 begin90 if BorderStyle <> bsNone then91 inherited92 else93 begin94 if integer((Msg.LParam shr 16) and $ffff) >= Top + TitleHeight then95 Msg.result := HTCLIENT96 else97 begin98 for i := 0 to ControlCount - 1 do99 if Controls[i].Visible then100 begin101 ControlBounds := Controls[i].BoundsRect;102 if (integer(Msg.LParam and $ffff) >= Left + ControlBounds.Left) and103 (integer(Msg.LParam and $ffff) < Left + ControlBounds.Right) and104 (integer((Msg.LParam shr 16 ) and $ffff) >= Top + ControlBounds.Top) and105 (integer((Msg.LParam shr 16) and $ffff) < Top + ControlBounds.Bottom) then106 begin107 Msg.result := HTCLIENT;108 exit;109 end;110 end;111 Msg.result := HTCAPTION112 end;113 end114 end;115 116 procedure TDrawDlg.InitButtons();117 var118 cix: integer;119 // ButtonDownSound, ButtonUpSound: string;120 begin121 // ButtonDownSound:=Sounds.Lookup('BUTTON_DOWN');122 // ButtonUpSound:=Sounds.Lookup('BUTTON_UP');123 for cix := 0 to ComponentCount - 1 do124 if Components[cix] is TButtonBase then125 begin126 TButtonBase(Components[cix]).Graphic := GrExt[HGrSystem].Data;127 // if ButtonDownSound<>'*' then128 // DownSound:=HomeDir+'Sounds' + DirectorySeparator + ButtonDownSound + '.wav';129 // if ButtonUpSound<>'*' then130 // UpSound:=HomeDir+'Sounds' + DirectorySeparator + ButtonUpSound + '.wav';131 if Components[cix] is TButtonA then132 TButtonA(Components[cix]).Font := UniFont[ftButton];133 if Components[cix] is TButtonB then134 TButtonB(Components[cix]).Mask := GrExt[HGrSystem].Mask;135 end;136 end;137 138 procedure TDrawDlg.SmartInvalidate;139 var140 i: integer;141 r0, r1: HRgn;142 begin143 r0 := CreateRectRgn(0, 0, ClientWidth, ClientHeight);144 for i := 0 to ControlCount - 1 do145 if not(Controls[i] is TArea) and Controls[i].Visible then146 begin147 with Controls[i].BoundsRect do148 r1 := CreateRectRgn(Left, Top, Right, Bottom);149 CombineRgn(r0, r0, r1, RGN_DIFF);150 DeleteObject(r1);151 end;152 InvalidateRgn(Handle, r0, false);153 DeleteObject(r0);154 end;155 156 procedure TBaseMessgDlg.FormCreate(Sender: TObject);157 begin158 Left := (Screen.Width - Width) div 2;159 Canvas.Font.Assign(UniFont[ftNormal]);160 Canvas.Brush.Style := bsClear;161 MessgText := '';162 TopSpace := 0;163 TitleHeight := Screen.Height;164 InitButtons();165 end;166 167 procedure TBaseMessgDlg.FormPaint(Sender: TObject);168 var169 i, cix: integer;170 begin171 PaintBackground(self, 3 + Border, 3 + Border, ClientWidth - (6 + 2 * Border),172 ClientHeight - (6 + 2 * Border));173 for i := 0 to Border do174 Frame(Canvas, i, i, ClientWidth - 1 - i, ClientHeight - 1 - i,175 $000000, $000000);176 Frame(Canvas, Border + 1, Border + 1, ClientWidth - (2 + Border),177 ClientHeight - (2 + Border), MainTexture.clBevelLight,178 MainTexture.clBevelShade);179 Frame(Canvas, 2 + Border, 2 + Border, ClientWidth - (3 + Border),180 ClientHeight - (3 + Border), MainTexture.clBevelLight,181 MainTexture.clBevelShade);182 SplitText(false);183 184 for cix := 0 to ControlCount - 1 do185 if (Controls[cix].Visible) and (Controls[cix] is TButtonBase) then186 BtnFrame(Canvas, Controls[cix].BoundsRect, MainTexture);187 end;188 189 procedure TBaseMessgDlg.SplitText(preview: boolean);190 var191 Start, Stop, OrdinaryStop, LinesCount: integer;192 s: string;193 begin194 Start := 1;195 LinesCount := 0;196 while Start < Length(MessgText) do197 begin198 Stop := Start;199 while (Stop < Length(MessgText)) and (MessgText[Stop] <> '\') and200 (BiColorTextWidth(Canvas, Copy(MessgText, Start, Stop - Start + 1)) <201 ClientWidth - 56) do202 inc(Stop);203 if Stop <> Length(MessgText) then204 begin205 OrdinaryStop := Stop;206 repeat207 dec(OrdinaryStop)208 until (MessgText[OrdinaryStop + 1] = ' ') or209 (MessgText[OrdinaryStop + 1] = '\');210 if (OrdinaryStop + 1 - Start) * 2 >= Stop - Start then211 Stop := OrdinaryStop212 end;213 if not preview then214 begin215 s := Copy(MessgText, Start, Stop - Start + 1);216 LoweredTextOut(Canvas, -1, MainTexture,217 (ClientWidth - BiColorTextWidth(Canvas, s)) div 2,218 19 + Border + TopSpace + LinesCount * MessageLineSpacing, s);219 end;220 Start := Stop + 2;221 inc(LinesCount)222 end;223 if preview then224 Lines := LinesCount;225 end;226 227 procedure TBaseMessgDlg.CorrectHeight;228 var229 i: integer;230 begin231 ClientHeight := 72 + Border + TopSpace + Lines * MessageLineSpacing;232 Top := (Screen.Height - ClientHeight) div 2;233 for i := 0 to ControlCount - 1 do234 Controls[i].Top := ClientHeight - (34 + Border);235 end;236 46 237 47 procedure TMessgDlg.FormCreate(Sender: TObject); -
trunk/NoTerm.pas
r57 r111 6 6 uses 7 7 ScreenTools, Protocol, Messg, LCLIntf, LCLType, dateutils, Platform, 8 SysUtils, Classes, Graphics, Controls, Forms, ButtonB ;8 SysUtils, Classes, Graphics, Controls, Forms, ButtonB, DrawDlg; 9 9 10 10 type -
trunk/Start.pas
r105 r111 7 7 GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area, Math, 8 8 LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls, 9 Menus, Registry ;9 Menus, Registry, DrawDlg; 10 10 11 11 const
Note:
See TracChangeset
for help on using the changeset viewer.