Commit bd0115e9fe4efaeacad60dd32460036c6bb16e51

Authored by Carlos Picanco
1 parent f8a8e10e
Exists in master

add captions as resource strings

Showing 1 changed file with 12 additions and 9 deletions   Show diff stats
form_matrixgame.pas
... ... @@ -85,8 +85,11 @@ type
85 85  
86 86 var
87 87 FormMatrixGame: TFormMatrixGame;
  88 +
88 89 resourcestring
89   - RS_RESEARCHERS = 'Pesquisadores';
  90 + CAPTION_RESUME = 'Recomeçar';
  91 + CAPTION_START = 'Começar';
  92 + CAPTION_RUNNING = 'Rodando';
90 93  
91 94 implementation
92 95  
... ... @@ -313,7 +316,7 @@ end;
313 316 procedure TFormMatrixGame.ButtonExpCancelClick(Sender: TObject);
314 317 begin
315 318 ButtonExpStart.Enabled := True;
316   - ButtonExpStart.Caption := 'Começar';
  319 + ButtonExpStart.Caption := CAPTION_START;
317 320 ButtonExpCancel.Enabled := not ButtonExpStart.Enabled;
318 321 ButtonExpPause.Enabled := not ButtonExpStart.Enabled;
319 322 //FGameControl.Experiment.SaveToFile(SaveDialog.FileName'.canceled');
... ... @@ -323,28 +326,28 @@ end;
323 326 procedure TFormMatrixGame.ButtonExpPauseClick(Sender: TObject);
324 327 begin
325 328 ButtonExpStart.Enabled := True;
326   - ButtonExpStart.Caption := 'Recomeçar';
  329 + ButtonExpStart.Caption := CAPTION_RESUME;
327 330 ButtonExpPause.Enabled := not ButtonExpStart.Enabled;
328 331 //FGameControl.Experiment.Pause;
329 332 end;
330 333  
331 334 procedure TFormMatrixGame.ButtonExpStartClick(Sender: TObject);
332 335 begin
333   - OpenDialog.InitialDir:=ExtractFilePath(Application.ExeName)+RS_RESEARCHERS;
334   - if ButtonExpStart.Caption = 'Começar' then
  336 + OpenDialog.InitialDir:=ExtractFilePath(Application.ExeName)+VAL_RESEARCHERS;
  337 + if ButtonExpStart.Caption = CAPTION_START then
335 338 if OpenDialog.Execute then
336 339 begin
337 340 ButtonExpStart.Enabled := False;
338   - ButtonExpStart.Caption := 'Rodando';
  341 + ButtonExpStart.Caption := CAPTION_RUNNING;
339 342 ButtonExpCancel.Enabled := not ButtonExpStart.Enabled;
340 343 ButtonExpPause.Enabled := not ButtonExpStart.Enabled;
341   - //FGameControl.Experiment.LoadFromFile(OpenDialog.FileName);
  344 + FGameControl.Experiment.LoadFromFile(OpenDialog.FileName);
342 345 end;
343 346  
344   - if ButtonExpStart.Caption = 'Recomeçar' then
  347 + if ButtonExpStart.Caption = CAPTION_RESUME then
345 348 begin
346 349 ButtonExpStart.Enabled := False;
347   - ButtonExpStart.Caption := 'Rodando';
  350 + ButtonExpStart.Caption := CAPTION_RUNNING;
348 351 ButtonExpCancel.Enabled := not ButtonExpStart.Enabled;
349 352 ButtonExpPause.Enabled := not ButtonExpStart.Enabled;
350 353 //FGameControl.Experiment.Resume;
... ...