Merge pull request #21861 from fire/visual_script_18024

Change the default variable Visual Script constructor to use EditorInspector and etc
This commit is contained in:
Juan Linietsky 2018-09-08 17:05:03 -03:00 committed by GitHub
commit ffe158ae85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -321,7 +321,7 @@ protected:
p_list->push_back(PropertyInfo(Variant::INT, "type", PROPERTY_HINT_ENUM, argt));
p_list->push_back(PropertyInfo(script->get_variable_info(var).type, "value", script->get_variable_info(var).hint, script->get_variable_info(var).hint_string, PROPERTY_USAGE_DEFAULT));
// Update this when PropertyHint changes
p_list->push_back(PropertyInfo(Variant::INT, "hint", PROPERTY_HINT_ENUM, "None,Range,ExpRange,Enum,ExpEasing,Length,SpriteFrame,KeyAccel,Flags,Layers2dRender,Layers2dPhysics,Layer3dRender,Layer3dPhysics,File,Dir,GlobalFile,GlobalDir,ResourceType,MultilineText,ColorNoAlpha,ImageCompressLossy,ImageCompressLossLess,ObjectId,String,NodePathToEditedNode,MethodOfVariantType,MethodOfBaseType,MethodOfInstance,MethodOfScript,PropertyOfVariantType,PropertyOfBaseType,PropertyOfInstance,PropertyOfScript,ObjectTooBig"));
p_list->push_back(PropertyInfo(Variant::INT, "hint", PROPERTY_HINT_ENUM, "None,Range,ExpRange,Enum,ExpEasing,Length,SpriteFrame,KeyAccel,Flags,Layers2dRender,Layers2dPhysics,Layer3dRender,Layer3dPhysics,File,Dir,GlobalFile,GlobalDir,ResourceType,MultilineText,PlaceholderText,ColorNoAlpha,ImageCompressLossy,ImageCompressLossLess,ObjectId,String,NodePathToEditedNode,MethodOfVariantType,MethodOfBaseType,MethodOfInstance,MethodOfScript,PropertyOfVariantType,PropertyOfBaseType,PropertyOfInstance,PropertyOfScript,ObjectTooBig,NodePathValidTypes"));
p_list->push_back(PropertyInfo(Variant::STRING, "hint_string"));
p_list->push_back(PropertyInfo(Variant::BOOL, "export"));
}
@ -3615,8 +3615,7 @@ VisualScriptEditor::VisualScriptEditor() {
edit_signal_dialog->set_title(TTR("Edit Signal Arguments:"));
signal_editor = memnew(VisualScriptEditorSignalEdit);
edit_signal_edit = memnew(PropertyEditor);
edit_signal_edit->hide_top_label();
edit_signal_edit = memnew(EditorInspector);
edit_signal_dialog->add_child(edit_signal_edit);
edit_signal_edit->edit(signal_editor);
@ -3627,8 +3626,7 @@ VisualScriptEditor::VisualScriptEditor() {
edit_variable_dialog->set_title(TTR("Edit Variable:"));
variable_editor = memnew(VisualScriptEditorVariableEdit);
edit_variable_edit = memnew(PropertyEditor);
edit_variable_edit->hide_top_label();
edit_variable_edit = memnew(EditorInspector);
edit_variable_dialog->add_child(edit_variable_edit);
edit_variable_edit->edit(variable_editor);

View File

@ -93,7 +93,7 @@ class VisualScriptEditor : public ScriptEditorBase {
VisualScriptEditorSignalEdit *signal_editor;
AcceptDialog *edit_signal_dialog;
PropertyEditor *edit_signal_edit;
EditorInspector *edit_signal_edit;
VisualScriptPropertySelector *method_select;
VisualScriptPropertySelector *new_connect_node_select;
@ -102,7 +102,7 @@ class VisualScriptEditor : public ScriptEditorBase {
VisualScriptEditorVariableEdit *variable_editor;
AcceptDialog *edit_variable_dialog;
PropertyEditor *edit_variable_edit;
EditorInspector *edit_variable_edit;
CustomPropertyEditor *default_value_edit;