You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
fixes
This commit is contained in:
@@ -847,8 +847,15 @@ void ObjectTypeDB::set_type_enabled(StringName p_type,bool p_enable) {
|
|||||||
|
|
||||||
bool ObjectTypeDB::is_type_enabled(StringName p_type) {
|
bool ObjectTypeDB::is_type_enabled(StringName p_type) {
|
||||||
|
|
||||||
ERR_FAIL_COND_V(!types.has(p_type),false);
|
TypeInfo *ti=types.getptr(p_type);
|
||||||
return !types[p_type].disabled;
|
if (!ti || !ti->creation_func) {
|
||||||
|
if (compat_types.has(p_type)) {
|
||||||
|
ti=types.getptr(compat_types[p_type]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ERR_FAIL_COND_V(!ti,false);
|
||||||
|
return !ti->disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringName ObjectTypeDB::get_category(const StringName& p_node) {
|
StringName ObjectTypeDB::get_category(const StringName& p_node) {
|
||||||
|
|||||||
@@ -1661,7 +1661,7 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
|
|||||||
//print_line( p_code.replace(String::chr(0xFFFF),"<cursor>"));
|
//print_line( p_code.replace(String::chr(0xFFFF),"<cursor>"));
|
||||||
|
|
||||||
GDParser p;
|
GDParser p;
|
||||||
Error err = p.parse(p_code,p_base_path);
|
Error err = p.parse(p_code,p_base_path,true);
|
||||||
bool isfunction=false;
|
bool isfunction=false;
|
||||||
Set<String> options;
|
Set<String> options;
|
||||||
|
|
||||||
|
|||||||
@@ -205,6 +205,7 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) {
|
|||||||
String name = _get_class_name(env, c, &array);
|
String name = _get_class_name(env, c, &array);
|
||||||
//print_line("name is " + name + ", array "+Variant(array));
|
//print_line("name is " + name + ", array "+Variant(array));
|
||||||
|
|
||||||
|
print_line("ARGNAME: "+name);
|
||||||
if (name == "java.lang.String") {
|
if (name == "java.lang.String") {
|
||||||
|
|
||||||
return String::utf8(env->GetStringUTFChars( (jstring)obj, NULL ));
|
return String::utf8(env->GetStringUTFChars( (jstring)obj, NULL ));
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ def get_opts():
|
|||||||
return [
|
return [
|
||||||
('use_llvm','Use llvm compiler','no'),
|
('use_llvm','Use llvm compiler','no'),
|
||||||
('use_sanitizer','Use llvm compiler sanitize address','no'),
|
('use_sanitizer','Use llvm compiler sanitize address','no'),
|
||||||
|
('pulseaudio','Detect & Use pulseaudio','yes'),
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_flags():
|
def get_flags():
|
||||||
@@ -115,12 +116,13 @@ def configure(env):
|
|||||||
env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
|
env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
|
||||||
env.Append(CPPFLAGS=["-DALSA_ENABLED"])
|
env.Append(CPPFLAGS=["-DALSA_ENABLED"])
|
||||||
|
|
||||||
if not os.system("pkg-config --exists libpulse-simple"):
|
if (env["pulseaudio"]=="yes"):
|
||||||
print("Enabling PulseAudio")
|
if not os.system("pkg-config --exists libpulse-simple"):
|
||||||
env.Append(CPPFLAGS=["-DPULSEAUDIO_ENABLED"])
|
print("Enabling PulseAudio")
|
||||||
env.ParseConfig('pkg-config --cflags --libs libpulse-simple')
|
env.Append(CPPFLAGS=["-DPULSEAUDIO_ENABLED"])
|
||||||
else:
|
env.ParseConfig('pkg-config --cflags --libs libpulse-simple')
|
||||||
print("PulseAudio development libraries not found, disabling driver")
|
else:
|
||||||
|
print("PulseAudio development libraries not found, disabling driver")
|
||||||
|
|
||||||
env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES1_ENABLED','-DGLES_OVER_GL'])
|
env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES1_ENABLED','-DGLES_OVER_GL'])
|
||||||
env.Append(LIBS=['GL', 'GLU', 'pthread','asound','z']) #TODO detect linux/BSD!
|
env.Append(LIBS=['GL', 'GLU', 'pthread','asound','z']) #TODO detect linux/BSD!
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ void register_scene_types() {
|
|||||||
|
|
||||||
ObjectTypeDB::register_type<Control>();
|
ObjectTypeDB::register_type<Control>();
|
||||||
// ObjectTypeDB::register_type<EmptyControl>();
|
// ObjectTypeDB::register_type<EmptyControl>();
|
||||||
ObjectTypeDB::add_compatibility_type("EmptyControl","control");
|
ObjectTypeDB::add_compatibility_type("EmptyControl","Control");
|
||||||
ObjectTypeDB::register_type<Button>();
|
ObjectTypeDB::register_type<Button>();
|
||||||
ObjectTypeDB::register_type<Label>();
|
ObjectTypeDB::register_type<Label>();
|
||||||
ObjectTypeDB::register_type<HScrollBar>();
|
ObjectTypeDB::register_type<HScrollBar>();
|
||||||
|
|||||||
@@ -411,7 +411,11 @@ void EditorTextureImportDialog::popup_import(const String& p_from) {
|
|||||||
Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_from);
|
Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_from);
|
||||||
ERR_FAIL_COND(!rimd.is_valid());
|
ERR_FAIL_COND(!rimd.is_valid());
|
||||||
|
|
||||||
save_path->set_text(p_from.get_base_dir());
|
if (plugin->get_mode()==EditorTextureImportPlugin::MODE_ATLAS)
|
||||||
|
save_path->set_text(p_from);
|
||||||
|
else
|
||||||
|
save_path->set_text(p_from.get_base_dir());
|
||||||
|
|
||||||
texture_options->set_format(EditorTextureImportPlugin::ImageFormat(int(rimd->get_option("format"))));
|
texture_options->set_format(EditorTextureImportPlugin::ImageFormat(int(rimd->get_option("format"))));
|
||||||
texture_options->set_flags(rimd->get_option("flags"));
|
texture_options->set_flags(rimd->get_option("flags"));
|
||||||
texture_options->set_quality(rimd->get_option("quality"));
|
texture_options->set_quality(rimd->get_option("quality"));
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ public:
|
|||||||
IMAGE_FLAG_USE_ANISOTROPY=1024, //convert image to linear
|
IMAGE_FLAG_USE_ANISOTROPY=1024, //convert image to linear
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Mode get_mode() const { return mode; }
|
||||||
virtual String get_name() const;
|
virtual String get_name() const;
|
||||||
virtual String get_visible_name() const;
|
virtual String get_visible_name() const;
|
||||||
virtual void import_dialog(const String& p_from="");
|
virtual void import_dialog(const String& p_from="");
|
||||||
|
|||||||
Reference in New Issue
Block a user