Changeset 82 for trunk/Forms


Ignore:
Timestamp:
Nov 5, 2014, 9:51:30 AM (10 years ago)
Author:
chronos
Message:
  • Added: New game option "Fog of war" which cause map to be covered to black and only explored cells will be visible.
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r79 r82  
    128128begin
    129129  DrawStart := Now;
    130   if Assigned(Core.Game.CurrentPlayer) then
    131   with Core.Game.CurrentPlayer do begin
     130  if Assigned(Core.Player) then
     131  with Core.Player do begin
    132132    View.DestRect := Bounds(0, 0, PaintBox1.Width, PaintBox1.Height);
    133133    if csOpaque in PaintBox1.ControlStyle then begin
     
    151151procedure TFormMain.PaintBox1Resize(Sender: TObject);
    152152begin
    153   if Assigned(Core.Game.CurrentPlayer) then
    154   with Core.Game.CurrentPlayer do
     153  if Assigned(Core.Player) then
     154  with Core.Player do
    155155    View.DestRect := Bounds(0, 0, PaintBox1.Width, PaintBox1.Height);
    156156  Redraw;
     
    240240  MapRect: TRect;
    241241begin
    242   with Core.Game, CurrentPlayer, View do begin
     242  with Core, Game, Player, View do begin
    243243    MapRect := Map.GetPixelRect;
    244244    Factor := FloatPoint((DestRect.Right - DestRect.Left) / (MapRect.Right - MapRect.Left),
     
    271271procedure TFormMain.AZoomInExecute(Sender: TObject);
    272272begin
    273   with Core.Game.CurrentPlayer do begin
     273  with Core.Player do begin
    274274    View.Zoom := View.Zoom * ZoomFactor;
    275275  end;
     
    281281  D: TPoint;
    282282begin
    283   with Core.Game.CurrentPlayer do begin
     283  with Core.Player do begin
    284284    //D := Point(Trunc(MousePos.X - View.Left / ViewZoom),
    285285    //  Trunc(MousePos.Y - View.Top / ViewZoom));
  • trunk/Forms/UFormNew.lfm

    r75 r82  
    4545    Top = 5
    4646    Width = 745
    47     ActivePage = TabSheet1
     47    ActivePage = TabSheet3
    4848    Align = alTop
    4949    Anchors = [akTop, akLeft, akRight, akBottom]
    50     TabIndex = 0
     50    TabIndex = 2
    5151    TabOrder = 3
    5252    object TabSheet1: TTabSheet
     
    407407        TabOrder = 2
    408408      end
     409      object CheckBoxFogOfWar: TCheckBox
     410        Left = 336
     411        Height = 27
     412        Top = 24
     413        Width = 120
     414        Caption = 'Fog of war'
     415        TabOrder = 3
     416      end
    409417    end
    410418  end
  • trunk/Forms/UFormNew.lrt

    r75 r82  
    2525TFORMNEW.LABEL6.CAPTION=Win objective:
    2626TFORMNEW.RADIOGROUPGROWAMOUNT.CAPTION=Per turn grow amount
     27TFORMNEW.CHECKBOXFOGOFWAR.CAPTION=Fog of war
    2728TFORMNEW.APLAYERMODIFY.CAPTION=Modify player
    2829TFORMNEW.APLAYERADD.CAPTION=Add
  • trunk/Forms/UFormNew.pas

    r76 r82  
    2424    ButtonPlayerModify: TButton;
    2525    ButtonPlayerRemove: TButton;
     26    CheckBoxFogOfWar: TCheckBox;
    2627    CheckBoxCity: TCheckBox;
    2728    CheckBoxSymetricMap: TCheckBox;
     
    351352  ComboBoxMapShape.ItemIndex := Integer(Game.Map.Shape);
    352353  EditImageFile.Text := Game.MapImageFileName;
     354  CheckBoxFogOfWar.Checked := Game.FogOfWar;
    353355end;
    354356
     
    379381  Game.Map.Shape := TMapShape(ComboBoxMapShape.ItemIndex);
    380382  Game.MapImageFileName := EditImageFile.Text;
     383  Game.FogOfWar := CheckBoxFogOfWar.Checked;
    381384end;
    382385
Note: See TracChangeset for help on using the changeset viewer.