mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Enable multline editing of variables default value in ChooseVariableDialog
This commit is contained in:
@@ -466,11 +466,18 @@ void ChooseVariableDialog::OnEditValueSelected(wxCommandEvent& event)
|
||||
UpdateSelectedAndParentVariable();
|
||||
if ( !selectedVariable || selectedVariable->IsStructure() ) return;
|
||||
|
||||
gd::String value = wxGetTextFromUser(_("Enter the initial value of the variable"), _("Initial value"), selectedVariable->GetString());
|
||||
selectedVariable->SetString(value);
|
||||
RefreshVariable(variablesList->GetSelection(), selectedVariableName, *selectedVariable);
|
||||
wxTextEntryDialog editDialog(this,
|
||||
_("Enter the initial value of the variable"), _("Initial value"),
|
||||
selectedVariable->GetString(), wxTextEntryDialogStyle | wxTE_MULTILINE);
|
||||
|
||||
modificationCount++;
|
||||
if (editDialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
gd::String value = editDialog.GetValue();
|
||||
selectedVariable->SetString(value);
|
||||
|
||||
RefreshVariable(variablesList->GetSelection(), selectedVariableName, *selectedVariable);
|
||||
modificationCount++;
|
||||
}
|
||||
}
|
||||
|
||||
void ChooseVariableDialog::OnRenameSelected(wxCommandEvent& event)
|
||||
|
Reference in New Issue
Block a user