- Timestamp:
- Nov 3, 2014, 8:04:02 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r76 r78 162 162 begin 163 163 if RedrawPending then begin 164 RedrawPending := False;164 if not Core.DevelMode then RedrawPending := False; 165 165 TimerPeriod := (9 * TimerPeriod + (Now - LastTimerTime)) / 10; 166 166 LastTimerTime := Now; -
trunk/UGame.pas
r77 r78 7 7 uses 8 8 Classes, SysUtils, ExtCtrls, Graphics, Contnrs, XMLConf, XMLRead, XMLWrite, 9 DOM, Math, FileUtil, UXMLUtils, Dialogs ;9 DOM, Math, FileUtil, UXMLUtils, Dialogs, Types; 10 10 11 11 const … … 929 929 TextPos: TPoint; 930 930 Points: array of TPoint; 931 TextSize: TSize; 931 932 begin 932 933 with Canvas do begin … … 957 958 Pen.Style := psSolid; 958 959 Font.Color := clWhite; 960 Brush.Style := bsClear; 959 961 Font.Size := Trunc(42 * View.Zoom); 960 962 TextPos := View.CellToCanvasPos(Pos); 961 TextOut(Round(TextPos.X) - TextWidth(Text) div 2, Round(TextPos.Y) - TextHeight(Text) div 2, Text); 963 TextSize := TextExtent(Text); 964 TextOut(Round(TextPos.X) - TextSize.cx div 2, Round(TextPos.Y) - TextSize.cy div 2, Text); 962 965 end; 963 966 end;
Note:
See TracChangeset
for help on using the changeset viewer.