Changeset 522 for trunk/Packages/CevoComponents/ScreenTools.pas
- Timestamp:
- Jan 7, 2024, 10:24:51 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/ScreenTools.pas
r518 r522 87 87 procedure VDarkGradient(Canvas: TCanvas; X, Y, Height, Kind: Integer); 88 88 procedure UnderlinedTitleValue(Canvas: TCanvas; Title, Value: string; X, Y, Width: Integer); 89 procedure NumberBar(Dst: TBitmap; X, Y: Integer; Cap: string; val: Integer;89 procedure NumberBar(Dst: TBitmap; X, Y: Integer; Cap: string; Val: Integer; 90 90 T: TTexture); 91 91 procedure CountBar(Dst: TBitmap; X, Y, W: Integer; Kind: Integer; 92 Cap: string; val: Integer; T: TTexture);92 Cap: string; Val: Integer; T: TTexture); 93 93 procedure PaintProgressBar(Canvas: TCanvas; Kind, X, Y, Pos, Growth, Max: Integer; 94 94 T: TTexture); … … 1397 1397 1398 1398 procedure NumberBar(Dst: TBitmap; X, Y: Integer; Cap: string; 1399 val: Integer; T: TTexture);1399 Val: Integer; T: TTexture); 1400 1400 var 1401 1401 S: string; 1402 1402 begin 1403 if val > 0 then1403 if Val > 0 then 1404 1404 begin 1405 1405 DLine(Dst.Canvas, X - 2, X + 170, Y + 16, T.ColorBevelShade, 1406 1406 T.ColorBevelLight); 1407 1407 LoweredTextOut(Dst.Canvas, -1, T, X - 2, Y, Cap); 1408 S := IntToStr( val);1408 S := IntToStr(Val); 1409 1409 RisedTextOut(Dst.Canvas, X + 170 - BiColorTextWidth(Dst.Canvas, 1410 1410 S), Y, S); … … 1413 1413 1414 1414 procedure CountBar(Dst: TBitmap; X, Y, W: Integer; Kind: Integer; 1415 Cap: string; val: Integer; T: TTexture);1415 Cap: string; Val: Integer; T: TTexture); 1416 1416 var 1417 1417 I, sd, ld, cl, xIcon, yIcon: Integer; 1418 1418 S: string; 1419 1419 begin 1420 // val:=random(40); //!!!1421 if val = 0 then1420 // Val := Random(40); //!!! 1421 if Val = 0 then 1422 1422 Exit; 1423 1423 Assert(Kind >= 0); … … 1433 1433 T.ColorBevelLight); 1434 1434 1435 S := IntToStr( val);1436 if val < 0 then1435 S := IntToStr(Val); 1436 if Val < 0 then 1437 1437 cl := $0000FF 1438 1438 else … … 1442 1442 xIcon + W + 2 - BiColorTextWidth(Dst.Canvas, S), yIcon, S); 1443 1443 1444 if (Kind = 12) and ( val >= 100) then1444 if (Kind = 12) and (Val >= 100) then 1445 1445 begin // science with symbol for 100 1446 val := val div 10;1447 sd := 14 * ( val div 10 + val mod 10 - 1);1446 Val := Val div 10; 1447 sd := 14 * (Val div 10 + Val mod 10 - 1); 1448 1448 if sd = 0 then 1449 1449 sd := 1; … … 1452 1452 else 1453 1453 ld := W - 44; 1454 for I := 0 to val mod 10 - 1 do1454 for I := 0 to Val mod 10 - 1 do 1455 1455 begin 1456 1456 BitBltCanvas(Dst.Canvas, xIcon + 4 + I * (14 * ld div sd), yIcon + 2 + 1, 14, … … 1460 1460 14, 14, 67 + Kind mod 8 * 15, 70 + Kind div 8 * 15); 1461 1461 end; 1462 for I := 0 to val div 10 - 1 do1462 for I := 0 to Val div 10 - 1 do 1463 1463 begin 1464 BitBltCanvas(Dst.Canvas, xIcon + 4 + ( val mod 10) *1464 BitBltCanvas(Dst.Canvas, xIcon + 4 + (Val mod 10) * 1465 1465 (14 * ld div sd) + I * (14 * ld div sd), yIcon + 3, 14, 14, 1466 1466 HGrSystem.Mask.Canvas, 67 + 7 mod 8 * 15, 1467 1467 70 + 7 div 8 * 15, SRCAND); 1468 Sprite(Dst, HGrSystem, xIcon + 3 + ( val mod 10) *1468 Sprite(Dst, HGrSystem, xIcon + 3 + (Val mod 10) * 1469 1469 (14 * ld div sd) + I * (14 * ld div sd), yIcon + 2, 14, 1470 1470 14, 67 + 7 mod 8 * 15, … … 1474 1474 else 1475 1475 begin 1476 val := abs(val);1477 if val mod 10 = 0 then1478 sd := 14 * ( val div 10 - 1)1476 Val := Abs(Val); 1477 if Val mod 10 = 0 then 1478 sd := 14 * (Val div 10 - 1) 1479 1479 else 1480 sd := 10 * ( val mod 10 - 1) + 14 * (val div 10);1480 sd := 10 * (Val mod 10 - 1) + 14 * (Val div 10); 1481 1481 if sd = 0 then 1482 1482 sd := 1; … … 1485 1485 else 1486 1486 ld := W - 44; 1487 for I := 0 to val div 10 - 1 do1487 for I := 0 to Val div 10 - 1 do 1488 1488 begin 1489 1489 BitBltCanvas(Dst.Canvas, xIcon + 4 + I * (14 * ld div sd), yIcon + 3, 14, 14, … … 1493 1493 14, 14, 67 + Kind mod 8 * 15, 70 + Kind div 8 * 15); 1494 1494 end; 1495 for I := 0 to val mod 10 - 1 do1495 for I := 0 to Val mod 10 - 1 do 1496 1496 begin 1497 BitBltCanvas(Dst.Canvas, xIcon + 4 + ( val div 10) *1497 BitBltCanvas(Dst.Canvas, xIcon + 4 + (Val div 10) * 1498 1498 (14 * ld div sd) + I * (10 * ld div sd), yIcon + 7, 10, 10, 1499 1499 HGrSystem.Mask.Canvas, 66 + Kind mod 11 * 11, 1500 1500 115 + Kind div 11 * 11, SRCAND); 1501 Sprite(Dst, HGrSystem, xIcon + 3 + ( val div 10) *1501 Sprite(Dst, HGrSystem, xIcon + 3 + (Val div 10) * 1502 1502 (14 * ld div sd) + I * (10 * ld div sd), yIcon + 6, 10, 1503 1503 10, 66 + Kind mod 11 * 11,
Note:
See TracChangeset
for help on using the changeset viewer.