Changeset 198 for trunk/Start.pas


Ignore:
Timestamp:
May 8, 2020, 12:03:34 AM (5 years ago)
Author:
chronos
Message:
  • Fixed: Mini map was sometimes shown in wrong Start form tabs due uninitialized variables and wrong code scope.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r196 r198  
    55
    66uses
    7   GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area, Math,
     7  GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area,
    88  LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls,
    99  Menus, Registry, DrawDlg, fgl, Protocol;
     
    10771077      yMini + 2 + MiniMap.Size.Y, MainTexture.clBevelShade,
    10781078      MainTexture.clBevelLight);
    1079   end;
    1080   s := '';
    1081   if MiniMap.Mode = mmPicture then
    1082   begin
    1083     BitBltCanvas(Canvas, xMini + 2, yMini + 2, MiniMap.Size.X * 2, MiniMap.Size.Y,
    1084       MiniMap.Bitmap.Canvas, 0, 0);
    1085     if Page = pgStartRandom then
    1086       s := Phrases.Lookup('RANMAP')
    1087   end
    1088   else if MiniMap.Mode = mmMultiPlayer then
    1089     s := Phrases.Lookup('MPMAP')
    1090   else if Page = pgStartMap then
    1091     s := Copy(MapFileName, 1, Length(MapFileName) - 9)
    1092   else if Page = pgEditMap then
    1093     s := List.Items[List.ItemIndex]
    1094   else if Page = pgNoLoad then
    1095     s := Phrases.Lookup('NOGAMES');
    1096   if s <> '' then
    1097     RisedTextOut(Canvas, x0Mini + 2 - BiColorTextWidth(Canvas, s) div 2,
    1098       y0Mini - 8, s);
     1079
     1080    s := '';
     1081    if MiniMap.Mode = mmPicture then
     1082    begin
     1083      BitBltCanvas(Canvas, xMini + 2, yMini + 2, MiniMap.Size.X * 2, MiniMap.Size.Y,
     1084        MiniMap.Bitmap.Canvas, 0, 0);
     1085      if Page = pgStartRandom then
     1086        s := Phrases.Lookup('RANMAP')
     1087    end
     1088    else if MiniMap.Mode = mmMultiPlayer then
     1089      s := Phrases.Lookup('MPMAP')
     1090    else if Page = pgStartMap then
     1091      s := Copy(MapFileName, 1, Length(MapFileName) - 9)
     1092    else if Page = pgEditMap then
     1093      s := List.Items[List.ItemIndex]
     1094    else if Page = pgNoLoad then
     1095      s := Phrases.Lookup('NOGAMES');
     1096    if s <> '' then
     1097      RisedTextOut(Canvas, x0Mini + 2 - BiColorTextWidth(Canvas, s) div 2,
     1098        y0Mini - 8, s);
     1099  end;
    10991100end;
    11001101
Note: See TracChangeset for help on using the changeset viewer.