Changeset 26 for trunk


Ignore:
Timestamp:
Mar 3, 2014, 12:59:49 AM (11 years ago)
Author:
chronos
Message:
  • Fixed: Computer couldn't attack some cells.
  • Added: Move dialog now have trackbar control to easily set desired value.
Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Languages/xtactics.cs.po

    r23 r26  
    4848msgstr "."
    4949
     50#: tformmove.buttoncancel.caption
     51msgid "Cancel"
     52msgstr ""
     53
     54#: tformmove.buttonok.caption
     55msgid "Ok"
     56msgstr ""
     57
     58#: tformmove.caption
     59msgid "Move"
     60msgstr ""
     61
     62#: tformmove.label1.caption
     63msgid "Once:"
     64msgstr ""
     65
     66#: tformmove.label2.caption
     67msgid "Every turn:"
     68msgstr ""
     69
    5070#: ucore.splayerwins
    5171msgctxt "ucore.splayerwins"
  • trunk/Languages/xtactics.po

    r23 r26  
    3939msgstr ""
    4040
     41#: tformmove.buttoncancel.caption
     42msgid "Cancel"
     43msgstr ""
     44
     45#: tformmove.buttonok.caption
     46msgid "Ok"
     47msgstr ""
     48
     49#: tformmove.caption
     50msgid "Move"
     51msgstr ""
     52
     53#: tformmove.label1.caption
     54msgid "Once:"
     55msgstr ""
     56
     57#: tformmove.label2.caption
     58msgid "Every turn:"
     59msgstr ""
     60
    4161#: ucore.splayerwins
    4262msgctxt "ucore.splayerwins"
  • trunk/UCore.pas

    r25 r26  
    6060    else FormMove.SpinEditOnce.MaxValue := CellFrom.GetAvialPower;
    6161  FormMove.SpinEditOnce.Value := CountOnce;
     62  FormMove.TrackBarOnce.Max := FormMove.SpinEditOnce.MaxValue;
     63  FormMove.TrackBarOnce.Position := FormMove.SpinEditOnce.Value;
    6264  FormMove.SpinEditRepeat.MaxValue := Game.Map.MaxPower;
    6365  FormMove.SpinEditRepeat.Value := CountRepeat;
     66  FormMove.TrackBarRepeat.Max := FormMove.SpinEditRepeat.MaxValue;
     67  FormMove.TrackBarRepeat.Position := FormMove.SpinEditRepeat.Value;
    6468  if FormMove.ShowModal = mrOk then begin
    6569    CountOnce := FormMove.SpinEditOnce.Value;
  • trunk/UFormMove.lfm

    r12 r26  
    1414    Top = 16
    1515    Width = 98
     16    OnChange = SpinEditOnceChange
    1617    TabOrder = 0
    1718  end
    1819  object Label1: TLabel
    19     Left = 32
     20    Left = 24
    2021    Height = 22
    21     Top = 32
     22    Top = 16
    2223    Width = 46
    2324    Caption = 'Once:'
     
    2728    Left = 192
    2829    Height = 25
    29     Top = 193
     30    Top = 200
    3031    Width = 75
    3132    Caption = 'Ok'
     
    3738    Left = 72
    3839    Height = 25
    39     Top = 192
     40    Top = 200
    4041    Width = 75
    4142    Caption = 'Cancel'
     
    4445  end
    4546  object Label2: TLabel
    46     Left = 32
     47    Left = 24
    4748    Height = 22
    48     Top = 104
     49    Top = 120
    4950    Width = 87
    5051    Caption = 'Every turn:'
     
    5455    Left = 208
    5556    Height = 32
    56     Top = 96
     57    Top = 112
    5758    Width = 98
     59    OnChange = SpinEditRepeatChange
    5860    TabOrder = 3
    5961  end
     62  object TrackBarOnce: TTrackBar
     63    Left = 8
     64    Height = 43
     65    Top = 55
     66    Width = 296
     67    OnChange = TrackBarOnceChange
     68    Position = 0
     69    TickStyle = tsNone
     70    Anchors = [akTop, akLeft, akRight]
     71    TabOrder = 4
     72  end
     73  object TrackBarRepeat: TTrackBar
     74    Left = 8
     75    Height = 43
     76    Top = 152
     77    Width = 304
     78    OnChange = TrackBarRepeatChange
     79    Position = 0
     80    TickStyle = tsNone
     81    Anchors = [akTop, akLeft, akRight]
     82    TabOrder = 5
     83  end
    6084end
  • trunk/UFormMove.pas

    r12 r26  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Spin,
    9   StdCtrls;
     9  StdCtrls, ComCtrls;
    1010
    1111type
     
    2020    SpinEditOnce: TSpinEdit;
    2121    SpinEditRepeat: TSpinEdit;
     22    TrackBarOnce: TTrackBar;
     23    TrackBarRepeat: TTrackBar;
     24    procedure SpinEditOnceChange(Sender: TObject);
     25    procedure SpinEditRepeatChange(Sender: TObject);
     26    procedure TrackBarOnceChange(Sender: TObject);
     27    procedure TrackBarRepeatChange(Sender: TObject);
    2228  private
    2329    { private declarations }
     
    3339{$R *.lfm}
    3440
     41{ TFormMove }
     42
     43procedure TFormMove.TrackBarOnceChange(Sender: TObject);
     44begin
     45  if SpinEditOnce.Value <> TrackBarOnce.Position then
     46    SpinEditOnce.Value := TrackBarOnce.Position;
     47end;
     48
     49procedure TFormMove.TrackBarRepeatChange(Sender: TObject);
     50begin
     51  if SpinEditRepeat.Value <> TrackBarRepeat.Position then
     52    SpinEditRepeat.Value := TrackBarRepeat.Position;
     53end;
     54
     55procedure TFormMove.SpinEditOnceChange(Sender: TObject);
     56begin
     57  if SpinEditOnce.Value <> TrackBarOnce.Position then
     58    TrackBarOnce.Position := SpinEditOnce.Value;
     59end;
     60
     61procedure TFormMove.SpinEditRepeatChange(Sender: TObject);
     62begin
     63  if SpinEditRepeat.Value <> TrackBarRepeat.Position then
     64    TrackBarRepeat.Position := SpinEditRepeat.Value;
     65end;
     66
    3567end.
    3668
  • trunk/UGame.pas

    r25 r26  
    329329      for I := 0 to Length(Cells) - 1 do
    330330      if (Cells[I].Terrain <> ttVoid) and (Cells[I].Player <> Self) then begin
    331         if I = 0 then begin
     331        if Target = nil then begin
    332332          MinPower := Cells[I].Power;
    333333          Target := Cells[I];
Note: See TracChangeset for help on using the changeset viewer.