From 82a3304458738b410a5aff8994ce587413aeb464 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 24 Sep 2015 18:06:15 -0300 Subject: Added ability to set custom mouse cursors. Not hardware accelerated yet. --- tools/editor/editor_import_export.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'tools/editor/editor_import_export.cpp') diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index 84fc14d2e..0f7b4a5e0 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -842,6 +842,17 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func boot_splash=splash; } } + StringName custom_cursor; + { + String splash=Globals::get_singleton()->get("display/custom_mouse_cursor"); //avoid splash from being converted + splash=splash.strip_edges(); + if (splash!=String()) { + if (!splash.begins_with("res://")) + splash="res://"+splash; + splash=splash.simplify_path(); + custom_cursor=splash; + } + } @@ -853,7 +864,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func String src=files[i]; Vector buf; - if (src==boot_splash) + if (src==boot_splash || src==custom_cursor) buf = get_exported_file_default(src); //bootsplash must be kept if used else buf = get_exported_file(src); -- cgit v1.2.3-70-g09d2