Virtual void SetCustomCursor(EMouseCursor::Type CursorToChange, FString PathToCursor, FIntPoint CursorHotSpot) override First lets edit Engine/Source/Runtime/Core/Public/Windows/WindowsCursor.h and Engine/Source/Runtime/Core/Private/Windows/WindowsCursor.cpp: Next, let’s implement these functions for both platforms. Virtual void ResetCursor(EMouseCursor::Type CursorToReset) = 0 * Sets default image for cursor of certain type */ Virtual void SetCustomCursor(EMouseCursor::Type CursorToChange, FString PathToCursor, FIntPoint CursorHotSpot) = 0 * Sets image from file for cursor of certain type */ Open file Engine/Source/Runtime/Core/Public/GenericPlatform/ICursor.h and add inside class ICursor: Ok, let’s edit basic engine cursor interface and add a couple of functions there. We’ll take hotspot coordinates from cursor resource in Windows and will manually enter them in OS X.png for OS X (but you can feel free to extend functionality by using third party libs like SDL_image) I haven’t tested it in 4.3 and tested windows cursor in 4.5 preview. This solution is for source-based builds, because we’re gonna change engine source code.Let’s go!īut first let’s define some requirements: I decided to create this tutorial when I got answer from one of the UE4 devs that custom hardware cursor feature won’t be added and they’re working at some software implementation instead to make it possible for those who lacks special OS features knowledge.īut for those who still want lag-free custom hardware cursor I share my code which was already tested on Win 7 and OS X 10.9.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |