diff --git a/experiment_runner/form_matrixgame.pas b/experiment_runner/form_matrixgame.pas index 3985569..6682bd4 100644 --- a/experiment_runner/form_matrixgame.pas +++ b/experiment_runner/form_matrixgame.pas @@ -333,11 +333,12 @@ begin ButtonExpCancel.Enabled := not ButtonExpStart.Enabled; ButtonExpPause.Enabled := not ButtonExpStart.Enabled; FGameControl.Experiment.SaveToFile(OpenDialog.FileName+'.canceled'); - FGameControl.SendMessage(K_END); + FGameControl.Cancel; end; procedure TFormMatrixGame.ButtonExpPauseClick(Sender: TObject); begin + ShowMessage('Não implementado.'); //ButtonExpStart.Enabled := True; //ButtonExpStart.Caption := CAPTION_RESUME; //ButtonExpPause.Enabled := not ButtonExpStart.Enabled; diff --git a/experiment_runner/units/game_control.pas b/experiment_runner/units/game_control.pas index 462cf08..de619d9 100644 --- a/experiment_runner/units/game_control.pas +++ b/experiment_runner/units/game_control.pas @@ -763,7 +763,9 @@ end; procedure TGameControl.Cancel; begin - + FormMatrixGame.StringGridMatrix.Clean; + FormMatrixGame.StringGridMatrix.Options := []; + FZMQActor.SendMessage(K_END); end; // Here FActor is garanted to be a TZMQPlayer diff --git a/experiment_runner/units/game_file_methods.pas b/experiment_runner/units/game_file_methods.pas index e4b1cbc..49497b7 100644 --- a/experiment_runner/units/game_file_methods.pas +++ b/experiment_runner/units/game_file_methods.pas @@ -427,8 +427,11 @@ begin WriteInteger(LC, KEY_CYCLES_COUNT,Cycles.Count); WriteInteger(LC, KEY_CYCLES_VALUE,Cycles.Value); WriteInteger(LC, KEY_CYCLES_GEN,Cycles.Generation); - WriteString(LC, KEY_PROMPT_MESSAGE, Prompt.Question); - WriteString(LC, KEY_PROMPT_STYLE, GetPromptStyleString(Prompt.PromptStyle)); + if Assigned(Prompt) then + begin + WriteString(LC, KEY_PROMPT_MESSAGE, Prompt.Question); + WriteString(LC, KEY_PROMPT_STYLE, GetPromptStyleString(Prompt.PromptStyle)); + end; MI := 0; CI := 0; -- libgit2 0.21.2