Changeset 315 for trunk/Start.pas


Ignore:
Timestamp:
Mar 18, 2021, 10:58:28 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: Gamma was incorrectly applied to images with transparency colors.
  • Modified: Change Templates to GraphicSet so it can also have description of its items.
  • Modified: Use TextExtent instead of both TextWidth and TextHeight.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r314 r315  
    55
    66uses
    7   GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area,
     7  GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area, Types,
    88  LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls,
    99  Menus, Registry, DrawDlg, fgl, Protocol;
     
    671671  AIBrains: TBrains;
    672672  I: Integer;
     673  TextSize: TSize;
    673674begin
    674675  AIBrains := TBrains.Create(False);
     
    684685        Font.Style := [];
    685686        Font.Color := $5FDBFF;
    686         Textout(32 - TextWidth(FileName) div 2,
    687           32 - TextHeight(FileName) div 2, FileName);
     687        TextSize := TextExtent(FileName);
     688        Textout(32 - TextSize.Width div 2,
     689          32 - TextSize.Height div 2, FileName);
    688690      end;
    689691    end;
     
    830832    3 + 2 * integer(Tab <> tbMain));
    831833
    832   ImageOp_BCC(LogoBuffer, Templates, 0, 0, 145, 38, 36, 27, $BFBF20, $4040DF);
     834  ImageOp_BCC(LogoBuffer, Templates.Data, 0, 0, 145, 38, 36, 27, $BFBF20, $4040DF);
    833835  // logo part 1
    834   ImageOp_BCC(LogoBuffer, Templates, 10, 27, 155, 38 + 27, 26, 9, $BFBF20,
     836  ImageOp_BCC(LogoBuffer, Templates.Data, 10, 27, 155, 38 + 27, 26, 9, $BFBF20,
    835837    $4040DF); // logo part 2
    836838  BitBltCanvas(Canvas, 6, 3 + 2 * integer(Tab <> tbMain), 36, 36,
     
    879881              BitBltCanvas(LogoBuffer.Canvas, 0, 0, 91, 25, Canvas,
    880882                xActionIcon, y + 2);
    881               ImageOp_BCC(LogoBuffer, Templates, 0, 0, 1, 400, 91, 25, 0,
     883              ImageOp_BCC(LogoBuffer, Templates.Data, 0, 0, 1, 400, 91, 25, 0,
    882884                Colors.Canvas.Pixels[clkAge0 - 1, cliDimmedText]);
    883885              BitBltCanvas(Canvas, xActionIcon, y + 2, 91, 25,
Note: See TracChangeset for help on using the changeset viewer.