Files
mtgodot-poc/build-debug/extension/godot-cpp/gen/src/classes/menu_bar.cpp
T
shenandshen c93894313a fix: 装备属性面板避让逻辑 + 多项功能更新
- item_tooltip_view.gd: 新增 avoid_rect 属性,tooltip 与装备窗口重叠时自动推到左侧
- inventory_ui.gd: 悬停装备时传入窗口矩形作为避让区域
- 包含其他累积的功能开发和测试文件
2026-09-21 16:38:59 -07:00

222 lines
13 KiB
C++

/**************************************************************************/
/* menu_bar.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/menu_bar.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/classes/popup_menu.hpp>
namespace godot {
void MenuBar::set_switch_on_hover(bool p_enable) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_switch_on_hover")._native_ptr(), 2586408642);
CHECK_METHOD_BIND(_gde_method_bind);
int8_t p_enable_encoded;
PtrToArg<bool>::encode(p_enable, &p_enable_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_enable_encoded);
}
bool MenuBar::is_switch_on_hover() {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("is_switch_on_hover")._native_ptr(), 2240911060);
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner);
}
void MenuBar::set_disable_shortcuts(bool p_disabled) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_disable_shortcuts")._native_ptr(), 2586408642);
CHECK_METHOD_BIND(_gde_method_bind);
int8_t p_disabled_encoded;
PtrToArg<bool>::encode(p_disabled, &p_disabled_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_disabled_encoded);
}
void MenuBar::set_prefer_global_menu(bool p_enabled) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_prefer_global_menu")._native_ptr(), 2586408642);
CHECK_METHOD_BIND(_gde_method_bind);
int8_t p_enabled_encoded;
PtrToArg<bool>::encode(p_enabled, &p_enabled_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_enabled_encoded);
}
bool MenuBar::is_prefer_global_menu() const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("is_prefer_global_menu")._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 MenuBar::is_native_menu() const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("is_native_menu")._native_ptr(), 36873697);
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner);
}
int32_t MenuBar::get_menu_count() const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("get_menu_count")._native_ptr(), 3905245786);
CHECK_METHOD_BIND_RET(_gde_method_bind, (0));
return ::godot::internal::_call_native_mb_ret<int64_t>(_gde_method_bind, _owner);
}
void MenuBar::set_text_direction(Control::TextDirection p_direction) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_text_direction")._native_ptr(), 119160795);
CHECK_METHOD_BIND(_gde_method_bind);
int64_t p_direction_encoded;
PtrToArg<int64_t>::encode(p_direction, &p_direction_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_direction_encoded);
}
Control::TextDirection MenuBar::get_text_direction() const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("get_text_direction")._native_ptr(), 797257663);
CHECK_METHOD_BIND_RET(_gde_method_bind, (Control::TextDirection(0)));
return (Control::TextDirection)::godot::internal::_call_native_mb_ret<int64_t>(_gde_method_bind, _owner);
}
void MenuBar::set_language(const String &p_language) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_language")._native_ptr(), 83702148);
CHECK_METHOD_BIND(_gde_method_bind);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_language);
}
String MenuBar::get_language() const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("get_language")._native_ptr(), 201670096);
CHECK_METHOD_BIND_RET(_gde_method_bind, (String()));
return ::godot::internal::_call_native_mb_ret<String>(_gde_method_bind, _owner);
}
void MenuBar::set_flat(bool p_enabled) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_flat")._native_ptr(), 2586408642);
CHECK_METHOD_BIND(_gde_method_bind);
int8_t p_enabled_encoded;
PtrToArg<bool>::encode(p_enabled, &p_enabled_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_enabled_encoded);
}
bool MenuBar::is_flat() const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("is_flat")._native_ptr(), 36873697);
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner);
}
void MenuBar::set_start_index(int32_t p_enabled) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_start_index")._native_ptr(), 1286410249);
CHECK_METHOD_BIND(_gde_method_bind);
int64_t p_enabled_encoded;
PtrToArg<int64_t>::encode(p_enabled, &p_enabled_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_enabled_encoded);
}
int32_t MenuBar::get_start_index() const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("get_start_index")._native_ptr(), 3905245786);
CHECK_METHOD_BIND_RET(_gde_method_bind, (0));
return ::godot::internal::_call_native_mb_ret<int64_t>(_gde_method_bind, _owner);
}
void MenuBar::set_menu_title(int32_t p_menu, const String &p_title) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_menu_title")._native_ptr(), 501894301);
CHECK_METHOD_BIND(_gde_method_bind);
int64_t p_menu_encoded;
PtrToArg<int64_t>::encode(p_menu, &p_menu_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_menu_encoded, &p_title);
}
String MenuBar::get_menu_title(int32_t p_menu) const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("get_menu_title")._native_ptr(), 844755477);
CHECK_METHOD_BIND_RET(_gde_method_bind, (String()));
int64_t p_menu_encoded;
PtrToArg<int64_t>::encode(p_menu, &p_menu_encoded);
return ::godot::internal::_call_native_mb_ret<String>(_gde_method_bind, _owner, &p_menu_encoded);
}
void MenuBar::set_menu_tooltip(int32_t p_menu, const String &p_tooltip) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_menu_tooltip")._native_ptr(), 501894301);
CHECK_METHOD_BIND(_gde_method_bind);
int64_t p_menu_encoded;
PtrToArg<int64_t>::encode(p_menu, &p_menu_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_menu_encoded, &p_tooltip);
}
String MenuBar::get_menu_tooltip(int32_t p_menu) const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("get_menu_tooltip")._native_ptr(), 844755477);
CHECK_METHOD_BIND_RET(_gde_method_bind, (String()));
int64_t p_menu_encoded;
PtrToArg<int64_t>::encode(p_menu, &p_menu_encoded);
return ::godot::internal::_call_native_mb_ret<String>(_gde_method_bind, _owner, &p_menu_encoded);
}
void MenuBar::set_menu_disabled(int32_t p_menu, bool p_disabled) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_menu_disabled")._native_ptr(), 300928843);
CHECK_METHOD_BIND(_gde_method_bind);
int64_t p_menu_encoded;
PtrToArg<int64_t>::encode(p_menu, &p_menu_encoded);
int8_t p_disabled_encoded;
PtrToArg<bool>::encode(p_disabled, &p_disabled_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_menu_encoded, &p_disabled_encoded);
}
bool MenuBar::is_menu_disabled(int32_t p_menu) const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("is_menu_disabled")._native_ptr(), 1116898809);
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
int64_t p_menu_encoded;
PtrToArg<int64_t>::encode(p_menu, &p_menu_encoded);
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner, &p_menu_encoded);
}
void MenuBar::set_menu_hidden(int32_t p_menu, bool p_hidden) {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("set_menu_hidden")._native_ptr(), 300928843);
CHECK_METHOD_BIND(_gde_method_bind);
int64_t p_menu_encoded;
PtrToArg<int64_t>::encode(p_menu, &p_menu_encoded);
int8_t p_hidden_encoded;
PtrToArg<bool>::encode(p_hidden, &p_hidden_encoded);
::godot::internal::_call_native_mb_no_ret(_gde_method_bind, _owner, &p_menu_encoded, &p_hidden_encoded);
}
bool MenuBar::is_menu_hidden(int32_t p_menu) const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("is_menu_hidden")._native_ptr(), 1116898809);
CHECK_METHOD_BIND_RET(_gde_method_bind, (false));
int64_t p_menu_encoded;
PtrToArg<int64_t>::encode(p_menu, &p_menu_encoded);
return ::godot::internal::_call_native_mb_ret<int8_t>(_gde_method_bind, _owner, &p_menu_encoded);
}
PopupMenu *MenuBar::get_menu_popup(int32_t p_menu) const {
static GDExtensionMethodBindPtr _gde_method_bind = ::godot::gdextension_interface::classdb_get_method_bind(MenuBar::get_class_static()._native_ptr(), StringName("get_menu_popup")._native_ptr(), 2100501353);
CHECK_METHOD_BIND_RET(_gde_method_bind, (nullptr));
int64_t p_menu_encoded;
PtrToArg<int64_t>::encode(p_menu, &p_menu_encoded);
return ::godot::internal::_call_native_mb_ret_obj<PopupMenu>(_gde_method_bind, _owner, &p_menu_encoded);
}
} // namespace godot