Changeset 496 for trunk/Start.pas


Ignore:
Timestamp:
Dec 18, 2023, 10:31:54 PM (11 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r479 r496  
    264264  for I := 0 to PlayerSlots.Count - 1 do
    265265  with PlayerSlots[I] do begin
    266     DiffUpBtn := TButtonC.Create(self);
     266    DiffUpBtn := TButtonC.Create(Self);
    267267    DiffUpBtn.Graphic := HGrSystem.Data;
    268     DiffUpBtn.left := xBrain[I] - 18;
    269     DiffUpBtn.top := yBrain[I] + 39;
     268    DiffUpBtn.Left := xBrain[I] - 18;
     269    DiffUpBtn.Top := yBrain[I] + 39;
    270270    DiffUpBtn.ButtonIndex := 1;
    271     DiffUpBtn.Parent := self;
     271    DiffUpBtn.Parent := Self;
    272272    DiffUpBtn.OnClick := DiffBtnClick;
    273     DiffDownBtn := TButtonC.Create(self);
     273    DiffDownBtn := TButtonC.Create(Self);
    274274    DiffDownBtn.Graphic := HGrSystem.Data;
    275     DiffDownBtn.left := xBrain[I] - 18;
    276     DiffDownBtn.top := yBrain[I] + 51;
     275    DiffDownBtn.Left := xBrain[I] - 18;
     276    DiffDownBtn.Top := yBrain[I] + 51;
    277277    DiffDownBtn.ButtonIndex := 0;
    278     DiffDownBtn.Parent := self;
     278    DiffDownBtn.Parent := Self;
    279279    DiffDownBtn.OnClick := DiffBtnClick;
    280280  end;
    281281  for I := 6 to 8 do
    282282  with PlayerSlots[I] do begin
    283     MultiBtn := TButtonC.Create(self);
     283    MultiBtn := TButtonC.Create(Self);
    284284    MultiBtn.Graphic := HGrSystem.Data;
    285     MultiBtn.left := xBrain[I] - 18;
    286     MultiBtn.top := yBrain[I];
    287     MultiBtn.Parent := self;
     285    MultiBtn.Left := xBrain[I] - 18;
     286    MultiBtn.Top := yBrain[I];
     287    MultiBtn.Parent := Self;
    288288    MultiBtn.OnClick := MultiBtnClick;
    289289    OfferMultiple := True;
     
    291291
    292292  X := BiColorTextWidth(Canvas, Phrases.Lookup('STARTCONTROLS', 7)) div 2;
    293   CustomizeBtn.left := x0Brain + 32 - 16 - X;
     293  CustomizeBtn.Left := x0Brain + 32 - 16 - X;
    294294  if AutoDiff < 0 then
    295295    CustomizeBtn.ButtonIndex := 3
     
    352352    begin
    353353      with Controls[I].BoundsRect do
    354         r1 := CreateRectRgn(left, top, Right, Bottom);
     354        r1 := CreateRectRgn(Left, Top, Right, Bottom);
    355355      CombineRgn(r0, r0, r1, RGN_DIFF);
    356356      DeleteObject(r1);
     
    619619  if Tab = tbMain then
    620620  begin
    621     PaintBackground(self, 3, TabHeight - 1, TabSize - 4 - 3 + TabOffset + 3, 4);
     621    PaintBackground(Self, 3, TabHeight - 1, TabSize - 4 - 3 + TabOffset + 3, 4);
    622622    Canvas.Pixels[2, TabHeight] := MainTexture.ColorBevelLight;
    623623  end
    624624  else
    625625  begin
    626     PaintBackground(self, TabOffset + 3 + Integer(Tab) * TabSize, TabHeight - 1,
     626    PaintBackground(Self, TabOffset + 3 + Integer(Tab) * TabSize, TabHeight - 1,
    627627      TabSize - 4, 4);
    628628    Canvas.Pixels[TabOffset + Integer(Tab) * TabSize + 2, TabHeight] :=
     
    738738            Frame(Canvas, xBrain[I] - 19, yBrain[I] + 18, xBrain[I] - 18 + 12,
    739739              yBrain[I] + (19 + 14), $000000, $000000);
    740             RFrame(Canvas, PlayerSlots[I].DiffUpBtn.left - 1, PlayerSlots[I].DiffUpBtn.top - 1,
    741               PlayerSlots[I].DiffUpBtn.left + 12, PlayerSlots[I].DiffUpBtn.top + 24,
     740            RFrame(Canvas, PlayerSlots[I].DiffUpBtn.Left - 1, PlayerSlots[I].DiffUpBtn.Top - 1,
     741              PlayerSlots[I].DiffUpBtn.Left + 12, PlayerSlots[I].DiffUpBtn.Top + 24,
    742742              MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    743743            with Canvas do
     
    750750            if PlayerSlots[I].OfferMultiple then
    751751            begin
    752               RFrame(Canvas, PlayerSlots[I].MultiBtn.left - 1, PlayerSlots[I].MultiBtn.top - 1,
    753                 PlayerSlots[I].MultiBtn.left + 12, PlayerSlots[I].MultiBtn.top + 12,
     752              RFrame(Canvas, PlayerSlots[I].MultiBtn.Left - 1, PlayerSlots[I].MultiBtn.Top - 1,
     753                PlayerSlots[I].MultiBtn.Left + 12, PlayerSlots[I].MultiBtn.Top + 12,
    754754                MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    755755              BitBltCanvas(Canvas, xBrain[I] - 31, yBrain[I], 13, 12,
     
    850850    BtnFrame(Canvas, StartBtn.BoundsRect, MainTexture);
    851851  if Up2Btn.Visible then
    852     RFrame(Canvas, Up2Btn.left - 1, Up2Btn.top - 1, Up2Btn.left + 12,
    853       Up2Btn.top + 24, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
     852    RFrame(Canvas, Up2Btn.Left - 1, Up2Btn.Top - 1, Up2Btn.Left + 12,
     853      Up2Btn.Top + 24, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    854854  if Up1Btn.Visible then
    855     RFrame(Canvas, Up1Btn.left - 1, Up1Btn.top - 1, Up1Btn.left + 12,
    856       Up1Btn.top + 24, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
     855    RFrame(Canvas, Up1Btn.Left - 1, Up1Btn.Top - 1, Up1Btn.Left + 12,
     856      Up1Btn.Top + 24, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    857857  if AutoDiffUpBtn.Visible then
    858     RFrame(Canvas, AutoDiffUpBtn.left - 1, AutoDiffUpBtn.top - 1,
    859       AutoDiffUpBtn.left + 12, AutoDiffUpBtn.top + 24, MainTexture.ColorBevelShade,
     858    RFrame(Canvas, AutoDiffUpBtn.Left - 1, AutoDiffUpBtn.Top - 1,
     859      AutoDiffUpBtn.Left + 12, AutoDiffUpBtn.Top + 24, MainTexture.ColorBevelShade,
    860860      MainTexture.ColorBevelLight);
    861861  if AutoEnemyUpBtn.Visible then
    862     RFrame(Canvas, AutoEnemyUpBtn.left - 1, AutoEnemyUpBtn.top - 1,
    863       AutoEnemyUpBtn.left + 12, AutoEnemyUpBtn.top + 24,
     862    RFrame(Canvas, AutoEnemyUpBtn.Left - 1, AutoEnemyUpBtn.Top - 1,
     863      AutoEnemyUpBtn.Left + 12, AutoEnemyUpBtn.Top + 24,
    864864      MainTexture.ColorBevelShade, MainTexture.ColorBevelLight);
    865865  if CustomizeBtn.Visible then
    866     RFrame(Canvas, CustomizeBtn.left - 1, CustomizeBtn.top - 1,
    867       CustomizeBtn.left + 12, CustomizeBtn.top + 12, MainTexture.ColorBevelShade,
     866    RFrame(Canvas, CustomizeBtn.Left - 1, CustomizeBtn.Top - 1,
     867      CustomizeBtn.Left + 12, CustomizeBtn.Top + 12, MainTexture.ColorBevelShade,
    868868      MainTexture.ColorBevelLight);
    869869  if List.Visible then
     
    11761176            end;
    11771177            SmartInvalidate(xBrain[I] - 31, yBrain[I] - 1, xBrain[I] + 64,
    1178               PlayerSlots[I].DiffUpBtn.top + 25);
     1178              PlayerSlots[I].DiffUpBtn.Top + 25);
    11791179          end;
    11801180        BrainTerm.Flags := BrainTerm.Flags and not fUsed;
     
    11821182    end;
    11831183    SmartInvalidate(xBrain[PlayerPopupIndex] - 31, yBrain[PlayerPopupIndex] - 1,
    1184       xBrain[PlayerPopupIndex] + 64, PlayerSlots[PlayerPopupIndex].DiffUpBtn.top + 25);
     1184      xBrain[PlayerPopupIndex] + 64, PlayerSlots[PlayerPopupIndex].DiffUpBtn.Top + 25);
    11851185  end;
    11861186end;
     
    15071507        InitPopup(I);
    15081508        if yBrain[I] > y0Brain then
    1509           PopupMenu1.Popup(left + xBrain[I] + 4, top + yBrain[I] + 60)
     1509          PopupMenu1.Popup(Left + xBrain[I] + 4, Top + yBrain[I] + 60)
    15101510        else
    1511           PopupMenu1.Popup(left + xBrain[I] + 4, top + yBrain[I] + 4);
     1511          PopupMenu1.Popup(Left + xBrain[I] + 4, Top + yBrain[I] + 4);
    15121512      end;
    15131513  end
     
    15201520    begin
    15211521      InitPopup(-1);
    1522       PopupMenu1.Popup(left + xDefault + 4, top + yDefault + 4);
     1522      PopupMenu1.Popup(Left + xDefault + 4, Top + yDefault + 4);
    15231523    end
    15241524  else if (Page = pgLoad) and (LastTurn > 0) and (Y >= yTurnSlider) and
Note: See TracChangeset for help on using the changeset viewer.