mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-22 03:46:50 +01:00
Added quote_style argument to get_argument_options().
This commit is contained in:
parent
9df5649c1b
commit
191e9e152e
@ -136,11 +136,8 @@ void Input::_bind_methods() {
|
||||
ADD_SIGNAL(MethodInfo("joy_connection_changed", PropertyInfo(Variant::INT, "device"), PropertyInfo(Variant::BOOL, "connected")));
|
||||
}
|
||||
|
||||
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", false) ? "'" : "\"";
|
||||
|
||||
String pf = p_function;
|
||||
if (p_idx == 0 &&
|
||||
(pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" ||
|
||||
|
@ -126,7 +126,7 @@ public:
|
||||
virtual void action_press(const StringName &p_action, float p_strength = 1.f) = 0;
|
||||
virtual void action_release(const StringName &p_action) = 0;
|
||||
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const;
|
||||
|
||||
virtual bool is_emulating_touch_from_mouse() const = 0;
|
||||
virtual bool is_emulating_mouse_from_touch() const = 0;
|
||||
|
@ -2059,7 +2059,7 @@ void ObjectDB::debug_objects(DebugFunc p_func) {
|
||||
rw_lock.read_unlock();
|
||||
}
|
||||
|
||||
void Object::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
void Object::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const {
|
||||
}
|
||||
|
||||
int ObjectDB::get_object_count() {
|
||||
|
@ -774,7 +774,7 @@ public:
|
||||
|
||||
virtual void get_translatable_strings(List<String> *p_strings) const;
|
||||
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const;
|
||||
|
||||
StringName tr(const StringName &p_message) const; // translate message (internationalization)
|
||||
StringName trt(const StringName &p_message, const String &p_locale) const; // translate message (translate_to) (internationalization)
|
||||
|
@ -2309,7 +2309,7 @@ static void _find_call_arguments(const CScriptCompletionContext &p_context, cons
|
||||
Object *obj = base.operator Object *();
|
||||
if (obj) {
|
||||
List<String> options;
|
||||
obj->get_argument_options(p_method, p_argidx, &options);
|
||||
obj->get_argument_options(p_method, p_argidx, &options, quote_style);
|
||||
for (List<String>::Element *F = options.front(); F; F = F->next()) {
|
||||
ScriptCodeCompletionOption option(F->get(), ScriptCodeCompletionOption::KIND_FUNCTION);
|
||||
r_result.insert(option.display, option);
|
||||
@ -2611,7 +2611,7 @@ Error CScriptLanguage::complete_code(const String &p_code, const String &p_path,
|
||||
case CScriptParser::COMPLETION_GET_NODE: {
|
||||
if (p_owner) {
|
||||
List<String> opts;
|
||||
p_owner->get_argument_options("get_node", 0, &opts);
|
||||
p_owner->get_argument_options("get_node", 0, &opts, quote_style);
|
||||
|
||||
for (List<String>::Element *E = opts.front(); E; E = E->next()) {
|
||||
String opt = E->get().strip_edges();
|
||||
|
@ -2330,7 +2330,7 @@ static void _find_call_arguments(const GDScriptCompletionContext &p_context, con
|
||||
Object *obj = base.operator Object *();
|
||||
if (obj) {
|
||||
List<String> options;
|
||||
obj->get_argument_options(p_method, p_argidx, &options);
|
||||
obj->get_argument_options(p_method, p_argidx, &options, quote_style);
|
||||
for (List<String>::Element *F = options.front(); F; F = F->next()) {
|
||||
ScriptCodeCompletionOption option(F->get(), ScriptCodeCompletionOption::KIND_FUNCTION);
|
||||
r_result.insert(option.display, option);
|
||||
@ -2632,7 +2632,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path
|
||||
case GDScriptParser::COMPLETION_GET_NODE: {
|
||||
if (p_owner) {
|
||||
List<String> opts;
|
||||
p_owner->get_argument_options("get_node", 0, &opts);
|
||||
p_owner->get_argument_options("get_node", 0, &opts, quote_style);
|
||||
|
||||
for (List<String>::Element *E = opts.front(); E; E = E->next()) {
|
||||
String opt = E->get().strip_edges();
|
||||
|
@ -280,13 +280,7 @@ void SpriteFrames::_set_animations(const Array &p_animations) {
|
||||
}
|
||||
}
|
||||
|
||||
void AnimatedSprite::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
#else
|
||||
const String quote_style = "\"";
|
||||
#endif
|
||||
|
||||
void AnimatedSprite::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const {
|
||||
if (p_idx == 0 && p_function == "play" && frames.is_valid()) {
|
||||
List<StringName> al;
|
||||
frames->get_animation_list(&al);
|
||||
@ -294,7 +288,7 @@ void AnimatedSprite::get_argument_options(const StringName &p_function, int p_id
|
||||
r_options->push_back(quote_style + String(E->get()) + quote_style);
|
||||
}
|
||||
}
|
||||
Node::get_argument_options(p_function, p_idx, r_options);
|
||||
Node::get_argument_options(p_function, p_idx, r_options, quote_style);
|
||||
}
|
||||
|
||||
void SpriteFrames::_bind_methods() {
|
||||
|
@ -194,7 +194,7 @@ public:
|
||||
bool is_flipped_v() const;
|
||||
|
||||
virtual String get_configuration_warning() const;
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const;
|
||||
|
||||
AnimatedSprite();
|
||||
};
|
||||
|
@ -440,13 +440,7 @@ SpatialMaterial::BillboardMode SpriteBase3D::get_billboard_mode() const {
|
||||
return billboard_mode;
|
||||
}
|
||||
|
||||
void AnimatedSprite3D::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
|
||||
#else
|
||||
const String quote_style = "\"";
|
||||
#endif
|
||||
|
||||
void AnimatedSprite3D::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const {
|
||||
if (p_idx == 0 && p_function == "play" && frames.is_valid()) {
|
||||
List<StringName> al;
|
||||
frames->get_animation_list(&al);
|
||||
@ -454,7 +448,7 @@ void AnimatedSprite3D::get_argument_options(const StringName &p_function, int p_
|
||||
r_options->push_back(quote_style + String(E->get()) + quote_style);
|
||||
}
|
||||
}
|
||||
Node::get_argument_options(p_function, p_idx, r_options);
|
||||
Node::get_argument_options(p_function, p_idx, r_options, quote_style);
|
||||
}
|
||||
|
||||
void SpriteBase3D::_bind_methods() {
|
||||
|
@ -247,7 +247,7 @@ public:
|
||||
virtual Rect2 get_item_rect() const;
|
||||
|
||||
virtual String get_configuration_warning() const;
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const;
|
||||
|
||||
AnimatedSprite3D();
|
||||
};
|
||||
|
@ -1630,13 +1630,7 @@ NodePath AnimationPlayer::get_root() const {
|
||||
return root;
|
||||
}
|
||||
|
||||
void AnimationPlayer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
|
||||
#else
|
||||
const String quote_style = "\"";
|
||||
#endif
|
||||
|
||||
void AnimationPlayer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const {
|
||||
String pf = p_function;
|
||||
if (p_idx == 0 && (p_function == "play" || p_function == "play_backwards" || p_function == "remove_animation" || p_function == "has_animation" || p_function == "queue")) {
|
||||
List<StringName> al;
|
||||
@ -1645,7 +1639,7 @@ void AnimationPlayer::get_argument_options(const StringName &p_function, int p_i
|
||||
r_options->push_back(quote_style + String(E->get()) + quote_style);
|
||||
}
|
||||
}
|
||||
Node::get_argument_options(p_function, p_idx, r_options);
|
||||
Node::get_argument_options(p_function, p_idx, r_options, quote_style);
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
@ -384,7 +384,7 @@ public:
|
||||
|
||||
void clear_caches(); ///< must be called by hand if an animation was modified after added
|
||||
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const;
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
Ref<AnimatedValuesBackup> backup_animated_values(Node *p_root_override = NULL);
|
||||
|
@ -2659,14 +2659,8 @@ bool Control::is_visibility_clip_disabled() const {
|
||||
return data.disable_visibility_clip;
|
||||
}
|
||||
|
||||
void Control::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
|
||||
#else
|
||||
const String quote_style = "\"";
|
||||
#endif
|
||||
|
||||
Node::get_argument_options(p_function, p_idx, r_options);
|
||||
void Control::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const {
|
||||
Node::get_argument_options(p_function, p_idx, r_options, quote_style);
|
||||
|
||||
if (p_idx == 0) {
|
||||
List<StringName> sn;
|
||||
|
@ -519,7 +519,7 @@ public:
|
||||
void set_disable_visibility_clip(bool p_ignore);
|
||||
bool is_visibility_clip_disabled() const;
|
||||
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
|
||||
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const;
|
||||
virtual String get_configuration_warning() const;
|
||||
|
||||
Control();
|
||||
|
@ -3413,12 +3413,12 @@ static void _add_nodes_to_options(const Node *p_base, const Node *p_node, List<S
|
||||
}
|
||||
}
|
||||
|
||||
void Node::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
void Node::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const {
|
||||
String pf = p_function;
|
||||
if ((pf == "has_node" || pf == "get_node") && p_idx == 0) {
|
||||
_add_nodes_to_options(this, this, r_options);
|
||||
}
|
||||
Object::get_argument_options(p_function, p_idx, r_options);
|
||||
Object::get_argument_options(p_function, p_idx, r_options, quote_style);
|
||||
}
|
||||
|
||||
void Node::clear_internal_tree_resource_paths() {
|
||||
|
@ -568,7 +568,7 @@ public:
|
||||
|
||||
bool is_owned_by_parent() const;
|
||||
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const;
|
||||
|
||||
void clear_internal_tree_resource_paths();
|
||||
|
||||
|
@ -2431,7 +2431,7 @@ bool SceneTree::is_using_font_oversampling() const {
|
||||
return use_font_oversampling;
|
||||
}
|
||||
|
||||
void SceneTree::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
void SceneTree::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const {
|
||||
if (p_function == "change_scene") {
|
||||
DirAccessRef dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
List<String> directories;
|
||||
|
@ -441,7 +441,7 @@ public:
|
||||
|
||||
void drop_files(const Vector<String> &p_files, int p_from_screen = 0);
|
||||
void global_menu_action(const Variant &p_id, const Variant &p_meta);
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const;
|
||||
|
||||
//network API
|
||||
|
||||
|
@ -233,13 +233,7 @@ void ShaderMaterial::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "shader", PROPERTY_HINT_RESOURCE_TYPE, "Shader"), "set_shader", "get_shader");
|
||||
}
|
||||
|
||||
void ShaderMaterial::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||
#ifdef TOOLS_ENABLED
|
||||
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
|
||||
#else
|
||||
const String quote_style = "\"";
|
||||
#endif
|
||||
|
||||
void ShaderMaterial::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const {
|
||||
String f = p_function.operator String();
|
||||
if ((f == "get_shader_param" || f == "set_shader_param") && p_idx == 0) {
|
||||
if (shader.is_valid()) {
|
||||
@ -250,7 +244,7 @@ void ShaderMaterial::get_argument_options(const StringName &p_function, int p_id
|
||||
}
|
||||
}
|
||||
}
|
||||
Resource::get_argument_options(p_function, p_idx, r_options);
|
||||
Resource::get_argument_options(p_function, p_idx, r_options, quote_style);
|
||||
}
|
||||
|
||||
bool ShaderMaterial::_can_do_next_pass() const {
|
||||
|
@ -84,7 +84,7 @@ protected:
|
||||
|
||||
static void _bind_methods();
|
||||
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const;
|
||||
void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options, const String "e_style) const;
|
||||
|
||||
virtual bool _can_do_next_pass() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user