Changeset 59 for trunk/Forms
- Timestamp:
- Sep 26, 2014, 12:05:30 AM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMove.lfm
r42 r59 1 1 object FormMove: TFormMove 2 Left = 7702 Left = 435 3 3 Height = 257 4 Top = 4844 Top = 165 5 5 Width = 320 6 6 ActiveControl = ButtonOk … … 8 8 ClientHeight = 257 9 9 ClientWidth = 320 10 OnCreate = FormCreate 10 11 OnShow = FormShow 11 LCLVersion = '1. 3'12 LCLVersion = '1.0.10.0' 12 13 object SpinEditOnce: TSpinEdit 13 14 Left = 208 14 Height = 3215 Top = 1615 Height = 27 16 Top = 32 16 17 Width = 98 17 18 OnChange = SpinEditOnceChange … … 20 21 object Label1: TLabel 21 22 Left = 24 22 Height = 2223 Top = 1624 Width = 4623 Height = 18 24 Top = 32 25 Width = 36 25 26 Caption = 'Once:' 26 27 ParentColor = False … … 29 30 Left = 184 30 31 Height = 25 31 Top = 2 0832 Top = 224 32 33 Width = 75 33 34 Caption = 'Ok' … … 39 40 Left = 72 40 41 Height = 25 41 Top = 2 0842 Top = 224 42 43 Width = 75 43 44 Caption = 'Cancel' … … 47 48 object Label2: TLabel 48 49 Left = 24 49 Height = 2250 Top = 1 2051 Width = 8750 Height = 18 51 Top = 136 52 Width = 66 52 53 Caption = 'Every turn:' 53 54 ParentColor = False … … 55 56 object SpinEditRepeat: TSpinEdit 56 57 Left = 208 57 Height = 3258 Top = 1 1258 Height = 27 59 Top = 128 59 60 Width = 98 60 61 OnChange = SpinEditRepeatChange … … 64 65 Left = 56 65 66 Height = 43 66 Top = 5567 Top = 71 67 68 Width = 208 68 69 OnChange = TrackBarOnceChange … … 76 77 Left = 56 77 78 Height = 43 78 Top = 1 5279 Top = 168 79 80 Width = 208 80 81 OnChange = TrackBarRepeatChange … … 88 89 Left = 8 89 90 Height = 25 90 Top = 6491 Top = 80 91 92 Width = 48 92 93 Caption = 'Min' 93 OnClick = uttonOnceMinClick94 OnClick = ButtonOnceMinClick 94 95 TabOrder = 6 95 96 end … … 97 98 Left = 264 98 99 Height = 25 99 Top = 64100 Top = 80 100 101 Width = 48 101 102 Anchors = [akTop, akRight] … … 107 108 Left = 8 108 109 Height = 25 109 Top = 1 60110 Top = 176 110 111 Width = 48 111 112 Caption = 'Min' … … 116 117 Left = 264 117 118 Height = 25 118 Top = 1 60119 Top = 176 119 120 Width = 48 120 121 Anchors = [akTop, akRight] … … 123 124 TabOrder = 9 124 125 end 126 object Label3: TLabel 127 Left = 16 128 Height = 18 129 Top = 8 130 Width = 96 131 Caption = 'Win probability:' 132 ParentColor = False 133 end 134 object LabelWinProbability: TLabel 135 Left = 232 136 Height = 18 137 Top = 8 138 Width = 10 139 Caption = ' ' 140 ParentColor = False 141 end 125 142 end -
trunk/Forms/UFormMove.lrt
r42 r59 8 8 TFORMMOVE.BUTTONREPEATMIN.CAPTION=Min 9 9 TFORMMOVE.BUTTONREPEATMAX.CAPTION=Max 10 TFORMMOVE.LABEL3.CAPTION=Win probability: 11 TFORMMOVE.LABELWINPROBABILITY.CAPTION= -
trunk/Forms/UFormMove.pas
r42 r59 22 22 Label1: TLabel; 23 23 Label2: TLabel; 24 Label3: TLabel; 25 LabelWinProbability: TLabel; 24 26 SpinEditOnce: TSpinEdit; 25 27 SpinEditRepeat: TSpinEdit; … … 28 30 procedure ButtonOnceMaxClick(Sender: TObject); 29 31 procedure ButtonRepeatMinClick(Sender: TObject); 30 procedure uttonOnceMinClick(Sender: TObject); 32 procedure FormCreate(Sender: TObject); 33 procedure ButtonOnceMinClick(Sender: TObject); 31 34 procedure ButtonRepeatMaxClick(Sender: TObject); 32 35 procedure FormShow(Sender: TObject); … … 38 41 { private declarations } 39 42 public 40 { public declarations } 43 DefendCount: Integer; 44 procedure UpdateView; 41 45 end; 42 46 … … 47 51 48 52 {$R *.lfm} 53 54 uses 55 UCore; 49 56 50 57 { TFormMove } … … 62 69 end; 63 70 71 procedure TFormMove.UpdateView; 72 begin 73 LabelWinProbability.Caption := 74 IntToStr(Round(Core.Game.AttackProbability(SpinEditOnce.Value, 75 DefendCount) * 100)) + ' %'; 76 end; 77 64 78 procedure TFormMove.SpinEditOnceChange(Sender: TObject); 65 79 begin 66 80 if SpinEditOnce.Value <> TrackBarOnce.Position then 67 81 TrackBarOnce.Position := SpinEditOnce.Value; 82 UpdateView; 68 83 end; 69 84 … … 71 86 begin 72 87 ButtonOk.SetFocus; 88 UpdateView; 73 89 end; 74 90 … … 83 99 end; 84 100 85 procedure TFormMove.uttonOnceMinClick(Sender: TObject); 101 procedure TFormMove.FormCreate(Sender: TObject); 102 begin 103 104 end; 105 106 procedure TFormMove.ButtonOnceMinClick(Sender: TObject); 86 107 begin 87 108 TrackBarOnce.Position := TrackBarOnce.Min;
Note:
See TracChangeset
for help on using the changeset viewer.