Formatting

This commit is contained in:
Mario Zechner 2025-02-26 13:39:58 +01:00
parent 15cac5f9fc
commit 42fea00bb0
3 changed files with 9 additions and 9 deletions

View File

@ -266,19 +266,19 @@ void SpineSkeletonDataResource::_on_resources_reimported(const PackedStringArray
for (int i = 0; i < resources.size(); i++) {
if (atlas_res.is_valid() && atlas_res->get_path() == resources[i]) {
print_line("Atlas resource was reimported: " + resources[i]);
#ifdef SPINE_GODOT_EXTENSION
#ifdef SPINE_GODOT_EXTENSION
atlas_res = ResourceLoader::get_singleton()->load(resources[i], "SpineAtlasResource", ResourceLoader::CACHE_MODE_IGNORE);
#else
#else
atlas_res = ResourceLoader::load(resources[i], "SpineAtlasResource", ResourceFormatLoader::CACHE_MODE_IGNORE);
#endif
#endif
update_skeleton_data();
} else if (skeleton_file_res.is_valid() && skeleton_file_res->get_path() == resources[i]) {
print_line("Skeleton file resource was reimported: " + resources[i]);
#ifdef SPINE_GODOT_EXTENSION
#ifdef SPINE_GODOT_EXTENSION
skeleton_file_res = ResourceLoader::get_singleton()->load(resources[i], "SpineSkeletonFileResource", ResourceLoader::CACHE_MODE_IGNORE);
#else
#else
skeleton_file_res = ResourceLoader::load(resources[i], "SpineSkeletonFileResource", ResourceFormatLoader::CACHE_MODE_IGNORE);
#endif
#endif
update_skeleton_data();
}
}

View File

@ -212,9 +212,9 @@ public:
#ifdef TOOLS_ENABLED
#if VERSION_MAJOR > 3
void _on_resources_reimported(const PackedStringArray &resources);
void _on_resources_reimported(const PackedStringArray &resources);
#else
void _on_resources_reimported(const PoolStringArray &resources);
void _on_resources_reimported(const PoolStringArray &resources);
#endif
#endif
};

View File

@ -1218,7 +1218,7 @@ void SpineSprite::draw() {
#if TOOLS_ENABLED
float editor_scale = 1.0;
if (Engine::get_singleton()->is_editor_hint()) editor_scale = EditorInterface::get_singleton()->get_editor_scale();
float inverse_zoom = 1 / get_viewport()->get_global_canvas_transform().get_scale().x * editor_scale;
Vector<String> hover_text_lines;
if (hovered_slot) {