Changeset 47 for trunk/Forms
- Timestamp:
- Apr 24, 2019, 11:41:52 AM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNewGame.lfm
r46 r47 1 object NewGameForm: TNewGameForm1 object FormNewGame: TFormNewGame 2 2 Left = 579 3 Height = 6503 Height = 542 4 4 Top = 226 5 Width = 10155 Width = 846 6 6 Caption = 'New game' 7 ClientHeight = 6508 ClientWidth = 10159 DesignTimePPI = 1 447 ClientHeight = 542 8 ClientWidth = 846 9 DesignTimePPI = 120 10 10 OnCreate = FormCreate 11 11 OnDestroy = FormDestroy 12 12 OnShow = FormShow 13 LCLVersion = '2.0. 0.4'13 LCLVersion = '2.0.2.0' 14 14 object ButtonStart: TButton 15 Left = 88816 Height = 3 717 Top = 60018 Width = 11315 Left = 740 16 Height = 31 17 Top = 500 18 Width = 94 19 19 Anchors = [akRight, akBottom] 20 20 Caption = 'Start' … … 24 24 end 25 25 object ButtonCancel: TButton 26 Left = 75627 Height = 3 728 Top = 60029 Width = 11326 Left = 630 27 Height = 31 28 Top = 500 29 Width = 94 30 30 Anchors = [akRight, akBottom] 31 31 Caption = 'Cancel' … … 35 35 end 36 36 object Label1: TLabel 37 Left = 1 238 Height = 2 639 Top = 040 Width = 6637 Left = 10 38 Height = 20 39 Top = 8 40 Width = 49 41 41 Caption = 'Players:' 42 42 ParentColor = False … … 44 44 end 45 45 object ListView1: TListView 46 Left = 1 247 Height = 55248 Top = 3 649 Width = 44246 Left = 10 47 Height = 460 48 Top = 30 49 Width = 368 50 50 Anchors = [akTop, akLeft, akBottom] 51 51 Checkboxes = True … … 53 53 item 54 54 Caption = 'Name' 55 Width = 22655 Width = 188 56 56 end 57 57 item 58 58 Caption = 'Color' 59 Width = 7459 Width = 62 60 60 end 61 61 item 62 62 Caption = 'Controls' 63 Width = 22763 Width = 189 64 64 end> 65 65 OwnerData = True … … 75 75 end 76 76 object ColorButton1: TColorButton 77 Left = 75678 Height = 3 779 Top = 9680 Width = 11377 Left = 634 78 Height = 31 79 Top = 112 80 Width = 94 81 81 BorderWidth = 2 82 82 ButtonColorSize = 16 … … 86 86 end 87 87 object Label2: TLabel 88 Left = 60089 Height = 2 690 Top = 1 0191 Width = 6588 Left = 500 89 Height = 20 90 Top = 116 91 Width = 51 92 92 Caption = 'Color 1:' 93 93 ParentColor = False … … 95 95 end 96 96 object GroupBox1: TGroupBox 97 Left = 58898 Height = 36899 Top = 184100 Width = 40897 Left = 490 98 Height = 243 99 Top = 208 100 Width = 340 101 101 Caption = 'Control keys' 102 ClientHeight = 341103 ClientWidth = 406102 ClientHeight = 218 103 ClientWidth = 336 104 104 ParentFont = False 105 105 TabOrder = 3 106 106 object EditUp: TEdit 107 Left = 1 30108 Height = 43107 Left = 108 108 Height = 28 109 109 Top = 2 110 Width = 1 20110 Width = 100 111 111 OnChange = EditUpChange 112 112 OnKeyDown = EditUpKeyDown … … 115 115 end 116 116 object Label3: TLabel 117 Left = 10118 Height = 2 6119 Top = 1 4120 Width = 2 9117 Left = 8 118 Height = 20 119 Top = 12 120 Width = 22 121 121 Caption = 'Up:' 122 122 ParentColor = False … … 124 124 end 125 125 object Label4: TLabel 126 Left = 10127 Height = 2 6128 Top = 62129 Width = 54126 Left = 8 127 Height = 20 128 Top = 52 129 Width = 42 130 130 Caption = 'Down:' 131 131 ParentColor = False … … 133 133 end 134 134 object EditDown: TEdit 135 Left = 1 30136 Height = 43137 Top = 4 8138 Width = 1 20135 Left = 108 136 Height = 28 137 Top = 40 138 Width = 100 139 139 OnChange = EditDownChange 140 140 OnKeyDown = EditDownKeyDown … … 143 143 end 144 144 object Label5: TLabel 145 Left = 10146 Height = 2 6147 Top = 110148 Width = 37145 Left = 8 146 Height = 20 147 Top = 92 148 Width = 28 149 149 Caption = 'Left:' 150 150 ParentColor = False … … 152 152 end 153 153 object EditLeft: TEdit 154 Left = 1 30155 Height = 43156 Top = 98157 Width = 1 20154 Left = 108 155 Height = 28 156 Top = 82 157 Width = 100 158 158 OnChange = EditLeftChange 159 159 OnKeyDown = EditLeftKeyDown … … 162 162 end 163 163 object Label6: TLabel 164 Left = 10165 Height = 2 6166 Top = 1 58167 Width = 50164 Left = 8 165 Height = 20 166 Top = 132 167 Width = 38 168 168 Caption = 'Right:' 169 169 ParentColor = False … … 171 171 end 172 172 object EditRight: TEdit 173 Left = 1 30174 Height = 43175 Top = 1 46176 Width = 1 20173 Left = 108 174 Height = 28 175 Top = 122 176 Width = 100 177 177 OnChange = EditRightChange 178 178 OnKeyDown = EditRightKeyDown … … 181 181 end 182 182 object Label7: TLabel 183 Left = 10184 Height = 2 6185 Top = 206186 Width = 55183 Left = 8 184 Height = 20 185 Top = 172 186 Width = 42 187 187 Caption = 'Shoot:' 188 188 ParentColor = False … … 190 190 end 191 191 object EditShoot: TEdit 192 Left = 1 30193 Height = 43194 Top = 1 94195 Width = 1 20192 Left = 108 193 Height = 28 194 Top = 162 195 Width = 100 196 196 OnChange = EditShootChange 197 197 OnKeyDown = EditShootKeyDown … … 201 201 end 202 202 object EditName: TEdit 203 Left = 720204 Height = 43205 Top = 3 6206 Width = 2 64203 Left = 600 204 Height = 28 205 Top = 30 206 Width = 220 207 207 OnChange = EditNameChange 208 208 ParentFont = False … … 210 210 end 211 211 object Label8: TLabel 212 Left = 600213 Height = 2 6214 Top = 4 8215 Width = 56212 Left = 500 213 Height = 20 214 Top = 40 215 Width = 43 216 216 Caption = 'Name:' 217 217 ParentColor = False … … 219 219 end 220 220 object Label9: TLabel 221 Left = 600222 Height = 2 6223 Top = 14 1224 Width = 65221 Left = 500 222 Height = 20 223 Top = 145 224 Width = 51 225 225 Caption = 'Color 2:' 226 226 ParentColor = False … … 228 228 end 229 229 object ColorButton2: TColorButton 230 Left = 756231 Height = 3 7232 Top = 1 36233 Width = 113230 Left = 634 231 Height = 31 232 Top = 145 233 Width = 94 234 234 BorderWidth = 2 235 235 ButtonColorSize = 16 … … 238 238 ParentFont = False 239 239 end 240 object CheckBoxEnabled: TCheckBox 241 Left = 504 242 Height = 24 243 Top = 80 244 Width = 78 245 Caption = 'Enabled' 246 OnChange = CheckBoxEnabledChange 247 TabOrder = 5 248 end 240 249 end -
trunk/Forms/UFormNewGame.lrj
r46 r47 1 1 {"version":1,"strings":[ 2 {"hash":211211125,"name":"tnewgameform.caption","sourcebytes":[78,101,119,32,103,97,109,101],"value":"New game"}, 3 {"hash":5941396,"name":"tnewgameform.buttonstart.caption","sourcebytes":[83,116,97,114,116],"value":"Start"}, 4 {"hash":77089212,"name":"tnewgameform.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 {"hash":42978330,"name":"tnewgameform.label1.caption","sourcebytes":[80,108,97,121,101,114,115,58],"value":"Players:"}, 6 {"hash":346165,"name":"tnewgameform.listview1.columns[0].caption","sourcebytes":[78,97,109,101],"value":"Name"}, 7 {"hash":4875106,"name":"tnewgameform.listview1.columns[1].caption","sourcebytes":[67,111,108,111,114],"value":"Color"}, 8 {"hash":106664595,"name":"tnewgameform.listview1.columns[2].caption","sourcebytes":[67,111,110,116,114,111,108,115],"value":"Controls"}, 9 {"hash":104220650,"name":"tnewgameform.label2.caption","sourcebytes":[67,111,108,111,114,32,49,58],"value":"Color 1:"}, 10 {"hash":21055635,"name":"tnewgameform.groupbox1.caption","sourcebytes":[67,111,110,116,114,111,108,32,107,101,121,115],"value":"Control keys"}, 11 {"hash":23610,"name":"tnewgameform.label3.caption","sourcebytes":[85,112,58],"value":"Up:"}, 12 {"hash":4943386,"name":"tnewgameform.label4.caption","sourcebytes":[68,111,119,110,58],"value":"Down:"}, 13 {"hash":5422458,"name":"tnewgameform.label5.caption","sourcebytes":[76,101,102,116,58],"value":"Left:"}, 14 {"hash":93314938,"name":"tnewgameform.label6.caption","sourcebytes":[82,105,103,104,116,58],"value":"Right:"}, 15 {"hash":94332538,"name":"tnewgameform.label7.caption","sourcebytes":[83,104,111,111,116,58],"value":"Shoot:"}, 16 {"hash":5538698,"name":"tnewgameform.label8.caption","sourcebytes":[78,97,109,101,58],"value":"Name:"}, 17 {"hash":104220666,"name":"tnewgameform.label9.caption","sourcebytes":[67,111,108,111,114,32,50,58],"value":"Color 2:"} 2 {"hash":211211125,"name":"tformnewgame.caption","sourcebytes":[78,101,119,32,103,97,109,101],"value":"New game"}, 3 {"hash":5941396,"name":"tformnewgame.buttonstart.caption","sourcebytes":[83,116,97,114,116],"value":"Start"}, 4 {"hash":77089212,"name":"tformnewgame.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 {"hash":42978330,"name":"tformnewgame.label1.caption","sourcebytes":[80,108,97,121,101,114,115,58],"value":"Players:"}, 6 {"hash":346165,"name":"tformnewgame.listview1.columns[0].caption","sourcebytes":[78,97,109,101],"value":"Name"}, 7 {"hash":4875106,"name":"tformnewgame.listview1.columns[1].caption","sourcebytes":[67,111,108,111,114],"value":"Color"}, 8 {"hash":106664595,"name":"tformnewgame.listview1.columns[2].caption","sourcebytes":[67,111,110,116,114,111,108,115],"value":"Controls"}, 9 {"hash":104220650,"name":"tformnewgame.label2.caption","sourcebytes":[67,111,108,111,114,32,49,58],"value":"Color 1:"}, 10 {"hash":21055635,"name":"tformnewgame.groupbox1.caption","sourcebytes":[67,111,110,116,114,111,108,32,107,101,121,115],"value":"Control keys"}, 11 {"hash":23610,"name":"tformnewgame.label3.caption","sourcebytes":[85,112,58],"value":"Up:"}, 12 {"hash":4943386,"name":"tformnewgame.label4.caption","sourcebytes":[68,111,119,110,58],"value":"Down:"}, 13 {"hash":5422458,"name":"tformnewgame.label5.caption","sourcebytes":[76,101,102,116,58],"value":"Left:"}, 14 {"hash":93314938,"name":"tformnewgame.label6.caption","sourcebytes":[82,105,103,104,116,58],"value":"Right:"}, 15 {"hash":94332538,"name":"tformnewgame.label7.caption","sourcebytes":[83,104,111,111,116,58],"value":"Shoot:"}, 16 {"hash":5538698,"name":"tformnewgame.label8.caption","sourcebytes":[78,97,109,101,58],"value":"Name:"}, 17 {"hash":104220666,"name":"tformnewgame.label9.caption","sourcebytes":[67,111,108,111,114,32,50,58],"value":"Color 2:"}, 18 {"hash":206017268,"name":"tformnewgame.checkboxenabled.caption","sourcebytes":[69,110,97,98,108,101,100],"value":"Enabled"} 18 19 ]} -
trunk/Forms/UFormNewGame.pas
r46 r47 1 unit U NewGameForm;1 unit UFormNewGame; 2 2 3 3 {$mode delphi}{$H+} … … 11 11 type 12 12 13 { T NewGameForm}14 15 T NewGameForm= class(TForm)13 { TFormNewGame } 14 15 TFormNewGame = class(TForm) 16 16 ButtonStart: TButton; 17 17 ButtonCancel: TButton; 18 CheckBoxEnabled: TCheckBox; 18 19 ColorButton1: TColorButton; 19 20 ColorButton2: TColorButton; … … 35 36 Label9: TLabel; 36 37 ListView1: TListView; 38 procedure CheckBoxEnabledChange(Sender: TObject); 37 39 procedure ColorButton1ColorChanged(Sender: TObject); 38 40 procedure ColorButton2ColorChanged(Sender: TObject); … … 73 75 74 76 var 75 NewGameForm: TNewGameForm;77 FormNewGame: TFormNewGame; 76 78 77 79 … … 83 85 UCore; 84 86 85 { T NewGameForm}86 87 procedure T NewGameForm.ListView1Change(Sender: TObject; Item: TListItem;87 { TFormNewGame } 88 89 procedure TFormNewGame.ListView1Change(Sender: TObject; Item: TListItem; 88 90 Change: TItemChange); 89 91 begin … … 92 94 end; 93 95 94 procedure T NewGameForm.ListView1CustomDrawSubItem(Sender: TCustomListView;96 procedure TFormNewGame.ListView1CustomDrawSubItem(Sender: TCustomListView; 95 97 Item: TListItem; SubItem: Integer; State: TCustomDrawState; 96 98 var DefaultDraw: Boolean); … … 104 106 end; 105 107 106 procedure T NewGameForm.ListView1Data(Sender: TObject; Item: TListItem);108 procedure TFormNewGame.ListView1Data(Sender: TObject; Item: TListItem); 107 109 begin 108 110 if Item.Index < Players.Count then … … 116 118 end; 117 119 118 procedure T NewGameForm.ListView1SelectItem(Sender: TObject; Item: TListItem;120 procedure TFormNewGame.ListView1SelectItem(Sender: TObject; Item: TListItem; 119 121 Selected: Boolean); 120 122 begin … … 129 131 EditRight.Text := IntToStr(Keys.Right); 130 132 EditShoot.Text := IntToStr(Keys.Shoot); 133 CheckBoxEnabled.Checked := Enabled; 131 134 end; 132 135 UpdateInterface; 133 136 end; 134 137 135 procedure T NewGameForm.ReloadList;138 procedure TFormNewGame.ReloadList; 136 139 begin 137 140 ListView1.Items.Count := Players.Count; … … 139 142 end; 140 143 141 procedure T NewGameForm.UpdateInterface;144 procedure TFormNewGame.UpdateInterface; 142 145 begin 143 146 EditUp.Enabled := Assigned(ListView1.Selected); … … 149 152 ColorButton1.Enabled := Assigned(ListView1.Selected); 150 153 ColorButton2.Enabled := Assigned(ListView1.Selected); 151 end; 152 153 procedure TNewGameForm.LoadData(Engine: TEngine); 154 CheckBoxEnabled.Enabled := Assigned(ListView1.Selected); 155 end; 156 157 procedure TFormNewGame.LoadData(Engine: TEngine); 154 158 begin 155 159 Players.Assign(Engine.PlayerPool); 156 160 end; 157 161 158 procedure T NewGameForm.SaveData(Engine: TEngine);162 procedure TFormNewGame.SaveData(Engine: TEngine); 159 163 begin 160 164 Engine.PlayerPool.Assign(Players); 161 165 end; 162 166 163 procedure T NewGameForm.ColorButton1ColorChanged(Sender: TObject);167 procedure TFormNewGame.ColorButton1ColorChanged(Sender: TObject); 164 168 begin 165 169 if Assigned(ListView1.Selected) then … … 170 174 end; 171 175 172 procedure TNewGameForm.ColorButton2ColorChanged(Sender: TObject); 176 procedure TFormNewGame.CheckBoxEnabledChange(Sender: TObject); 177 begin 178 if Assigned(ListView1.Selected) then 179 with TPlayer(ListView1.Selected.Data) do begin 180 Enabled := CheckBoxEnabled.Checked; 181 ReloadList; 182 end; 183 end; 184 185 procedure TFormNewGame.ColorButton2ColorChanged(Sender: TObject); 173 186 begin 174 187 if Assigned(ListView1.Selected) then … … 179 192 end; 180 193 181 procedure T NewGameForm.EditDownChange(Sender: TObject);194 procedure TFormNewGame.EditDownChange(Sender: TObject); 182 195 var 183 196 Value: Integer; … … 190 203 end; 191 204 192 procedure T NewGameForm.EditDownKeyDown(Sender: TObject; var Key: Word;205 procedure TFormNewGame.EditDownKeyDown(Sender: TObject; var Key: Word; 193 206 Shift: TShiftState); 194 207 begin … … 196 209 end; 197 210 198 procedure T NewGameForm.EditLeftChange(Sender: TObject);211 procedure TFormNewGame.EditLeftChange(Sender: TObject); 199 212 var 200 213 Value: Integer; … … 207 220 end; 208 221 209 procedure T NewGameForm.EditLeftKeyDown(Sender: TObject; var Key: Word;222 procedure TFormNewGame.EditLeftKeyDown(Sender: TObject; var Key: Word; 210 223 Shift: TShiftState); 211 224 begin … … 213 226 end; 214 227 215 procedure T NewGameForm.EditNameChange(Sender: TObject);228 procedure TFormNewGame.EditNameChange(Sender: TObject); 216 229 begin 217 230 if Assigned(ListView1.Selected) then … … 222 235 end; 223 236 224 procedure T NewGameForm.EditRightChange(Sender: TObject);237 procedure TFormNewGame.EditRightChange(Sender: TObject); 225 238 var 226 239 Value: Integer; … … 233 246 end; 234 247 235 procedure T NewGameForm.EditRightKeyDown(Sender: TObject; var Key: Word;248 procedure TFormNewGame.EditRightKeyDown(Sender: TObject; var Key: Word; 236 249 Shift: TShiftState); 237 250 begin … … 239 252 end; 240 253 241 procedure T NewGameForm.EditShootChange(Sender: TObject);254 procedure TFormNewGame.EditShootChange(Sender: TObject); 242 255 var 243 256 Value: Integer; … … 250 263 end; 251 264 252 procedure T NewGameForm.EditShootKeyDown(Sender: TObject; var Key: Word;265 procedure TFormNewGame.EditShootKeyDown(Sender: TObject; var Key: Word; 253 266 Shift: TShiftState); 254 267 begin … … 256 269 end; 257 270 258 procedure T NewGameForm.EditUpChange(Sender: TObject);271 procedure TFormNewGame.EditUpChange(Sender: TObject); 259 272 var 260 273 Value: Integer; … … 267 280 end; 268 281 269 procedure T NewGameForm.EditUpKeyDown(Sender: TObject; var Key: Word;282 procedure TFormNewGame.EditUpKeyDown(Sender: TObject; var Key: Word; 270 283 Shift: TShiftState); 271 284 begin … … 273 286 end; 274 287 275 procedure T NewGameForm.FormCreate(Sender: TObject);288 procedure TFormNewGame.FormCreate(Sender: TObject); 276 289 begin 277 290 Core.CoolTranslator1.TranslateComponentRecursive(Self); … … 279 292 end; 280 293 281 procedure T NewGameForm.FormDestroy(Sender: TObject);294 procedure TFormNewGame.FormDestroy(Sender: TObject); 282 295 begin 283 296 FreeAndNil(Players); 284 297 end; 285 298 286 procedure T NewGameForm.FormShow(Sender: TObject);299 procedure TFormNewGame.FormShow(Sender: TObject); 287 300 begin 288 301 ReloadList; -
trunk/Forms/UMainForm.lfm
r44 r47 1 1 object MainForm: TMainForm 2 2 Left = 486 3 Height = 6183 Height = 515 4 4 Top = 258 5 Width = 7705 Width = 642 6 6 Caption = 'Tunneler' 7 ClientHeight = 5848 ClientWidth = 7709 DesignTimePPI = 1 447 ClientHeight = 490 8 ClientWidth = 642 9 DesignTimePPI = 120 10 10 Menu = MainMenu1 11 11 OnClose = FormClose … … 16 16 OnKeyUp = FormKeyUp 17 17 OnShow = FormShow 18 LCLVersion = '2.0. 0.4'18 LCLVersion = '2.0.2.0' 19 19 object StatusBar1: TStatusBar 20 20 Left = 0 21 21 Height = 28 22 Top = 55623 Width = 77022 Top = 462 23 Width = 642 24 24 Panels = < 25 25 item 26 Width = 7426 Width = 62 27 27 end 28 28 item 29 Width = 7429 Width = 62 30 30 end 31 31 item 32 Width = 7432 Width = 62 33 33 end 34 34 item 35 Width = 7435 Width = 62 36 36 end 37 37 item 38 Width = 7438 Width = 62 39 39 end 40 40 item 41 Width = 7441 Width = 62 42 42 end 43 43 item 44 Width = 7444 Width = 62 45 45 end> 46 46 ParentFont = False … … 49 49 object Image1: TImage 50 50 Left = 0 51 Height = 55651 Height = 462 52 52 Top = 0 53 Width = 77053 Width = 642 54 54 Align = alClient 55 55 OnMouseLeave = Image1MouseLeave … … 59 59 Interval = 50 60 60 OnTimer = TimerDrawTimer 61 left = 1 4962 top = 7661 left = 124 62 top = 63 63 63 end 64 64 object MainMenu1: TMainMenu 65 left = 2 7666 top = 2 465 left = 230 66 top = 20 67 67 object MenuItem1: TMenuItem 68 68 Caption = 'Game' … … 93 93 Interval = 20 94 94 OnTimer = TimerEngineTickTimer 95 left = 1 4496 top = 1 5695 left = 120 96 top = 130 97 97 end 98 98 object ActionList1: TActionList 99 left = 432100 top = 4 899 left = 360 100 top = 40 101 101 object AFullScreen: TAction 102 102 Caption = 'Fullscreen mode' … … 132 132 RootName = 'CONFIG' 133 133 ReadOnly = False 134 left = 1 49135 top = 3 60134 left = 124 135 top = 300 136 136 end 137 137 end -
trunk/Forms/UMainForm.pas
r44 r47 76 76 77 77 uses 78 UCore, UMapForm, U NewGameForm, UFormAbout;78 UCore, UMapForm, UFormNewGame, UFormAbout; 79 79 80 80 resourcestring … … 191 191 procedure TMainForm.ANewGameExecute(Sender: TObject); 192 192 begin 193 NewGameForm.LoadData(Engine);194 if NewGameForm.ShowModal = mrOk then begin195 NewGameForm.SaveData(Engine);193 FormNewGame.LoadData(Engine); 194 if FormNewGame.ShowModal = mrOk then begin 195 FormNewGame.SaveData(Engine); 196 196 Engine.NewGame; 197 197 end;
Note:
See TracChangeset
for help on using the changeset viewer.