Hardware cursor implementation for Godot Engine 2.1

- Remove all references to the variable 'custom_mouse_cursor_hotspot' and 'custom_mouse_cursor' from the project settings.
- Indeed, to implement a custom cursor we need to define a sprite for each 'state' of the cursor. Using those variables in the projects settings would define only the _main_ cursor.
- Cleanup the VirtualServer (Remove references to cursor_set_visible, cursor_set_texture and cursor_set_pos)
- Cleanup the Input (set_mouse_in_window should not be used anymore)
- Update the documentation
- Implement it for windows, X11, Javascript, BB 10, OSx, iOS, server, android
- NOT IMPLEMENTED FOR WINRT (As of today, I'm not able to implement this one, this post might help)
- NOT IMPLEMENTED FOR HAIKU (Support of this platform seems perfunctory)
- Build it for Windows, Android and OSX
This commit is contained in:
Xavier Sellier
2017-12-01 00:32:43 -05:00
parent db262f80be
commit 377fdc1e33
36 changed files with 335 additions and 264 deletions

View File

@@ -930,17 +930,6 @@ 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;
}
}
for (int i = 0; i < files.size(); i++) {
@@ -949,7 +938,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
String src = files[i];
Vector<uint8_t> buf;
if (src == boot_splash || src == custom_cursor)
if (src == boot_splash)
buf = get_exported_file_default(src); //bootsplash must be kept if used
else
buf = get_exported_file(src);