- item_tooltip_view.gd: 新增 avoid_rect 属性,tooltip 与装备窗口重叠时自动推到左侧 - inventory_ui.gd: 悬停装备时传入窗口矩形作为避让区域 - 包含其他累积的功能开发和测试文件
160 lines
10 KiB
C++
160 lines
10 KiB
C++
/**************************************************************************/
|
|
/* script.cpp */
|
|
/**************************************************************************/
|
|
/* This file is part of: */
|
|
/* GODOT ENGINE */
|
|
/* https://godotengine.org */
|
|
/**************************************************************************/
|
|
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
|
|
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
|
|
/* */
|
|
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
/* a copy of this software and associated documentation files (the */
|
|
/* "Software"), to deal in the Software without restriction, including */
|
|
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
/* the following conditions: */
|
|
/* */
|
|
/* The above copyright notice and this permission notice shall be */
|
|
/* included in all copies or substantial portions of the Software. */
|
|
/* */
|
|
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
|
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
/**************************************************************************/
|
|
|
|
// THIS FILE IS GENERATED. EDITS WILL BE LOST.
|
|
|
|
#include <godot_cpp/classes/script.hpp>
|
|
|
|
#include <godot_cpp/core/class_db.hpp>
|
|
#include <godot_cpp/core/engine_ptrcall.hpp>
|
|
#include <godot_cpp/core/error_macros.hpp>
|
|
|
|
#include <godot_cpp/core/object.hpp>
|
|
|
|
namespace godot {
|
|
|
|
bool Script::can_instantiate() const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("can_instantiate")._native_ptr(), 36873697);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
|
|
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
bool Script::has_source_code() const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("has_source_code")._native_ptr(), 36873697);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
|
|
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
String Script::get_source_code() const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_source_code")._native_ptr(), 201670096);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (String()));
|
|
return ::godot::internal::_call_native_mb_ret<String>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
void Script::set_source_code(const String &p_source) {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("set_source_code")._native_ptr(), 83702148);
|
|
CHECK_METHOD_BIND(_gde_method_bind);
|
|
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_source);
|
|
}
|
|
|
|
Error Script::reload(bool p_keep_state) {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("reload")._native_ptr(), 1633102583);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (Error(0)));
|
|
int8_t p_keep_state_encoded;
|
|
PtrToArg<bool>::encode(p_keep_state, &p_keep_state_encoded);
|
|
return (Error)::godot::internal::_call_native_mb_ret<int64_t>(_gde_method_bind, _owner, &p_keep_state_encoded);
|
|
}
|
|
|
|
Ref<Script> Script::get_base_script() const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_base_script")._native_ptr(), 278624046);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (Ref<Script>()));
|
|
return Ref<Script>::_gde_internal_constructor(::godot::internal::_call_native_mb_ret_obj<Script>(_gde_method_bind, _owner));
|
|
}
|
|
|
|
StringName Script::get_instance_base_type() const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_instance_base_type")._native_ptr(), 2002593661);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (StringName()));
|
|
return ::godot::internal::_call_native_mb_ret<StringName>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
StringName Script::get_global_name() const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_global_name")._native_ptr(), 2002593661);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (StringName()));
|
|
return ::godot::internal::_call_native_mb_ret<StringName>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
bool Script::has_script_method(const StringName &p_method_name) const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("has_script_method")._native_ptr(), 2619796661);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
|
|
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner, &p_method_name);
|
|
}
|
|
|
|
bool Script::has_script_signal(const StringName &p_signal_name) const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("has_script_signal")._native_ptr(), 2619796661);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
|
|
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner, &p_signal_name);
|
|
}
|
|
|
|
TypedArray<Dictionary> Script::get_script_property_list() {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_script_property_list")._native_ptr(), 2915620761);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (TypedArray<Dictionary>()));
|
|
return ::godot::internal::_call_native_mb_ret<TypedArray<Dictionary>>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
TypedArray<Dictionary> Script::get_script_method_list() {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_script_method_list")._native_ptr(), 2915620761);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (TypedArray<Dictionary>()));
|
|
return ::godot::internal::_call_native_mb_ret<TypedArray<Dictionary>>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
TypedArray<Dictionary> Script::get_script_signal_list() {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_script_signal_list")._native_ptr(), 2915620761);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (TypedArray<Dictionary>()));
|
|
return ::godot::internal::_call_native_mb_ret<TypedArray<Dictionary>>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
Dictionary Script::get_script_constant_map() {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_script_constant_map")._native_ptr(), 2382534195);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (Dictionary()));
|
|
return ::godot::internal::_call_native_mb_ret<Dictionary>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
Variant Script::get_property_default_value(const StringName &p_property) {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_property_default_value")._native_ptr(), 2138907829);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (Variant()));
|
|
return ::godot::internal::_call_native_mb_ret<Variant>(_gde_method_bind, _owner, &p_property);
|
|
}
|
|
|
|
bool Script::is_tool() const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("is_tool")._native_ptr(), 36873697);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
|
|
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
bool Script::is_abstract() const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("is_abstract")._native_ptr(), 36873697);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
|
|
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
Variant Script::get_rpc_config() const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("get_rpc_config")._native_ptr(), 1214101251);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (Variant()));
|
|
return ::godot::internal::_call_native_mb_ret<Variant>(_gde_method_bind, _owner);
|
|
}
|
|
|
|
bool Script::instance_has(Object *p_base_object) const {
|
|
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(Script::get_class_static()._native_ptr(), StringName("instance_has")._native_ptr(), 397768994);
|
|
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
|
|
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner, (p_base_object != nullptr ? &p_base_object->_owner : nullptr));
|
|
}
|
|
|
|
} // namespace godot
|