Use GODOT_MODULE define in TextServer modules
This commit is contained in:
parent
e2b3c588e1
commit
91b24b2780
|
@ -34,7 +34,7 @@
|
||||||
#ifdef GDEXTENSION
|
#ifdef GDEXTENSION
|
||||||
#include <godot_cpp/core/class_db.hpp>
|
#include <godot_cpp/core/class_db.hpp>
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
#include "modules/register_module_types.h"
|
#include "modules/register_module_types.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
|
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
#include "core/string/ustring.h"
|
#include "core/string/ustring.h"
|
||||||
|
|
|
@ -44,7 +44,7 @@ using namespace godot;
|
||||||
|
|
||||||
#define GLOBAL_GET(m_var) ProjectSettings::get_singleton()->get_setting_with_override(m_var)
|
#define GLOBAL_GET(m_var) ProjectSettings::get_singleton()->get_setting_with_override(m_var)
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/config/project_settings.h"
|
#include "core/config/project_settings.h"
|
||||||
|
@ -370,7 +370,7 @@ bool TextServerAdvanced::_has_feature(Feature p_feature) const {
|
||||||
String TextServerAdvanced::_get_name() const {
|
String TextServerAdvanced::_get_name() const {
|
||||||
#ifdef GDEXTENSION
|
#ifdef GDEXTENSION
|
||||||
return "ICU / HarfBuzz / Graphite (GDExtension)";
|
return "ICU / HarfBuzz / Graphite (GDExtension)";
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
return "ICU / HarfBuzz / Graphite (Built-in)";
|
return "ICU / HarfBuzz / Graphite (Built-in)";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -4852,7 +4852,7 @@ RID TextServerAdvanced::_find_sys_font_for_text(const RID &p_fdef, const String
|
||||||
#ifdef GDEXTENSION
|
#ifdef GDEXTENSION
|
||||||
for (int fb = 0; fb < fallback_font_name.size(); fb++) {
|
for (int fb = 0; fb < fallback_font_name.size(); fb++) {
|
||||||
const String &E = fallback_font_name[fb];
|
const String &E = fallback_font_name[fb];
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
for (const String &E : fallback_font_name) {
|
for (const String &E : fallback_font_name) {
|
||||||
#endif
|
#endif
|
||||||
SystemFontKey key = SystemFontKey(E, font_style & TextServer::FONT_ITALIC, font_weight, font_stretch, p_fdef, this);
|
SystemFontKey key = SystemFontKey(E, font_style & TextServer::FONT_ITALIC, font_weight, font_stretch, p_fdef, this);
|
||||||
|
@ -6757,7 +6757,7 @@ String TextServerAdvanced::_strip_diacritics(const String &p_string) const {
|
||||||
if (u_getCombiningClass(normalized_string[i]) == 0) {
|
if (u_getCombiningClass(normalized_string[i]) == 0) {
|
||||||
#ifdef GDEXTENSION
|
#ifdef GDEXTENSION
|
||||||
result = result + String::chr(normalized_string[i]);
|
result = result + String::chr(normalized_string[i]);
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
result = result + normalized_string[i];
|
result = result + normalized_string[i];
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/extension/ext_wrappers.gen.inc"
|
#include "core/extension/ext_wrappers.gen.inc"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/error/error_macros.h"
|
#include "core/error/error_macros.h"
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/os/mutex.h"
|
#include "core/os/mutex.h"
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#ifdef GDEXTENSION
|
#ifdef GDEXTENSION
|
||||||
#include <godot_cpp/core/class_db.hpp>
|
#include <godot_cpp/core/class_db.hpp>
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
#include "modules/register_module_types.h"
|
#include "modules/register_module_types.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ using namespace godot;
|
||||||
|
|
||||||
#define GLOBAL_GET(m_var) ProjectSettings::get_singleton()->get_setting_with_override(m_var)
|
#define GLOBAL_GET(m_var) ProjectSettings::get_singleton()->get_setting_with_override(m_var)
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/config/project_settings.h"
|
#include "core/config/project_settings.h"
|
||||||
|
@ -95,7 +95,7 @@ bool TextServerFallback::_has_feature(Feature p_feature) const {
|
||||||
String TextServerFallback::_get_name() const {
|
String TextServerFallback::_get_name() const {
|
||||||
#ifdef GDEXTENSION
|
#ifdef GDEXTENSION
|
||||||
return "Fallback (GDExtension)";
|
return "Fallback (GDExtension)";
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
return "Fallback (Built-in)";
|
return "Fallback (Built-in)";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -3654,7 +3654,7 @@ RID TextServerFallback::_find_sys_font_for_text(const RID &p_fdef, const String
|
||||||
#ifdef GDEXTENSION
|
#ifdef GDEXTENSION
|
||||||
for (int fb = 0; fb < fallback_font_name.size(); fb++) {
|
for (int fb = 0; fb < fallback_font_name.size(); fb++) {
|
||||||
const String &E = fallback_font_name[fb];
|
const String &E = fallback_font_name[fb];
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
for (const String &E : fallback_font_name) {
|
for (const String &E : fallback_font_name) {
|
||||||
#endif
|
#endif
|
||||||
SystemFontKey key = SystemFontKey(E, font_style & TextServer::FONT_ITALIC, font_weight, font_stretch, p_fdef, this);
|
SystemFontKey key = SystemFontKey(E, font_style & TextServer::FONT_ITALIC, font_weight, font_stretch, p_fdef, this);
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/extension/ext_wrappers.gen.inc"
|
#include "core/extension/ext_wrappers.gen.inc"
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/typedefs.h"
|
#include "core/typedefs.h"
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/error/error_macros.h"
|
#include "core/error/error_macros.h"
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
#else
|
#elif defined(GODOT_MODULE)
|
||||||
// Headers for building as built-in module.
|
// Headers for building as built-in module.
|
||||||
|
|
||||||
#include "core/os/mutex.h"
|
#include "core/os/mutex.h"
|
||||||
|
|
Loading…
Reference in New Issue