- Timestamp:
- Apr 6, 2021, 10:16:55 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Direct.pas
r347 r352 60 60 case ID of 61 61 ntInitLocalHuman: begin 62 SetMainTextureByAge(-1);62 MainTexture.Age := -1; 63 63 State := -1; 64 64 Info := Phrases.Lookup('BUSY_MODLH'); … … 151 151 while BiColorTextWidth(Canvas, Info) + 64 > ClientWidth do 152 152 Delete(Info, Length(Info), 1); 153 SetMainTextureByAge(-1);153 MainTexture.Age := -1; 154 154 State := -1; 155 155 Show; … … 276 276 Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 277 277 Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 278 MainTexture. clBevelLight, MainTexture.clBevelShade);278 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 279 279 Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 280 MainTexture. clBevelLight, MainTexture.clBevelShade);280 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 281 281 if State >= 0 then 282 282 RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, Info)) -
trunk/Inp.pas
r350 r352 46 46 Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 47 47 Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 48 MainTexture. clBevelLight, MainTexture.clBevelShade);48 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 49 49 Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 50 MainTexture. clBevelLight, MainTexture.clBevelShade);50 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 51 51 EditFrame(Canvas, EInput.BoundsRect, MainTexture); 52 52 BtnFrame(Canvas, OKBtn.BoundsRect, MainTexture); … … 84 84 begin 85 85 OKBtn.Caption := Phrases.Lookup('BTN_OK'); 86 EInput.Font.Color := MainTexture. clMark;86 EInput.Font.Color := MainTexture.ColorMark; 87 87 EInput.SelStart := 0; 88 88 EInput.SelLength := Length(EInput.Text); -
trunk/LocalPlayer/Battle.pas
r350 r352 243 243 end; 244 244 Frame(Canvas, Border + 1, Border + 1, ClientWidth - (2 + Border), 245 ClientHeight - (2 + Border), MainTexture. clBevelLight,246 MainTexture. clBevelShade);245 ClientHeight - (2 + Border), MainTexture.ColorBevelLight, 246 MainTexture.ColorBevelShade); 247 247 Frame(Canvas, 2 + Border, 2 + Border, ClientWidth - (3 + Border), 248 ClientHeight - (3 + Border), MainTexture. clBevelLight,249 MainTexture. clBevelShade);248 ClientHeight - (3 + Border), MainTexture.ColorBevelLight, 249 MainTexture.ColorBevelShade); 250 250 251 251 if IsSuicideQuery then -
trunk/LocalPlayer/CityScreen.pas
r350 r352 82 82 ProdHint: Boolean; 83 83 AllowChange: Boolean; 84 RedTex: TTexture; 85 BarTex: TTexture; 84 86 procedure InitSmallCityMap; 85 87 procedure InitZoomCityMap; … … 197 199 begin 198 200 inherited; 201 RedTex := TTexture.Create; 202 BarTex := TTexture.Create; 199 203 AreaMap := TIsoMap.Create; 200 204 AreaMap.SetOutput(offscreen); … … 259 263 FreeAndNil(Template); 260 264 FreeAndNil(Back); 265 FreeAndNil(RedTex); 266 FreeAndNil(BarTex); 261 267 end; 262 268 … … 269 275 procedure TCityDlg.CheckAge; 270 276 begin 271 if MainTextureAge <> AgePrepared then 272 begin 273 AgePrepared := MainTextureAge; 277 if MainTexture.Age <> AgePrepared then begin 278 AgePrepared := MainTexture.Age; 274 279 275 280 UnshareBitmap(Back); … … 388 393 procedure FillBar(x, y, pos, Growth, max, Kind: integer; 389 394 IndicateComplete: boolean); 390 var 391 Tex: TTexture; 392 begin 393 Tex := MainTexture; 394 if Kind = 3 then 395 begin 396 Tex.clBevelLight := HGrSystem.Data.Canvas.Pixels[104, 36]; 397 Tex.clBevelShade := Tex.clBevelLight; 395 begin 396 BarTex.Assign(MainTexture); 397 if Kind = 3 then begin 398 BarTex.ColorBevelLight := HGrSystem.Data.Canvas.Pixels[104, 36]; 399 BarTex.ColorBevelShade := BarTex.ColorBevelLight; 398 400 end; 399 401 PaintRelativeProgressBar(offscreen.Canvas, Kind, x - 3, y, wBar - 4, pos, 400 Growth, max, IndicateComplete, Tex);402 Growth, max, IndicateComplete, BarTex); 401 403 end; 402 404 … … 492 494 UnitInfo: TUnitInfo; 493 495 UnitReport: TUnitReport; 494 RedTex: TTexture;495 496 IsCityAlive, CanGrow: boolean; 496 497 begin … … 524 525 Report.Working := c.Size; 525 526 526 RedTex := MainTexture;527 RedTex. clBevelLight := $0000FF;528 RedTex. clBevelShade := $000000;529 RedTex. clTextLight := $000000;530 RedTex. clTextShade := $0000FF;527 RedTex.Assign(MainTexture); 528 RedTex.ColorBevelLight := $0000FF; 529 RedTex.ColorBevelShade := $000000; 530 RedTex.ColorTextLight := $000000; 531 RedTex.ColorTextShade := $0000FF; 531 532 532 533 BitBltCanvas(offscreen.Canvas, 0, 0, 640, 480, Back.Canvas, 0, 0); … … 797 798 Frame(offscreen.Canvas, xSmallMap + 48 * (ZoomArea div 3), 798 799 ySmallMap + 24 * (ZoomArea mod 3), xSmallMap + 48 * (ZoomArea div 3) + 49, 799 ySmallMap + 24 * (ZoomArea mod 3) + 25, MainTexture. clMark,800 MainTexture. clMark);800 ySmallMap + 24 * (ZoomArea mod 3) + 25, MainTexture.ColorMark, 801 MainTexture.ColorMark); 801 802 Frame(offscreen.Canvas, xSmallMap - 1, ySmallMap - 1, xSmallMap + wSmallMap, 802 803 ySmallMap + hSmallMap, $B0B0B0, $FFFFFF); … … 812 813 if Mode = mSupp then 813 814 begin 814 offscreen.Canvas.brush.Color := MainTexture. clMark;815 offscreen.Canvas.brush.Color := MainTexture.ColorMark; 815 816 offscreen.Canvas.FillRect(Rect(x - 27, y - 6, x + 27, y + 6)); 816 817 offscreen.Canvas.brush.style := bsClear; -
trunk/LocalPlayer/CityType.pas
r350 r352 93 93 94 94 Frame(offscreen.Canvas, 0, yList + 32 * nListRow, InnerWidth - 255, 95 yPool - 23, MainTexture. clBevelLight, MainTexture.clBevelShade);95 yPool - 23, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 96 96 Frame(offscreen.Canvas, InnerWidth - 254, yList + 32 * nListRow, 97 InnerWidth - 89, yPool - 23, MainTexture. clBevelLight,98 MainTexture. clBevelShade);97 InnerWidth - 89, yPool - 23, MainTexture.ColorBevelLight, 98 MainTexture.ColorBevelShade); 99 99 Frame(offscreen.Canvas, InnerWidth - 88, yList + 32 * nListRow, 100 InnerWidth - 1, yPool - 23, MainTexture. clBevelLight,101 MainTexture. clBevelShade);100 InnerWidth - 1, yPool - 23, MainTexture.ColorBevelLight, 101 MainTexture.ColorBevelShade); 102 102 Frame(offscreen.Canvas, 0, yPool - 22, InnerWidth - 1, yPool - 1, 103 MainTexture. clBevelLight, MainTexture.clBevelShade);103 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 104 104 for i := 0 to nCityType - 1 do 105 105 begin 106 106 RFrame(offscreen.Canvas, xSwitch + i * 42, ySwitch, xSwitch + 39 + i * 42, 107 ySwitch + 23, MainTexture. clBevelShade, MainTexture.clBevelLight);107 ySwitch + 23, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 108 108 if i = ctype then 109 109 Frame(offscreen.Canvas, xSwitch + 1 + i * 42, ySwitch + 1, 110 xSwitch + 38 + i * 42, ySwitch + 22, MainTexture. clBevelShade,111 MainTexture. clBevelLight)110 xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.ColorBevelShade, 111 MainTexture.ColorBevelLight) 112 112 else 113 113 Frame(offscreen.Canvas, xSwitch + 1 + i * 42, ySwitch + 1, 114 xSwitch + 38 + i * 42, ySwitch + 22, MainTexture. clBevelLight,115 MainTexture. clBevelShade);114 xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.ColorBevelLight, 115 MainTexture.ColorBevelShade); 116 116 BitBltCanvas(offscreen.Canvas, xSwitch + 2 + i * 42, ySwitch + 2, 117 117 xSizeSmall, ySizeSmall, SmallImp.Canvas, (i + 3) * xSizeSmall, 0); … … 130 130 for i := 1 to nListRow - 1 do 131 131 DLine(offscreen.Canvas, xList - 5, xList + 4 + 42 * nListCol, 132 yList - 1 + 32 * i, MainTexture. clBevelLight, MainTexture.clBevelShade);132 yList - 1 + 32 * i, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 133 133 for i := 0 to nListCol * nListRow - 1 do 134 134 begin 135 135 s := IntToStr(i + 1); 136 Font.Color := MainTexture. clTextLight;136 Font.Color := MainTexture.ColorTextLight; 137 137 Textout(xList + 20 + i mod nListCol * 42 - TextWidth(s) div 2, 138 138 yList + 15 + i div nListCol * 32 - TextHeight(s) div 2, s); … … 147 147 xList + 21 + xSizeSmall div 2 + i mod nListCol * 42, 148 148 yList + 16 + ySizeSmall div 2 + i div nListCol * 32, 149 MainTexture. clBevelLight, MainTexture.clBevelShade);149 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 150 150 BitBltCanvas(offscreen.Canvas, xList + 21 - xSizeSmall div 2 + 151 151 i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32, … … 169 169 nPool div nPoolCol * 32, xPool + 21 + xSizeSmall div 2 + 170 170 nPool mod nPoolCol * 42, yPool + 16 + ySizeSmall div 2 + 171 nPool div nPoolCol * 32, MainTexture. clBevelLight,172 MainTexture. clBevelShade);171 nPool div nPoolCol * 32, MainTexture.ColorBevelLight, 172 MainTexture.ColorBevelShade); 173 173 BitBltCanvas(offscreen.Canvas, xPool + 21 - xSizeSmall div 2 + 174 174 nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 + -
trunk/LocalPlayer/ClientTools.pas
r328 r352 201 201 i: integer; 202 202 begin 203 if p = me then 204 begin 203 if p = me then begin 205 204 Result := 0; 206 205 for i := 1 to 3 do 207 206 if MyRO.Tech[AgePreq[i]] >= tsApplicable then 208 207 Result := i; 209 end 210 else 211 begin 208 end else begin 212 209 Result := 0; 213 210 for i := 1 to 3 do -
trunk/LocalPlayer/Diagram.pas
r350 r352 63 63 Canvas.Brush.Style := bsClear; 64 64 ScreenTools.Frame(canvas, Left - 1, Top - 1, Left + Width, Top + 200, 65 MainTexture. clBevelShade, MainTexture.clBevelLight);65 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 66 66 RFrame(canvas, Left - 2, Top - 2, Left + Width + 1, Top + 200 + 1, 67 MainTexture. clBevelShade, MainTexture.clBevelLight);67 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 68 68 69 69 // stars … … 163 163 begin 164 164 LoweredTextOut(offscreen.canvas, -1, MainTexture, x - 2, y, Cap); 165 DLine(offscreen.canvas, x - 2, x + 169, y + 16, MainTexture. clTextShade,166 MainTexture. clTextLight);165 DLine(offscreen.canvas, x - 2, x + 169, y + 16, MainTexture.ColorTextShade, 166 MainTexture.ColorTextLight); 167 167 if val0 > 0 then 168 168 s := Format(Phrases.Lookup('SHARE'), [val0, val1]) -
trunk/LocalPlayer/Draft.pas
r350 r352 183 183 Phrases.Lookup('UNITSPEED')); 184 184 DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16, 185 MainTexture. clBevelShade, MainTexture.clBevelLight);185 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 186 186 DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16, 187 MainTexture. clBevelShade, MainTexture.clBevelLight);187 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 188 188 s := MovementToString(MyRO.DevModel.Speed); 189 189 RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 - … … 199 199 xTotal2 + 148 + 30, y, '='); 200 200 DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16, 201 MainTexture. clBevelShade, MainTexture.clBevelLight);201 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 202 202 DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16, 203 MainTexture. clBevelShade, MainTexture.clBevelLight);203 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 204 204 s := IntToStr(MyRO.DevModel.Cost); 205 205 RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 - 12 - … … 216 216 xTotal2 + 148 + 30, y, '='); 217 217 DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16, 218 MainTexture. clBevelShade, MainTexture.clBevelLight);218 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 219 219 DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16, 220 MainTexture. clBevelShade, MainTexture.clBevelLight);220 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 221 221 s := IntToStr(MyRO.DevModel.Cost * BuildCostMod 222 222 [G.Difficulty[me]] div 12); … … 236 236 237 237 ClientHeight := Template.Height - Cut; 238 if ClientHeight > hMainTexturethen238 if ClientHeight > MainTexture.Height then 239 239 // assemble background from 2 texture tiles 240 240 begin 241 241 BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, 64, 242 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,243 hMainTexture- 64);242 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 243 MainTexture.Height - 64); 244 244 BitBltCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64, 245 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,245 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 246 246 0); 247 247 end 248 248 else 249 249 BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 250 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,251 ( hMainTexture- ClientHeight) div 2);250 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 251 (MainTexture.Height - ClientHeight) div 2); 252 252 ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64); 253 253 ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width, … … 320 320 RFrame(offscreen.Canvas, xFeature - (21 + 1), 321 321 yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24), 322 yFeature + 2 + LinePitch * i + 12, MainTexture. clBevelShade,323 MainTexture. clBevelLight);322 yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade, 323 MainTexture.ColorBevelLight); 324 324 end 325 325 else … … 329 329 RFrame(offscreen.Canvas, xFeature - (9 + 1), 330 330 yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24), 331 yFeature + 2 + LinePitch * i + 12, MainTexture. clBevelShade,332 MainTexture. clBevelLight);331 yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade, 332 MainTexture.ColorBevelLight); 333 333 end; 334 334 … … 362 362 363 363 if MyRO.DevModel.Cap[code[i]] > 0 then 364 TextColor := MainTexture. clLitText364 TextColor := MainTexture.ColorLitText 365 365 else 366 366 TextColor := -1; -
trunk/LocalPlayer/MessgEx.pas
r323 r352 357 357 if (IconKind = mikImp) and (IconIndex = 27) then 358 358 begin // "YOU WIN" message 359 clSaveTextLight := MainTexture. clTextLight;360 clSaveTextShade := MainTexture. clTextShade;361 MainTexture. clTextLight := $000000; // gold362 MainTexture. clTextShade := $0FDBFF;359 clSaveTextLight := MainTexture.ColorTextLight; 360 clSaveTextShade := MainTexture.ColorTextShade; 361 MainTexture.ColorTextLight := $000000; // gold 362 MainTexture.ColorTextShade := $0FDBFF; 363 363 inherited; 364 MainTexture. clTextLight := clSaveTextLight;365 MainTexture. clTextShade := clSaveTextShade;364 MainTexture.ColorTextLight := clSaveTextLight; 365 MainTexture.ColorTextShade := clSaveTextShade; 366 366 end 367 367 else … … 411 411 end; 412 412 mikBook: 413 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture. clPage,414 MainTexture. clCover);413 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture.ColorPage, 414 MainTexture.ColorCover); 415 415 mikTribe: 416 416 if Assigned(Tribe[IconIndex].faceHGr) then -
trunk/LocalPlayer/NatStat.pas
r350 r352 107 107 procedure TNatStatDlg.CheckAge; 108 108 begin 109 if MainTextureAge <> AgePrepared then 110 begin 111 AgePrepared := MainTextureAge; 109 if MainTexture.Age <> AgePrepared then begin 110 AgePrepared := MainTexture.Age; 112 111 BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 113 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,114 ( hMainTexture- ClientHeight) div 2);112 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 113 (MainTexture.Height - ClientHeight) div 2); 115 114 ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight); 116 115 end; … … 358 357 with Canvas do 359 358 begin 360 Brush.Color := MainTexture. clBevelShade;359 Brush.Color := MainTexture.ColorBevelShade; 361 360 FillRect(Rect(xReport + wReport, yReport + PaperShade, 362 361 xReport + wReport + PaperShade, yReport + hReport + PaperShade)); -
trunk/LocalPlayer/Nego.pas
r350 r352 510 510 511 511 Fill(Offscreen.Canvas, 3, 3, ClientWidth - 6, ClientHeight - 6, 512 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);512 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 513 513 Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 514 514 Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 515 MainTexture. clBevelLight, MainTexture.clBevelShade);515 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 516 516 Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 517 MainTexture. clBevelLight, MainTexture.clBevelShade);517 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 518 518 Corner(Offscreen.Canvas, 1, 1, 0, MainTexture); 519 519 Corner(Offscreen.Canvas, ClientWidth - 9, 1, 1, MainTexture); … … 565 565 with Offscreen.Canvas do 566 566 begin 567 Brush.Color := MainTexture. clBevelShade;567 Brush.Color := MainTexture.ColorBevelShade; 568 568 if History[me].Text[Page - 1] <> '' then 569 569 begin -
trunk/LocalPlayer/Rates.pas
r350 r352 56 56 57 57 Fill(Offscreen.Canvas, 0, 0, ClientWidth, ClientHeight, 58 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);58 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 59 59 Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 60 60 Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 61 MainTexture. clBevelLight, MainTexture.clBevelShade);61 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 62 62 Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 63 MainTexture. clBevelLight, MainTexture.clBevelShade);63 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 64 64 65 65 BtnFrame(Offscreen.Canvas, CloseBtn.BoundsRect, MainTexture); … … 118 118 Frame(Offscreen.Canvas, x - 1, y - 1, x + max, y + 7, $000000, $000000); 119 119 RFrame(Offscreen.Canvas, x - 2, y - 2, x + max + 1, y + 8, 120 MainTexture. clBevelShade, MainTexture.clBevelLight);120 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 121 121 with Offscreen.Canvas do 122 122 begin … … 138 138 MyRO.LuxRate * 120 div 100, 0, 120, MainTexture); 139 139 RFrame(Offscreen.Canvas, ScienceBtn.Left - 1, LuxBtn.Top - 1, 140 LuxBtn.Left + 12, LuxBtn.Top + 12, MainTexture. clBevelShade,141 MainTexture. clBevelLight);142 end; 143 144 DLine(Offscreen.Canvas, 1, ClientWidth - 2, 154, MainTexture. clBevelShade,145 MainTexture. clBevelLight);140 LuxBtn.Left + 12, LuxBtn.Top + 12, MainTexture.ColorBevelShade, 141 MainTexture.ColorBevelLight); 142 end; 143 144 DLine(Offscreen.Canvas, 1, ClientWidth - 2, 154, MainTexture.ColorBevelShade, 145 MainTexture.ColorBevelLight); 146 146 RisedTextOut(Offscreen.Canvas, 16 + 80, 164, Phrases.Lookup('TAXRATE')); 147 147 s := Format('%d%%', [MyRO.TaxRate]); … … 151 151 MyRO.TaxRate * 120 div 100, 0, 120, MainTexture); 152 152 RFrame(Offscreen.Canvas, TaxUpBtn.Left - 1, TaxUpBtn.Top - 1, 153 TaxUpBtn.Left + 12, TaxDownBtn.Top + 12, MainTexture. clBevelShade,154 MainTexture. clBevelLight);153 TaxUpBtn.Left + 12, TaxDownBtn.Top + 12, MainTexture.ColorBevelShade, 154 MainTexture.ColorBevelLight); 155 155 156 156 MarkUsedOffscreen(ClientWidth, ClientHeight); -
trunk/LocalPlayer/Select.pas
r350 r352 202 202 begin 203 203 Frame(offscreen.Canvas, x + (16 - 1), y + (16 - 2), x + (16 + xSizeSmall), 204 y + (16 - 1 + ySizeSmall), MainTexture. clBevelLight,205 MainTexture. clBevelShade);204 y + (16 - 1 + ySizeSmall), MainTexture.ColorBevelLight, 205 MainTexture.ColorBevelShade); 206 206 if pix and cpType = 0 then 207 207 if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then … … 231 231 if y + TextSize.cy >= TitleHeight + InnerHeight then 232 232 TextSize.cy := TitleHeight + InnerHeight - y; 233 Fill(ca, x, y, TextSize.cx, TextSize.cy, ( wMaintexture- ClientWidth)234 div 2, ( hMaintexture- ClientHeight) div 2);233 Fill(ca, x, y, TextSize.cx, TextSize.cy, (Maintexture.Width - ClientWidth) 234 div 2, (Maintexture.Height - ClientHeight) div 2); 235 235 end; 236 236 LoweredTextOut(ca, Color, MainTexture, x, y, s); … … 260 260 begin 261 261 x := x + SideFrame; 262 y := y + TitleHeight 262 y := y + TitleHeight; 263 263 end; 264 264 if lit then 265 TextColor := MainTexture. clLitText265 TextColor := MainTexture.ColorLitText 266 266 else 267 267 TextColor := -1; … … 434 434 end; 435 435 if lit then 436 TextColor := MainTexture. clLitText436 TextColor := MainTexture.ColorLitText 437 437 else 438 438 TextColor := -1; … … 556 556 begin 557 557 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36), 558 y0 + 20, MainTexture. clBevelLight, MainTexture.clBevelShade);558 y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 559 559 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 223, 295) 560 560 end … … 562 562 begin 563 563 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36), 564 y0 + 20, MainTexture. clBevelLight, MainTexture.clBevelShade);564 y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 565 565 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 260, 295) 566 566 end … … 568 568 begin 569 569 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36), 570 y0 + 20, MainTexture. clBevelLight, MainTexture.clBevelShade);570 y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 571 571 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 38, 295) 572 572 end … … 575 575 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, 576 576 (8 + 16 + xSizeSmall), y0 + ySizeSmall, 577 MainTexture. clBevelLight, MainTexture.clBevelShade);577 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 578 578 if AdvIcon[lix] < 84 then 579 579 BitBltCanvas(offscreen.Canvas, (8 + 16), y0, xSizeSmall, … … 681 681 Frame(offscreen.Canvas, 8 + 16 - 1, y0 - 15 + (16 - 2), 682 682 8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall), 683 MainTexture. clBevelLight, MainTexture.clBevelShade);683 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 684 684 BitBltCanvas(offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1), 685 685 xSizeSmall, ySizeSmall, SmallImp.Canvas, … … 712 712 end; 713 713 if lit then 714 TextColor := MainTexture. clLitText714 TextColor := MainTexture.ColorLitText 715 715 else 716 716 TextColor := -1; … … 812 812 begin 813 813 Fill(Canvas, 9, ClientHeight - 29, ClientWidth - 18, 24, 814 ( wMaintexture- ClientWidth) div 2,815 ( hMaintexture- ClientHeight) div 2);814 (Maintexture.Width - ClientWidth) div 2, 815 (Maintexture.Height - ClientHeight) div 2); 816 816 if ScienceNation >= 0 then 817 817 begin … … 829 829 ScienceNationDot.Height, Canvas, xScreen - 10, ClientHeight - 27); 830 830 ImageOp_BCC(ScienceNationDotBuffer, Templates.Data, Point(0, 0), 831 ScienceNationDot.BoundsRect, MainTexture. clBevelShade, Tribe[ScienceNation].Color);831 ScienceNationDot.BoundsRect, MainTexture.ColorBevelShade, Tribe[ScienceNation].Color); 832 832 BitBltCanvas(Canvas, xScreen - 10, ClientHeight - 27, ScienceNationDot.Width, 833 833 ScienceNationDot.Height, ScienceNationDotBuffer.Canvas, 0, 0); … … 1532 1532 begin 1533 1533 LineDistance := 21; // looks ugly with scrollbar 1534 MaxLines := ( hMaintexture- (24 + TitleHeight + NarrowFrame))1534 MaxLines := (Maintexture.Height - (24 + TitleHeight + NarrowFrame)) 1535 1535 div LineDistance - 1; 1536 1536 end … … 1538 1538 begin 1539 1539 LineDistance := 24; 1540 MaxLines := ( hMaintexture- (24 + TitleHeight + WideFrame))1540 MaxLines := (Maintexture.Height - (24 + TitleHeight + WideFrame)) 1541 1541 div LineDistance - 1; 1542 1542 end; … … 1574 1574 ClientHeight := InnerHeight + TitleHeight + NarrowFrame; 1575 1575 end; 1576 assert(ClientHeight <= hMaintexture);1576 assert(ClientHeight <= Maintexture.Height); 1577 1577 1578 1578 TechNameSpace := 224; -
trunk/LocalPlayer/Term.pas
r346 r352 1691 1691 Controls[i].Visible := false; 1692 1692 me := -1; 1693 SetMainTextureByAge(-1);1693 MainTexture.Age := -1; 1694 1694 with Panel.Canvas do 1695 1695 begin … … 1728 1728 { if MyRO.Happened and phGameEnd<>0 then 1729 1729 begin 1730 Age :=3;1731 SetMainTextureByAge(-1);1730 Age := 3; 1731 MainTexture.Age := -1; 1732 1732 end 1733 1733 else } 1734 1734 begin 1735 1735 Age := GetAge(me); 1736 if SetMainTextureByAge(Age) then 1736 if MainTexture.Age <> Age then begin 1737 MainTexture.Age := Age; 1737 1738 EOT.Invalidate; // has visible background parts in its bounds 1739 end; 1738 1740 end; 1739 1741 // age:=MyRO.Turn mod 4; //!!! … … 1748 1750 begin 1749 1751 Age := 0; 1750 SetMainTextureByAge(-1);1752 MainTexture.Age := -1; 1751 1753 if ClientMode = cMovieTurn then 1752 1754 EOT.ButtonIndex := eotCancel … … 2538 2540 Age := 0; 2539 2541 if Command = cHelpOnly then 2540 SetMainTextureByAge(-1);2542 MainTexture.Age := -1; 2541 2543 Tribes.Init; 2542 2544 HelpDlg.UserLeft := (Screen.width - HelpDlg.width) div 2; … … 4265 4267 xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2, 4266 4268 xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + 2 + G.ly - 1, 4267 MainTexture. clMark, MainTexture.clMark)4269 MainTexture.ColorMark, MainTexture.ColorMark) 4268 4270 else 4269 4271 Frame(Panel.Canvas, 4270 4272 xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2 + yw, 4271 4273 xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + yw + MapHeight div yyt, 4272 MainTexture. clMark, MainTexture.clMark);4274 MainTexture.ColorMark, MainTexture.ColorMark); 4273 4275 end; 4274 4276 end; … … 4301 4303 begin 4302 4304 Fill(Panel.Canvas, 0, 3, xMidPanel + 7 - 10, PanelHeight - 3, 4303 wMainTexture - (xMidPanel + 7 - 10), hMainTexture- PanelHeight);4305 MainTexture.Width - (xMidPanel + 7 - 10), MainTexture.Height - PanelHeight); 4304 4306 Fill(Panel.Canvas, xRightPanel + 10 - 7, 3, Panel.width - xRightPanel - 10 + 4305 7, PanelHeight - 3, -(xRightPanel + 10 - 7), hMainTexture- PanelHeight);4307 7, PanelHeight - 3, -(xRightPanel + 10 - 7), MainTexture.Height - PanelHeight); 4306 4308 FillLarge(Panel.Canvas, xMidPanel - 2, PanelHeight - MidPanelHeight, 4307 4309 xRightPanel + 2, PanelHeight, ClientWidth div 2); … … 4315 4317 LineTo(xRightPanel, 0); 4316 4318 LineTo(ClientWidth, 0); 4317 Pen.Color := MainTexture. clBevelLight;4319 Pen.Color := MainTexture.ColorBevelLight; 4318 4320 MoveTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 2); 4319 4321 LineTo(xRightPanel + 10 - 8, PanelHeight - MidPanelHeight + 2); 4320 Pen.Color := MainTexture. clBevelLight;4322 Pen.Color := MainTexture.ColorBevelLight; 4321 4323 MoveTo(0, 1); 4322 4324 LineTo(xMidPanel + 7 - 9, 1); 4323 Pen.Color := MainTexture. clBevelShade;4325 Pen.Color := MainTexture.ColorBevelShade; 4324 4326 LineTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 1); 4325 Pen.Color := MainTexture. clBevelLight;4327 Pen.Color := MainTexture.ColorBevelLight; 4326 4328 LineTo(xRightPanel + 10 - 9, PanelHeight - MidPanelHeight + 1); 4327 Pen.Color := MainTexture. clBevelLight;4329 Pen.Color := MainTexture.ColorBevelLight; 4328 4330 LineTo(xRightPanel + 10 - 9, 1); 4329 4331 LineTo(ClientWidth, 1); … … 4333 4335 MoveTo(0, 2); 4334 4336 LineTo(xMidPanel + 7 - 10, 2); 4335 Pen.Color := MainTexture. clBevelShade;4337 Pen.Color := MainTexture.ColorBevelShade; 4336 4338 LineTo(xMidPanel + 7 - 10, PanelHeight); 4337 4339 Corner(Panel.Canvas, xMidPanel + 7 - 16, 1, 1, MainTexture); … … 4472 4474 ScreenTools.Frame(Panel.Canvas, xTroop + 1 + x, 4473 4475 yTroop + 6 - yyt div 2, xTroop + 2 * xxt - 1 + x, 4474 yTroop + 2 * yyt + 10, MainTexture. clMark, MainTexture.clMark);4476 yTroop + 2 * yyt + 10, MainTexture.ColorMark, MainTexture.ColorMark); 4475 4477 end; 4476 4478 end; … … 4590 4592 else 4591 4593 x := xTroop - 152; 4592 Pen.Color := MainTexture. clBevelShade;4594 Pen.Color := MainTexture.ColorBevelShade; 4593 4595 MoveTo(x - 1, PanelHeight - MidPanelHeight + 2); 4594 4596 LineTo(x - 1, PanelHeight); 4595 Pen.Color := MainTexture. clBevelLight;4597 Pen.Color := MainTexture.ColorBevelLight; 4596 4598 MoveTo(x, PanelHeight - MidPanelHeight + 2); 4597 4599 LineTo(x, PanelHeight); … … 4631 4633 ScreenTools.Frame(Panel.Canvas, xTroop + 3 + x, 4632 4634 yTroop + 2, xTroop + 63 + x, yTroop + 46, 4633 MainTexture. clMark, MainTexture.clMark);4635 MainTexture.ColorMark, MainTexture.ColorMark); 4634 4636 end 4635 4637 else if (unx.Master >= 0) and (unx.Master = UnFocus) then … … 4638 4640 xTroop + 64 + x, yTroop + 47, 8, $000000); 4639 4641 CFrame(Panel.Canvas, xTroop + 3 + x, yTroop + 2, 4640 xTroop + 63 + x, yTroop + 46, 8, MainTexture. clMark);4642 xTroop + 63 + x, yTroop + 46, 8, MainTexture.ColorMark); 4641 4643 end; 4642 4644 NoMapPanel.SetOutput(Panel); … … 4733 4735 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight + 4734 4736 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight + 4735 PanelHeight, MainTexture. clBevelShade, MainTexture.clBevelLight)4737 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight) 4736 4738 end; { if TroopLoc>=0 } 4737 4739 end; … … 4749 4751 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight + 4750 4752 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight + 4751 PanelHeight, MainTexture. clBevelShade, MainTexture.clBevelLight);4753 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4752 4754 end; 4753 4755 end; … … 4763 4765 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight + 4764 4766 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight + 4765 PanelHeight, MainTexture. clBevelShade, MainTexture.clBevelLight);4767 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4766 4768 end; 4767 4769 end; … … 4780 4782 MoveTo(0, TopBarHeight - 1); 4781 4783 LineTo(ClientWidth, TopBarHeight - 1); 4782 Pen.Color := MainTexture. clBevelShade;4784 Pen.Color := MainTexture.ColorBevelShade; 4783 4785 MoveTo(0, TopBarHeight - 2); 4784 4786 LineTo(ClientWidth, TopBarHeight - 2); 4785 4787 MoveTo(0, TopBarHeight - 3); 4786 4788 LineTo(ClientWidth, TopBarHeight - 3); 4787 Pen.Color := MainTexture. clBevelLight;4789 Pen.Color := MainTexture.ColorBevelLight; 4788 4790 ScreenTools.Frame(TopBar.Canvas, 40, -1, xTreasurySection - 1, 4789 TopBarHeight - 7, MainTexture. clBevelShade, MainTexture.clBevelLight);4791 TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4790 4792 ScreenTools.Frame(TopBar.Canvas, xResearchSection + 332, -1, ClientWidth, 4791 TopBarHeight - 7, MainTexture. clBevelShade, MainTexture.clBevelLight);4793 TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4792 4794 end; 4793 4795 if GameMode <> cMovie then … … 5224 5226 Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt), 5225 5227 yMini + 2, xMini + 1 + G.lx + MapWidth div (2 * xxt), 5226 yMini + 2 + G.ly - 1, MainTexture. clMark, MainTexture.clMark)5228 yMini + 2 + G.ly - 1, MainTexture.ColorMark, MainTexture.ColorMark) 5227 5229 else 5228 5230 Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt), 5229 5231 yMini + 2 + yw, xMini + 2 + G.lx + MapWidth div (2 * xxt) - 1, 5230 yMini + 2 + yw + MapHeight div yyt - 2, MainTexture. clMark,5231 MainTexture. clMark);5232 yMini + 2 + yw + MapHeight div yyt - 2, MainTexture.ColorMark, 5233 MainTexture.ColorMark); 5232 5234 end; 5233 5235 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2, … … 7492 7494 Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), 0, 7493 7495 x - xMini - 2 + MapWidth div (xxt * 2) - 1, G.ly - 1, 7494 MainTexture. clMark, MainTexture.clMark)7496 MainTexture.ColorMark, MainTexture.ColorMark) 7495 7497 else 7496 7498 Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), yw, 7497 7499 x - xMini - 2 + MapWidth div (xxt * 2) - 1, yw + MapHeight div yyt - 7498 2, MainTexture. clMark, MainTexture.clMark);7500 2, MainTexture.ColorMark, MainTexture.ColorMark); 7499 7501 BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly, 7500 7502 Buffer.Canvas, 0, 0); -
trunk/LocalPlayer/UnitStat.pas
r350 r352 98 98 procedure TUnitStatDlg.CheckAge; 99 99 begin 100 if MainTextureAge <> AgePrepared then 101 begin 102 AgePrepared := MainTextureAge; 100 if MainTexture.Age <> AgePrepared then begin 101 AgePrepared := MainTexture.Age; 103 102 BitBltCanvas(Back.Canvas, 0, 0, wCommon, hOwnModel, 104 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,105 ( hMainTexture- hOwnModel) div 2);103 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 104 (MainTexture.Height - hOwnModel) div 2); 106 105 BitBltCanvas(Back.Canvas, wCommon, 0, wCommon, hEnemyModel, 107 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,108 ( hMainTexture- hEnemyModel) div 2);106 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 107 (MainTexture.Height - hEnemyModel) div 2); 109 108 BitBltCanvas(Back.Canvas, 2 * wCommon, 0, wCommon, hEnemyUnit, 110 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,111 ( hMainTexture- hEnemyUnit) div 2);109 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 110 (MainTexture.Height - hEnemyUnit) div 2); 112 111 BitBltCanvas(Back.Canvas, 3 * wCommon, 0, wCommon, hEnemyCityDefense, 113 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,114 ( hMainTexture- hEnemyCityDefense) div 2);112 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 113 (MainTexture.Height - hEnemyCityDefense) div 2); 115 114 BitBltCanvas(Back.Canvas, 4 * wCommon, 0, wCommon, hEnemyCity, 116 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,117 ( hMainTexture- hEnemyCity) div 2);115 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 116 (MainTexture.Height - hEnemyCity) div 2); 118 117 ImageOp_B(Back, Template, 0, 0, 0, 0, 5 * wCommon, hMax); 119 end 118 end; 120 119 end; 121 120 … … 305 304 306 305 procedure FeatureBar(dst: TBitmap; x, y: integer; const mi: TModelInfo; 307 constT: TTexture);306 T: TTexture); 308 307 var 309 308 i, w, dx, num: integer; … … 371 370 end; { featurebar } 372 371 373 procedure NumberBarS(dst: TBitmap; x, y: integer; Cap, s: string; 374 const T: TTexture); 375 begin 376 DLine(dst.Canvas, x - 2, x + 170, y + 16, T.clBevelShade, T.clBevelLight); 372 procedure NumberBarS(dst: TBitmap; x, y: integer; Cap, s: string; T: TTexture); 373 begin 374 DLine(dst.Canvas, x - 2, x + 170, y + 16, T.ColorBevelShade, T.ColorBevelLight); 377 375 LoweredTextOut(dst.Canvas, -1, T, x - 2, y, Cap); 378 376 RisedTextout(dst.Canvas, x + 170 - BiColorTextWidth(dst.Canvas, s), y, s); … … 447 445 end; 448 446 Frame(offscreen.Canvas, x - 1, yImp - 1, x + xSizeSmall, 449 yImp + ySizeSmall, MainTexture. clBevelLight,450 MainTexture. clBevelShade);447 yImp + ySizeSmall, MainTexture.ColorBevelLight, 448 MainTexture.ColorBevelShade); 451 449 BitBltCanvas(offscreen.Canvas, x, yImp, xSizeSmall, ySizeSmall, 452 450 SmallImp.Canvas, j mod 7 * xSizeSmall, … … 527 525 begin 528 526 { Frame(offscreen.canvas,xView-1,yView-1,xView+64,yView+48, 529 MainTexture. clBevelShade,MainTexture.clBevelLight);527 MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); 530 528 RFrame(offscreen.canvas,xView-2,yView-2,xView+65,yView+49, 531 MainTexture. clBevelShade,MainTexture.clBevelLight); }529 MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); } 532 530 with offscreen.Canvas do 533 531 begin … … 615 613 Phrases.Lookup('UNITCOST')); 616 614 DLine(offscreen.Canvas, xTotal - 2, xTotal + 170, yTotal + 57 + 16, 617 MainTexture. clBevelShade, MainTexture.clBevelLight);615 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 618 616 if G.Difficulty[me] = 0 then 619 617 s := IntToStr(mi.cost) … … 636 634 (yTotal + StatDown - 19), Phrases.Lookup('UNITINTRO')); 637 635 DLine(offscreen.Canvas, xTotal - 2, xTotal + 170, 638 (yTotal + StatDown - 19) + 16, MainTexture. clTextShade,639 MainTexture. clTextLight);636 (yTotal + StatDown - 19) + 16, MainTexture.ColorTextShade, 637 MainTexture.ColorTextLight); 640 638 s := TurnToString(MyModel[mixShow].IntroTurn); 641 639 RisedTextout(offscreen.Canvas, -
trunk/LocalPlayer/Wonders.pas
r319 r352 199 199 200 200 Fill(Offscreen.Canvas, 3, 3, ClientWidth - 6, ClientHeight - 6, 201 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);201 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 202 202 Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 203 203 Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 204 MainTexture. clBevelLight, MainTexture.clBevelShade);204 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 205 205 Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 206 MainTexture. clBevelLight, MainTexture.clBevelShade);206 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 207 207 Corner(Offscreen.Canvas, 1, 1, 0, MainTexture); 208 208 Corner(Offscreen.Canvas, ClientWidth - 9, 1, 1, MainTexture); … … 230 230 Fill(Offscreen.Canvas, Center.X - xSizeBig div 2 + RingPosition[I].X - 3, 231 231 Center.Y - ySizeBig div 2 + RingPosition[I].Y - 3, xSizeBig + 6, 232 ySizeBig + 6, ( wMaintexture- ClientWidth) div 2,233 ( hMaintexture- ClientHeight) div 2);232 ySizeBig + 6, (Maintexture.Width - ClientWidth) div 2, 233 (Maintexture.Height - ClientHeight) div 2); 234 234 end; 235 235 WonderDestroyed: begin … … 308 308 begin 309 309 Fill(Canvas, 9, ClientHeight - 3 - 46, ClientWidth - 18, 44, 310 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);310 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 311 311 if Selection >= 0 then 312 312 begin … … 318 318 (ClientWidth-BiColorTextWidth(Canvas,S)) div 2+1, 319 319 ClientHeight-3-36+1, S); 320 Canvas.Font.Color:=MainTexture. clBevelLight;320 Canvas.Font.Color:=MainTexture.ColorBevelLight; 321 321 Canvas.TextOut( 322 322 (ClientWidth-BiColorTextWidth(Canvas,S)) div 2, -
trunk/NoTerm.pas
r350 r352 310 310 Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, $000000, $000000); 311 311 Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 312 MainTexture. clBevelLight, MainTexture.clBevelShade);312 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 313 313 Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 314 MainTexture. clBevelLight, MainTexture.clBevelShade);314 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 315 315 Corner(Canvas, 1, 1, 0, MainTexture); 316 316 Corner(Canvas, ClientWidth - 9, 1, 1, MainTexture); … … 325 325 begin 326 326 Frame(Canvas, xBrain[i] - 24, yBrain[i] - 8 - 16, xBrain[i] - 24 + 111, 327 yBrain[i] - 8 - 16 + 111, MainTexture. clBevelShade,328 MainTexture. clBevelShade);327 yBrain[i] - 8 - 16 + 111, MainTexture.ColorBevelShade, 328 MainTexture.ColorBevelShade); 329 329 FrameImage(Canvas, PlayersBrain[i].Picture, xBrain[i], 330 330 yBrain[i] - 16, 64, 64, 0, 0); -
trunk/Packages/CevoComponents/BaseWin.pas
r340 r352 292 292 procedure CornerFrame(x0, y0, x1, y1: integer); 293 293 begin 294 Frame(Canvas, x0 + 1, y0 + 1, x1 - 2, y1 - 2, MainTexture. clBevelLight,295 MainTexture. clBevelShade);296 Frame(Canvas, x0 + 2, y0 + 2, x1 - 3, y1 - 3, MainTexture. clBevelLight,297 MainTexture. clBevelShade);294 Frame(Canvas, x0 + 1, y0 + 1, x1 - 2, y1 - 2, MainTexture.ColorBevelLight, 295 MainTexture.ColorBevelShade); 296 Frame(Canvas, x0 + 2, y0 + 2, x1 - 3, y1 - 3, MainTexture.ColorBevelLight, 297 MainTexture.ColorBevelShade); 298 298 Corner(Canvas, x0 + 1, y0 + 1, 0, MainTexture); 299 299 Corner(Canvas, x1 - 9, y0 + 1, 1, MainTexture); … … 318 318 l := BiColorTextWidth(Canvas, Caption); 319 319 Cut := (ClientWidth - l) div 2; 320 xTexOffset := ( wMaintexture- ClientWidth) div 2;321 yTexOffset := ( hMaintexture- ClientHeight) div 2;320 xTexOffset := (Maintexture.Width - ClientWidth) div 2; 321 yTexOffset := (Maintexture.Height - ClientHeight) div 2; 322 322 if WideBottom then 323 323 InnerBottom := ClientHeight - WideFrame … … 345 345 Frame(Canvas, 0, FrameTop, ClientWidth - 1, FrameBottom - 1, 0, 0); 346 346 Frame(Canvas, SideFrame - 1, TitleHeight - 1, ClientWidth - SideFrame, 347 InnerBottom, MainTexture. clBevelShade, MainTexture.clBevelLight);347 InnerBottom, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 348 348 // RFrame(Canvas,SideFrame-2,TitleHeight-2,ClientWidth-SideFrame+1, 349 // InnerBottom+1,MainTexture. clBevelShade,MainTexture.clBevelLight);349 // InnerBottom+1,MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); 350 350 if FullCaption then 351 351 begin … … 367 367 4, xTexOffset, yTexOffset); 368 368 CornerFrame(0, FrameTop, ClientWidth, FrameBottom); 369 Pen.Color := MainTexture. clBevelShade;369 Pen.Color := MainTexture.ColorBevelShade; 370 370 MoveTo(3 + ModalFrameIndent, 2); 371 371 LineTo(3 + ModalFrameIndent, TitleHeight); 372 Pen.Color := MainTexture. clBevelShade;372 Pen.Color := MainTexture.ColorBevelShade; 373 373 MoveTo(4 + ModalFrameIndent, TitleHeight - 1); 374 374 LineTo(ClientWidth - 4 - ModalFrameIndent, TitleHeight - 1); 375 375 LineTo(ClientWidth - 4 - ModalFrameIndent, 1); 376 Pen.Color := MainTexture. clBevelLight;376 Pen.Color := MainTexture.ColorBevelLight; 377 377 MoveTo(ClientWidth - 5 - ModalFrameIndent, 2); 378 378 LineTo(4 + ModalFrameIndent, 2); … … 380 380 MoveTo(ClientWidth - 4 - ModalFrameIndent, 1); 381 381 LineTo(3 + ModalFrameIndent, 1); 382 Pen.Color := MainTexture. clBevelLight;382 Pen.Color := MainTexture.ColorBevelLight; 383 383 MoveTo(ClientWidth - 3 - ModalFrameIndent, 3); 384 384 LineTo(ClientWidth - 3 - ModalFrameIndent, TitleHeight); … … 397 397 398 398 Frame(Canvas, CaptionLeft + 1, 0 + 1, ClientWidth - CaptionLeft - 2, 399 TitleHeight - 1, MainTexture. clBevelLight, MainTexture.clBevelShade);399 TitleHeight - 1, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 400 400 Frame(Canvas, CaptionLeft + 2, 0 + 2, ClientWidth - CaptionLeft - 3, 401 TitleHeight - 1, MainTexture. clBevelLight, MainTexture.clBevelShade);401 TitleHeight - 1, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 402 402 Corner(Canvas, CaptionLeft + 1, 0 + 1, 0, MainTexture); 403 403 Corner(Canvas, ClientWidth - CaptionLeft - 9, 0 + 1, 1, MainTexture); … … 405 405 with Canvas do 406 406 begin 407 Pen.Color := MainTexture. clBevelShade;407 Pen.Color := MainTexture.ColorBevelShade; 408 408 MoveTo(CaptionLeft + 1, FrameTop + 2); 409 409 LineTo(CaptionLeft + 1, TitleHeight); 410 Pen.Color := MainTexture. clBevelLight;410 Pen.Color := MainTexture.ColorBevelLight; 411 411 MoveTo(ClientWidth - CaptionLeft - 2, FrameTop + 2); 412 412 LineTo(ClientWidth - CaptionLeft - 2, TitleHeight); … … 421 421 Frame(Canvas, CaptionLeft + 1, ClientHeight - WideFrame - 1 + 1, 422 422 ClientWidth - CaptionLeft - 2, ClientHeight - 2, 423 MainTexture. clBevelLight, MainTexture.clBevelShade);423 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 424 424 Frame(Canvas, CaptionLeft + 2, ClientHeight - WideFrame - 1 + 1, 425 425 ClientWidth - CaptionLeft - 3, ClientHeight - 3, 426 MainTexture. clBevelLight, MainTexture.clBevelShade);426 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 427 427 Corner(Canvas, CaptionLeft + 1, ClientHeight - 9, 2, MainTexture); 428 428 Corner(Canvas, ClientWidth - CaptionLeft - 9, ClientHeight - 9, 3, … … 431 431 with Canvas do 432 432 begin 433 Pen.Color := MainTexture. clBevelShade;433 Pen.Color := MainTexture.ColorBevelShade; 434 434 MoveTo(CaptionLeft + 1, ClientHeight - WideFrame); 435 435 LineTo(CaptionLeft + 1, FrameBottom - 2); 436 Pen.Color := MainTexture. clBevelLight;436 Pen.Color := MainTexture.ColorBevelLight; 437 437 MoveTo(ClientWidth - CaptionLeft - 2, ClientHeight - WideFrame); 438 438 LineTo(ClientWidth - CaptionLeft - 2, FrameBottom - 2); … … 486 486 begin 487 487 Fill(Offscreen.Canvas, Left, Top, Width, Height, 488 SideFrame + ( wMaintexture- ClientWidth) div 2,489 TitleHeight + ( hMaintexture- ClientHeight) div 2);488 SideFrame + (Maintexture.Width - ClientWidth) div 2, 489 TitleHeight + (Maintexture.Height - ClientHeight) div 2); 490 490 end; 491 491 -
trunk/Packages/CevoComponents/DrawDlg.pas
r347 r352 258 258 $000000, $000000); 259 259 Frame(Canvas, Border + 1, Border + 1, ClientWidth - (2 + Border), 260 ClientHeight - (2 + Border), MainTexture. clBevelLight,261 MainTexture. clBevelShade);260 ClientHeight - (2 + Border), MainTexture.ColorBevelLight, 261 MainTexture.ColorBevelShade); 262 262 Frame(Canvas, 2 + Border, 2 + Border, ClientWidth - (3 + Border), 263 ClientHeight - (3 + Border), MainTexture. clBevelLight,264 MainTexture. clBevelShade);263 ClientHeight - (3 + Border), MainTexture.ColorBevelLight, 264 MainTexture.ColorBevelShade); 265 265 SplitText(false); 266 266 -
trunk/Packages/CevoComponents/ScreenTools.pas
r347 r352 11 11 12 12 type 13 TTexture = record 13 14 { TTexture } 15 16 TTexture = class 17 private 18 FAge: Integer; 19 function GetHeight: Integer; 20 function GetWidth: Integer; 21 procedure SetAge(AValue: Integer); 22 public 14 23 Image: TBitmap; 15 clBevelLight: TColor; 16 clBevelShade: TColor; 17 clTextLight: TColor; 18 clTextShade: TColor; 19 clLitText: TColor; 20 clMark: TColor; 21 clPage: TColor; 22 clCover: TColor; 23 end; 24 ColorBevelLight: TColor; 25 ColorBevelShade: TColor; 26 ColorTextLight: TColor; 27 ColorTextShade: TColor; 28 ColorLitText: TColor; 29 ColorMark: TColor; 30 ColorPage: TColor; 31 ColorCover: TColor; 32 constructor Create; 33 destructor Destroy; override; 34 procedure Assign(Source: TTexture); 35 property Age: Integer read FAge write SetAge; 36 property Width: Integer read GetWidth; 37 property Height: Integer read GetHeight; 38 end; 39 24 40 TLoadGraphicFileOption = (gfNoError, gfNoGamma); 25 41 TLoadGraphicFileOptions = set of TLoadGraphicFileOption; … … 35 51 function TurnToString(Turn: integer): string; 36 52 function MovementToString(Movement: integer): string; 37 procedure BtnFrame(ca: TCanvas; p: TRect; constT: TTexture);38 procedure EditFrame(ca: TCanvas; p: TRect; constT: TTexture);53 procedure BtnFrame(ca: TCanvas; p: TRect; T: TTexture); 54 procedure EditFrame(ca: TCanvas; p: TRect; T: TTexture); 39 55 function HexStringToColor(S: string): integer; 40 56 function LoadGraphicFile(Bmp: TBitmap; FileName: string; Options: TLoadGraphicFileOptions = []): boolean; … … 74 90 procedure GlowFrame(Dst: TBitmap; x0, y0, Width, Height: integer; cl: TColor); 75 91 procedure InitOrnament; 76 procedure InitCityMark( constT: TTexture);92 procedure InitCityMark(T: TTexture); 77 93 procedure Fill(ca: TCanvas; Left, Top, Width, Height, xOffset, yOffset: integer); overload; 78 94 procedure Fill(Canvas: TCanvas; Rect: TRect; Offset: TPoint); overload; … … 83 99 const Texture: TBitmap); 84 100 procedure PaintBackground(Form: TForm; Left, Top, Width, Height: integer); 85 procedure Corner(ca: TCanvas; x, y, Kind: integer; constT: TTexture);101 procedure Corner(ca: TCanvas; x, y, Kind: integer; T: TTexture); 86 102 procedure BiColorTextOut(ca: TCanvas; clMain, clBack: TColor; x, y: integer; s: string); 87 procedure LoweredTextOut(ca: TCanvas; cl: TColor; constT: TTexture;103 procedure LoweredTextOut(ca: TCanvas; cl: TColor; T: TTexture; 88 104 x, y: integer; s: string); 89 105 function BiColorTextWidth(ca: TCanvas; s: string): integer; … … 95 111 procedure UnderlinedTitleValue(Canvas: TCanvas; Title, Value: string; X, Y, Width: Integer); 96 112 procedure NumberBar(dst: TBitmap; x, y: integer; Cap: string; val: integer; 97 constT: TTexture);113 T: TTexture); 98 114 procedure CountBar(dst: TBitmap; x, y, w: integer; Kind: integer; 99 Cap: string; val: integer; constT: TTexture);115 Cap: string; val: integer; T: TTexture); 100 116 procedure PaintProgressBar(ca: TCanvas; Kind, x, y, pos, Growth, max: integer; 101 constT: TTexture);117 T: TTexture); 102 118 procedure PaintRelativeProgressBar(ca: TCanvas; 103 119 Kind, x, y, size, pos, Growth, max: integer; IndicateComplete: boolean; 104 constT: TTexture);120 T: TTexture); 105 121 procedure PaintLogo(Canvas: TCanvas; X, Y, LightColor, ShadeColor: integer); 106 function SetMainTextureByAge(Age: integer): boolean;107 122 procedure LoadPhrases; 108 123 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Cardinal); … … 115 130 TransparentColor1 = $FF00FF; 116 131 TransparentColor2 = $7F007F; 117 118 wMainTexture = 640;119 hMainTexture = 480;120 132 121 133 // template positions in Templates.png … … 167 179 HGrSystem2: TGraphicSet; 168 180 ClickFrameColor: Integer; 169 MainTextureAge: Integer;170 181 MainTexture: TTexture; 171 182 Templates: TGraphicSet; … … 327 338 end; 328 339 329 procedure BtnFrame(ca: TCanvas; p: TRect; constT: TTexture);330 begin 331 RFrame(ca, p.Left - 1, p.Top - 1, p.Right, p.Bottom, T. clBevelShade,332 T. clBevelLight);333 end; 334 335 procedure EditFrame(ca: TCanvas; p: TRect; constT: TTexture);340 procedure BtnFrame(ca: TCanvas; p: TRect; T: TTexture); 341 begin 342 RFrame(ca, p.Left - 1, p.Top - 1, p.Right, p.Bottom, T.ColorBevelShade, 343 T.ColorBevelLight); 344 end; 345 346 procedure EditFrame(ca: TCanvas; p: TRect; T: TTexture); 336 347 begin 337 348 Frame(ca, p.Left - 1, p.Top - 1, p.Right, p.Bottom, $000000, $000000); 338 349 Frame(ca, p.Left - 2, p.Top - 2, p.Right + 1, p.Bottom + 1, $000000, $000000); 339 350 Frame(ca, p.Left - 3, p.Top - 3, p.Right + 2, p.Bottom + 1, $000000, $000000); 340 RFrame(ca, p.Left - 4, p.Top - 4, p.Right + 3, p.Bottom + 2, T. clBevelShade,341 T. clBevelLight);351 RFrame(ca, p.Left - 4, p.Top - 4, p.Right + 3, p.Bottom + 2, T.ColorBevelShade, 352 T.ColorBevelLight); 342 353 end; 343 354 … … 1041 1052 begin 1042 1053 if InitOrnamentDone then Exit; 1043 Light := ColorToColor32(MainTexture. clBevelLight);1044 // and $FCFCFC shr 2*3+MainTexture. clBevelShade and $FCFCFC shr 2;1045 Shade := ColorToColor32(MainTexture. clBevelShade and $FCFCFC shr 2 * 3 +1046 MainTexture. clBevelLight and $FCFCFC shr 2);1054 Light := ColorToColor32(MainTexture.ColorBevelLight); 1055 // and $FCFCFC shr 2*3+MainTexture.ColorBevelShade and $FCFCFC shr 2; 1056 Shade := ColorToColor32(MainTexture.ColorBevelShade and $FCFCFC shr 2 * 3 + 1057 MainTexture.ColorBevelLight and $FCFCFC shr 2); 1047 1058 HGrSystem2.Data.BeginUpdate; 1048 1059 PixelPtr := PixelPointer(HGrSystem2.Data, ScaleToNative(Ornament.Left), ScaleToNative(Ornament.Top)); … … 1072 1083 end; 1073 1084 1074 procedure InitCityMark( constT: TTexture);1085 procedure InitCityMark(T: TTexture); 1075 1086 var 1076 1087 x: Integer; … … 1085 1096 x, CityMark1.Top + y] and $FF; 1086 1097 HGrSystem.Data.Canvas.Pixels[CityMark2.Left + x, CityMark2.Top + y] := 1087 T. clMark and $FF * Intensity div $FF + T.clMark shr 8 and1088 $FF * Intensity div $FF shl 8 + T. clMark shr 16 and1098 T.ColorMark and $FF * Intensity div $FF + T.ColorMark shr 8 and 1099 $FF * Intensity div $FF shl 8 + T.ColorMark shr 16 and 1089 1100 $FF * Intensity div $FF shl 16; 1090 1101 end; … … 1097 1108 procedure Fill(ca: TCanvas; Left, Top, Width, Height, xOffset, yOffset: Integer); 1098 1109 begin 1099 Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= wMainTexture) and1100 (Top + yOffset >= 0) and (Top + yOffset + Height <= hMainTexture));1110 Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= MainTexture.Width) and 1111 (Top + yOffset >= 0) and (Top + yOffset + Height <= MainTexture.Height)); 1101 1112 BitBltCanvas(ca, Left, Top, Width, Height, MainTexture.Image.Canvas, 1102 1113 Left + xOffset, Top + yOffset); … … 1114 1125 n: integer; 1115 1126 begin 1116 n := (( hMainTexturediv 2) div (y1 - y0)) * 2;1117 while hMainTexture div 2 + (I + 1) * (y1 - y0) > hMainTexturedo1127 n := ((MainTexture.Height div 2) div (y1 - y0)) * 2; 1128 while MainTexture.Height div 2 + (I + 1) * (y1 - y0) > MainTexture.Height do 1118 1129 Dec(I, n); 1119 while hMainTexturediv 2 + I * (y1 - y0) < 0 do1130 while MainTexture.Height div 2 + I * (y1 - y0) < 0 do 1120 1131 Inc(I, n); 1121 1132 Result := I; … … 1125 1136 I: Integer; 1126 1137 begin 1127 for I := 0 to (x1 - xm) div wMainTexture- 1 do1128 BitBltCanvas(ca, xm + I * wMainTexture, y0, wMainTexture, y1 - y0,1129 MainTexture.Image.Canvas, 0, hMainTexturediv 2 + Band(I) *1138 for I := 0 to (x1 - xm) div MainTexture.Width - 1 do 1139 BitBltCanvas(ca, xm + I * MainTexture.Width, y0, MainTexture.Width, y1 - y0, 1140 MainTexture.Image.Canvas, 0, MainTexture.Height div 2 + Band(I) * 1130 1141 (y1 - y0)); 1131 BitBltCanvas(ca, xm + ((x1 - xm) div wMainTexture) * wMainTexture, y0,1132 x1 - (xm + ((x1 - xm) div wMainTexture) * wMainTexture), y1 - y0,1133 MainTexture.Image.Canvas, 0, hMainTexturediv 2 + Band(1134 (x1 - xm) div wMainTexture) * (y1 - y0));1135 for I := 0 to (xm - x0) div wMainTexture- 1 do1136 BitBltCanvas(ca, xm - (I + 1) * wMainTexture, y0, wMainTexture, y1 - y0,1137 MainTexture.Image.Canvas, 0, hMainTexturediv 2 +1142 BitBltCanvas(ca, xm + ((x1 - xm) div MainTexture.Width) * MainTexture.Width, y0, 1143 x1 - (xm + ((x1 - xm) div MainTexture.Width) * MainTexture.Width), y1 - y0, 1144 MainTexture.Image.Canvas, 0, MainTexture.Height div 2 + Band( 1145 (x1 - xm) div MainTexture.Width) * (y1 - y0)); 1146 for I := 0 to (xm - x0) div MainTexture.Width - 1 do 1147 BitBltCanvas(ca, xm - (I + 1) * MainTexture.Width, y0, MainTexture.Width, y1 - y0, 1148 MainTexture.Image.Canvas, 0, MainTexture.Height div 2 + 1138 1149 Band(-I - 1) * (y1 - y0)); 1139 BitBltCanvas(ca, x0, y0, xm - ((xm - x0) div wMainTexture) *1140 wMainTexture- x0, y1 - y0, MainTexture.Image.Canvas,1141 ((xm - x0) div wMainTexture + 1) * wMainTexture- (xm - x0),1142 hMainTexture div 2 + Band(-(xm - x0) div wMainTexture- 1) * (y1 - y0));1150 BitBltCanvas(ca, x0, y0, xm - ((xm - x0) div MainTexture.Width) * 1151 MainTexture.Width - x0, y1 - y0, MainTexture.Image.Canvas, 1152 ((xm - x0) div MainTexture.Width + 1) * MainTexture.Width - (xm - x0), 1153 MainTexture.Height div 2 + Band(-(xm - x0) div MainTexture.Width - 1) * (y1 - y0)); 1143 1154 end; 1144 1155 … … 1185 1196 procedure PaintBackground(Form: TForm; Left, Top, Width, Height: Integer); 1186 1197 begin 1187 Fill(Form.Canvas, Left, Top, Width, Height, ( wMainTexture- Form.ClientWidth) div1188 2, ( hMainTexture- Form.ClientHeight) div 2);1189 end; 1190 1191 procedure Corner(ca: TCanvas; x, y, Kind: Integer; constT: TTexture);1198 Fill(Form.Canvas, Left, Top, Width, Height, (MainTexture.Width - Form.ClientWidth) div 1199 2, (MainTexture.Height - Form.ClientHeight) div 2); 1200 end; 1201 1202 procedure Corner(ca: TCanvas; x, y, Kind: Integer; T: TTexture); 1192 1203 begin 1193 1204 { BitBltCanvas(ca,x,y,8,8,T.HGr.Mask.Canvas, … … 1284 1295 end; 1285 1296 1286 procedure LoweredTextOut(ca: TCanvas; cl: TColor; constT: TTexture;1297 procedure LoweredTextOut(ca: TCanvas; cl: TColor; T: TTexture; 1287 1298 x, y: Integer; s: string); 1288 1299 begin 1289 1300 if cl = -2 then 1290 BiColorTextOut(ca, (T. clBevelShade and $FEFEFE) shr 1,1291 T. clBevelLight, x, y, s)1301 BiColorTextOut(ca, (T.ColorBevelShade and $FEFEFE) shr 1, 1302 T.ColorBevelLight, x, y, s) 1292 1303 else if cl < 0 then 1293 BiColorTextOut(ca, T. clTextShade, T.clTextLight, x, y, s)1304 BiColorTextOut(ca, T.ColorTextShade, T.ColorTextLight, x, y, s) 1294 1305 else 1295 BiColorTextOut(ca, cl, T. clTextLight, x, y, s);1306 BiColorTextOut(ca, cl, T.ColorTextLight, x, y, s); 1296 1307 end; 1297 1308 … … 1368 1379 procedure UnderlinedTitleValue(Canvas: TCanvas; Title, Value: string; X, Y, Width: Integer); 1369 1380 begin 1370 DLine(Canvas, X, X + Width, Y + 19, MainTexture. clBevelLight, MainTexture.clBevelShade);1381 DLine(Canvas, X, X + Width, Y + 19, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 1371 1382 RisedTextOut(Canvas, X, Y, Title); 1372 1383 RisedTextOut(Canvas, X + Width - BiColorTextWidth(Canvas, Value), Y, Value); … … 1374 1385 1375 1386 procedure NumberBar(dst: TBitmap; x, y: integer; Cap: string; 1376 val: Integer; constT: TTexture);1387 val: Integer; T: TTexture); 1377 1388 var 1378 1389 s: string; … … 1380 1391 if val > 0 then 1381 1392 begin 1382 DLine(dst.Canvas, x - 2, x + 170, y + 16, T. clBevelShade,1383 T. clBevelLight);1393 DLine(dst.Canvas, x - 2, x + 170, y + 16, T.ColorBevelShade, 1394 T.ColorBevelLight); 1384 1395 LoweredTextOut(dst.Canvas, -1, T, x - 2, y, Cap); 1385 1396 s := IntToStr(val); … … 1390 1401 1391 1402 procedure CountBar(dst: TBitmap; x, y, w: Integer; Kind: Integer; 1392 Cap: string; val: Integer; constT: TTexture);1403 Cap: string; val: Integer; T: TTexture); 1393 1404 var 1394 1405 i, sd, ld, cl, xIcon, yIcon: Integer; … … 1403 1414 // xIcon:=x+100; 1404 1415 // yIcon:=y; 1405 // DLine(dst.Canvas,x-2,x+170+32,y+16,T. clBevelShade,T.clBevelLight);1416 // DLine(dst.Canvas,x-2,x+170+32,y+16,T.ColorBevelShade,T.ColorBevelLight); 1406 1417 1407 1418 xIcon := x - 5; 1408 1419 yIcon := y + 15; 1409 DLine(dst.Canvas, x - 2, xIcon + w + 2, yIcon + 16, T. clBevelShade,1410 T. clBevelLight);1420 DLine(dst.Canvas, x - 2, xIcon + w + 2, yIcon + 16, T.ColorBevelShade, 1421 T.ColorBevelLight); 1411 1422 1412 1423 s := IntToStr(val); … … 1486 1497 1487 1498 procedure PaintProgressBar(ca: TCanvas; Kind, x, y, pos, Growth, max: Integer; 1488 constT: TTexture);1499 T: TTexture); 1489 1500 var 1490 1501 i: Integer; … … 1504 1515 Growth := max - pos; 1505 1516 Frame(ca, x - 1, y - 1, x + max, y + 7, $000000, $000000); 1506 RFrame(ca, x - 2, y - 2, x + max + 1, y + 8, T. clBevelShade,1507 T. clBevelLight);1517 RFrame(ca, x - 2, y - 2, x + max + 1, y + 8, T.ColorBevelShade, 1518 T.ColorBevelLight); 1508 1519 with ca do 1509 1520 begin … … 1540 1551 procedure PaintRelativeProgressBar(ca: TCanvas; 1541 1552 Kind, x, y, size, pos, Growth, max: Integer; IndicateComplete: Boolean; 1542 constT: TTexture);1553 T: TTexture); 1543 1554 begin 1544 1555 if Growth > 0 then … … 1559 1570 LightColor, ShadeColor); 1560 1571 BitBltCanvas(Canvas, X, Y, Logo.Width, Logo.Height, LogoBuffer.Canvas, 0, 0); 1561 end;1562 1563 function SetMainTextureByAge(Age: Integer): Boolean;1564 begin1565 if Age <> MainTextureAge then1566 with MainTexture do begin1567 MainTextureAge := Age;1568 LoadGraphicFile(Image, GetGraphicsDir + DirectorySeparator +1569 'Texture' + IntToStr(Age + 1) + '.jpg');1570 clBevelLight := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelLight];1571 clBevelShade := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelShade];1572 clTextLight := Colors.Canvas.Pixels[clkAge0 + Age, cliTextLight];1573 clTextShade := Colors.Canvas.Pixels[clkAge0 + Age, cliTextShade];1574 clLitText := Colors.Canvas.Pixels[clkAge0 + Age, cliLitText];1575 clMark := Colors.Canvas.Pixels[clkAge0 + Age, cliMark];1576 clPage := Colors.Canvas.Pixels[clkAge0 + Age, cliPage];1577 clCover := Colors.Canvas.Pixels[clkAge0 + Age, cliCover];1578 Result := True;1579 end1580 else1581 Result := False;1582 1572 end; 1583 1573 … … 1795 1785 BigImp := TBitmap.Create; 1796 1786 BigImp.PixelFormat := pf24bit; 1797 MainTexture.Image := TBitmap.Create; 1798 MainTextureAge := -2; 1787 MainTexture := TTexture.Create; 1799 1788 ClickFrameColor := HGrSystem.Data.Canvas.Pixels[187, 175]; 1800 1789 InitOrnamentDone := False; … … 1819 1808 FreeAndNil(Paper); 1820 1809 FreeAndNil(Colors); 1821 FreeAndNil(MainTexture.Image); 1810 FreeAndNil(MainTexture); 1811 end; 1812 1813 { TTexture } 1814 1815 procedure TTexture.SetAge(AValue: Integer); 1816 begin 1817 if FAge = AValue then Exit; 1818 FAge := AValue; 1819 LoadGraphicFile(Image, GetGraphicsDir + DirectorySeparator + 1820 'Texture' + IntToStr(Age + 1) + '.jpg'); 1821 ColorBevelLight := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelLight]; 1822 ColorBevelShade := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelShade]; 1823 ColorTextLight := Colors.Canvas.Pixels[clkAge0 + Age, cliTextLight]; 1824 ColorTextShade := Colors.Canvas.Pixels[clkAge0 + Age, cliTextShade]; 1825 ColorLitText := Colors.Canvas.Pixels[clkAge0 + Age, cliLitText]; 1826 ColorMark := Colors.Canvas.Pixels[clkAge0 + Age, cliMark]; 1827 ColorPage := Colors.Canvas.Pixels[clkAge0 + Age, cliPage]; 1828 ColorCover := Colors.Canvas.Pixels[clkAge0 + Age, cliCover]; 1829 end; 1830 1831 function TTexture.GetHeight: Integer; 1832 begin 1833 Result := Image.Height; 1834 end; 1835 1836 function TTexture.GetWidth: Integer; 1837 begin 1838 Result := Image.Width; 1839 end; 1840 1841 constructor TTexture.Create; 1842 begin 1843 Image := TBitmap.Create; 1844 FAge := -2; 1845 end; 1846 1847 destructor TTexture.Destroy; 1848 begin 1849 FreeAndNil(Image); 1850 inherited; 1851 end; 1852 1853 procedure TTexture.Assign(Source: TTexture); 1854 begin 1855 FAge := Source.FAge; 1856 Image.Assign(Image); 1857 ColorBevelLight := Source.ColorBevelLight; 1858 ColorBevelShade := Source.ColorBevelShade; 1859 ColorTextLight := Source.ColorTextLight; 1860 ColorTextShade := Source.ColorTextShade; 1861 ColorLitText := Source.ColorLitText; 1862 ColorMark := Source.ColorMark; 1863 ColorPage := Source.ColorPage; 1864 ColorCover := Source.ColorCover; 1822 1865 end; 1823 1866 -
trunk/Settings.pas
r317 r352 141 141 Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 142 142 Frame(Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 143 MainTexture. clBevelLight, MainTexture.clBevelShade);143 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 144 144 Frame(Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 145 MainTexture. clBevelLight, MainTexture.clBevelShade);145 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 146 146 EditFrame(Canvas, List.BoundsRect, MainTexture); 147 147 BtnFrame(Canvas, OKBtn.BoundsRect, MainTexture); … … 149 149 150 150 RFrame(Canvas, ButtonFullscreen.Left - 1, ButtonFullscreen.Top - 1, 151 ButtonFullscreen.Left + 12, ButtonFullscreen.Top + 12, MainTexture. clBevelShade,152 MainTexture. clBevelLight);151 ButtonFullscreen.Left + 12, ButtonFullscreen.Top + 12, MainTexture.ColorBevelShade, 152 MainTexture.ColorBevelLight); 153 153 154 154 S := Phrases.Lookup('SETTINGS', 0); … … 164 164 begin 165 165 Languages.LoadToStrings(List.Items); 166 List.Font.Color := MainTexture. clMark;166 List.Font.Color := MainTexture.ColorMark; 167 167 LoadData; 168 168 end; -
trunk/Start.pas
r344 r352 537 537 begin 538 538 Frame(Canvas, 328, yMain + 112 - 15, ClientWidth, Up2Btn.top + 38, 539 MainTexture. clBevelShade, MainTexture.clBevelLight);539 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 540 540 if AutoDiff > 0 then 541 541 begin … … 543 543 yMain + 112 - 15 { Up1Btn.Top-12 }{ y0Brain-dyBrain } , 544 544 x0Brain + dxBrain + 64, Up2Btn.top + 38 { y0Brain+dyBrain+64 } , 545 MainTexture. clBevelShade, MainTexture.clBevelLight);545 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 546 546 end; 547 547 end 548 548 else if Page <> pgMain then 549 549 Frame(Canvas, 328, Up1Btn.top - 15, ClientWidth, Up2Btn.top + 38, 550 MainTexture. clBevelShade, MainTexture.clBevelLight);550 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 551 551 Frame(Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 552 552 553 553 // draw tabs 554 554 Frame(Canvas, 2, 2 + 2 * integer(Tab <> tbMain), TabOffset + (0 + 1) * TabSize - 1, 555 TabHeight, MainTexture. clBevelLight, MainTexture.clBevelShade);555 TabHeight, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 556 556 Frame(Canvas, 1, 1 + 2 * integer(Tab <> tbMain), TabOffset + (0 + 1) * TabSize, 557 TabHeight, MainTexture. clBevelLight, MainTexture.clBevelShade);558 Canvas.Pixels[1, 1 + 2 * integer(Tab <> tbMain)] := MainTexture. clBevelShade;557 TabHeight, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 558 Canvas.Pixels[1, 1 + 2 * integer(Tab <> tbMain)] := MainTexture.ColorBevelShade; 559 559 for Tab2 := tbMap to tbPrevious do 560 560 begin 561 561 Frame(Canvas, TabOffset + Integer(Tab2) * TabSize + 2, 2 + 2 * integer(Tab <> Tab2), 562 TabOffset + (Integer(Tab2) + 1) * TabSize - 1, TabHeight, MainTexture. clBevelLight,563 MainTexture. clBevelShade);562 TabOffset + (Integer(Tab2) + 1) * TabSize - 1, TabHeight, MainTexture.ColorBevelLight, 563 MainTexture.ColorBevelShade); 564 564 Frame(Canvas, TabOffset + Integer(Tab2) * TabSize + 1, 1 + 2 * integer(Tab <> Tab2), 565 TabOffset + (Integer(Tab2) + 1) * TabSize, TabHeight, MainTexture. clBevelLight,566 MainTexture. clBevelShade);565 TabOffset + (Integer(Tab2) + 1) * TabSize, TabHeight, MainTexture.ColorBevelLight, 566 MainTexture.ColorBevelShade); 567 567 Canvas.Pixels[TabOffset + Integer(Tab2) * TabSize + 1, 1 + 2 * integer(Tab <> Tab2)] := 568 MainTexture. clBevelShade;568 MainTexture.ColorBevelShade; 569 569 end; 570 570 Canvas.Font.Assign(UniFont[ftNormal]); … … 579 579 $000000, $000000); 580 580 Frame(Canvas, 1, TabHeight + 1, ClientWidth - 2, ClientHeight - 2, 581 MainTexture. clBevelLight, MainTexture.clBevelShade);581 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 582 582 Frame(Canvas, 2, TabHeight + 2, ClientWidth - 3, ClientHeight - 3, 583 MainTexture. clBevelLight, MainTexture.clBevelShade);583 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 584 584 if Tab = tbMain then 585 585 begin 586 586 PaintBackground(self, 3, TabHeight - 1, TabSize - 4 - 3 + TabOffset + 3, 4); 587 Canvas.Pixels[2, TabHeight] := MainTexture. clBevelLight;587 Canvas.Pixels[2, TabHeight] := MainTexture.ColorBevelLight; 588 588 end 589 589 else … … 592 592 TabSize - 4, 4); 593 593 Canvas.Pixels[TabOffset + Integer(Tab) * TabSize + 2, TabHeight] := 594 MainTexture. clBevelLight;594 MainTexture.ColorBevelLight; 595 595 end; 596 596 Canvas.Pixels[TabOffset + (Integer(Tab) + 1) * TabSize - 1, TabHeight + 1] := 597 MainTexture. clBevelShade;597 MainTexture.ColorBevelShade; 598 598 if Tab < tbPrevious then 599 599 Frame(Canvas, TabOffset + (Integer(Tab) + 1) * TabSize + 1, 3, 600 TabOffset + (Integer(Tab) + 1) * TabSize + 2, TabHeight, MainTexture. clBevelShade,601 MainTexture. clBevelShade); // Tab shadow600 TabOffset + (Integer(Tab) + 1) * TabSize + 2, TabHeight, MainTexture.ColorBevelShade, 601 MainTexture.ColorBevelShade); // Tab shadow 602 602 603 603 // Paint menu logo … … 685 685 HGrSystem2.Data.Canvas, Ornament.Left, Ornament.Top, SRCPAINT); 686 686 end; 687 PaintLogo(Canvas, 69 + 11 * 27, yLogo, MainTexture. clBevelLight,688 MainTexture. clBevelShade);687 PaintLogo(Canvas, 69 + 11 * 27, yLogo, MainTexture.ColorBevelLight, 688 MainTexture.ColorBevelShade); 689 689 690 690 for i := 0 to nPlOffered - 1 do … … 706 706 RFrame(Canvas, PlayerSlots[i].DiffUpBtn.left - 1, PlayerSlots[i].DiffUpBtn.top - 1, 707 707 PlayerSlots[i].DiffUpBtn.left + 12, PlayerSlots[i].DiffUpBtn.top + 24, 708 MainTexture. clBevelShade, MainTexture.clBevelLight);708 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 709 709 with Canvas do 710 710 begin … … 718 718 RFrame(Canvas, PlayerSlots[I].MultiBtn.left - 1, PlayerSlots[I].MultiBtn.top - 1, 719 719 PlayerSlots[I].MultiBtn.left + 12, PlayerSlots[I].MultiBtn.top + 12, 720 MainTexture. clBevelShade, MainTexture.clBevelLight);720 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 721 721 BitBltCanvas(Canvas, xBrain[i] - 31, yBrain[i], 13, 12, 722 722 HGrSystem.Data.Canvas, 88, 47); … … 733 733 else 734 734 begin 735 DLine(Canvas, 24, 198, yMain + 140 + 19, MainTexture. clBevelLight,736 MainTexture. clBevelShade);735 DLine(Canvas, 24, 198, yMain + 140 + 19, MainTexture.ColorBevelLight, 736 MainTexture.ColorBevelShade); 737 737 RisedTextOut(Canvas, 24 { x0Brain+32-BiColorTextWidth(Canvas,s) div 2 } , 738 738 yMain + 140 { y0Mini-77 } , Phrases.Lookup('STARTCONTROLS', 15)); … … 746 746 747 747 DLine(Canvas, 24, xDefault - 6, yMain + 164 + 19, 748 MainTexture. clBevelLight, MainTexture.clBevelShade);748 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 749 749 RisedTextOut(Canvas, 24 { x0Brain+32-BiColorTextWidth(Canvas,s) div 2 } , 750 750 yMain + 164 { y0Mini-77 } , Phrases.Lookup('STARTCONTROLS', 16)); … … 755 755 FrameImage(Canvas, BrainDefault.Picture, xDefault, yDefault, 64, 64, 756 756 0, 0, true); 757 DLine(Canvas, 56, 272, y0Mini + 61 + 19, MainTexture. clBevelLight,758 MainTexture. clBevelShade);757 DLine(Canvas, 56, 272, y0Mini + 61 + 19, MainTexture.ColorBevelLight, 758 MainTexture.ColorBevelShade); 759 759 760 760 RisedTextOut(Canvas, 56, y0Mini + 61, … … 771 771 HGrSystem2.Data.Canvas, Ornament.Left, Ornament.Top, SRCPAINT); 772 772 end; 773 PaintLogo(Canvas, 69, yLogo, MainTexture. clBevelLight,774 MainTexture. clBevelShade);773 PaintLogo(Canvas, 69, yLogo, MainTexture.ColorBevelLight, 774 MainTexture.ColorBevelShade); 775 775 end; 776 776 end … … 788 788 end 789 789 else 790 DLine(Canvas, 344, 514, y0Mini + 61 + 19, MainTexture. clBevelLight,791 MainTexture. clBevelShade);790 DLine(Canvas, 344, 514, y0Mini + 61 + 19, MainTexture.ColorBevelLight, 791 MainTexture.ColorBevelShade); 792 792 RisedTextOut(Canvas, 344, y0Mini + 61, Phrases.Lookup('STARTCONTROLS', 8)); 793 793 s := TurnToString(LoadTurn); … … 805 805 else if Page = pgEditMap then 806 806 begin 807 // DLine(Canvas,344,514,y0Mini+61+19,MainTexture. clBevelLight,MainTexture.clBevelShade);807 // DLine(Canvas,344,514,y0Mini+61+19,MainTexture.ColorBevelLight,MainTexture.ColorBevelShade); 808 808 s := Format(Phrases2.Lookup('MAPPROP'), 809 809 [(nMapLandTiles * 100 + 556) div 1112, … … 818 818 if Up2Btn.Visible then 819 819 RFrame(Canvas, Up2Btn.left - 1, Up2Btn.top - 1, Up2Btn.left + 12, 820 Up2Btn.top + 24, MainTexture. clBevelShade, MainTexture.clBevelLight);820 Up2Btn.top + 24, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 821 821 if Up1Btn.Visible then 822 822 RFrame(Canvas, Up1Btn.left - 1, Up1Btn.top - 1, Up1Btn.left + 12, 823 Up1Btn.top + 24, MainTexture. clBevelShade, MainTexture.clBevelLight);823 Up1Btn.top + 24, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 824 824 if AutoDiffUpBtn.Visible then 825 825 RFrame(Canvas, AutoDiffUpBtn.left - 1, AutoDiffUpBtn.top - 1, 826 AutoDiffUpBtn.left + 12, AutoDiffUpBtn.top + 24, MainTexture. clBevelShade,827 MainTexture. clBevelLight);826 AutoDiffUpBtn.left + 12, AutoDiffUpBtn.top + 24, MainTexture.ColorBevelShade, 827 MainTexture.ColorBevelLight); 828 828 if AutoEnemyUpBtn.Visible then 829 829 RFrame(Canvas, AutoEnemyUpBtn.left - 1, AutoEnemyUpBtn.top - 1, 830 830 AutoEnemyUpBtn.left + 12, AutoEnemyUpBtn.top + 24, 831 MainTexture. clBevelShade, MainTexture.clBevelLight);831 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 832 832 if CustomizeBtn.Visible then 833 833 RFrame(Canvas, CustomizeBtn.left - 1, CustomizeBtn.top - 1, 834 CustomizeBtn.left + 12, CustomizeBtn.top + 12, MainTexture. clBevelShade,835 MainTexture. clBevelLight);834 CustomizeBtn.left + 12, CustomizeBtn.top + 12, MainTexture.ColorBevelShade, 835 MainTexture.ColorBevelLight); 836 836 if List.Visible then 837 837 EditFrame(Canvas, List.BoundsRect, MainTexture); … … 848 848 yMini := y0Mini - MiniMap.Size.Y div 2; 849 849 Frame(Canvas, xMini, yMini, xMini + 3 + MiniMap.Size.X * 2, 850 yMini + 3 + MiniMap.Size.Y, MainTexture. clBevelLight,851 MainTexture. clBevelShade);850 yMini + 3 + MiniMap.Size.Y, MainTexture.ColorBevelLight, 851 MainTexture.ColorBevelShade); 852 852 Frame(Canvas, xMini + 1, yMini + 1, xMini + 2 + MiniMap.Size.X * 2, 853 yMini + 2 + MiniMap.Size.Y, MainTexture. clBevelShade,854 MainTexture. clBevelLight);853 yMini + 2 + MiniMap.Size.Y, MainTexture.ColorBevelShade, 854 MainTexture.ColorBevelLight); 855 855 856 856 s := ''; … … 878 878 procedure TStartDlg.FormShow(Sender: TObject); 879 879 begin 880 SetMainTextureByAge(-1);881 List.Font.Color := MainTexture. clMark;880 MainTexture.Age := -1; 881 List.Font.Color := MainTexture.ColorMark; 882 882 883 883 Fill(EmptyPicture.Canvas, Bounds(0, 0, 64, 64), 884 Point(( wMaintexture - 64) div 2, (hMaintexture- 64) div 2));884 Point((Maintexture.Width - 64) div 2, (Maintexture.Height - 64) div 2)); 885 885 886 886 DarkenImage(EmptyPicture, 28);
Note:
See TracChangeset
for help on using the changeset viewer.