Cursor

Discuss modding questions and implementation details.
Post Reply
User avatar
King of Worms
Posts: 2484
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Cursor

Post by King of Worms » Mon Apr 08, 2019 1:36 pm

So, as I plan to wrap up the DREAM and release the summer versions on all platforms and take a break for a while Id like to include this awesome cursor made by VMBlast.

But how can I do so?

I want it to be a part of a DFMOD, Ive tryed everything but no luck.

What should the name of a cursor file be exactly?

What should I do?

Help!!! :D
cursor 32.png
cursor 32.png (2.37 KiB) Viewed 512 times
cursor 64.png
cursor 64.png (4.99 KiB) Viewed 512 times

User avatar
Interkarma
Posts: 4953
Joined: Sun Mar 22, 2015 1:51 am

Re: Cursor

Post by Interkarma » Tue Apr 09, 2019 3:52 am

I use a hardware cursor in DFU so that it's decoupled from resolution and frame-rate. Cursor is currently baked into build and not exposed to mod system.

I'm not sure if cursor texture can be changed at runtime, but Cursor.SetCursor() looks about right. I wonder if this is something TheLacus would be interested at looking into further?

User avatar
TheLacus
Posts: 983
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: Cursor

Post by TheLacus » Tue Apr 16, 2019 3:40 pm

I can do it but there are two limitations:
- It requires a specific texture type to be set in editor, so it can't be imported from loose files.
- Default cursor is used inside the main menu because mods are not loaded at that point yet.
Mod System documentation - Learn how to create mods for Daggerfall Unity.
Modder Discussion - General help and discussion for the mod system.
Github Issues - Submit a bug report for the game, including the mod system.

User avatar
King of Worms
Posts: 2484
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Cursor

Post by King of Worms » Tue Apr 16, 2019 5:20 pm

TheLacus wrote:
Tue Apr 16, 2019 3:40 pm
I can do it but there are two limitations:
- It requires a specific texture type to be set in editor, so it can't be imported from loose files.
- Default cursor is used inside the main menu because mods are not loaded at that point yet.
Hi, specific texture type settings are not a problem and I plan to use it in a DFMOD anyway.
Default cursor in the main menu is something we need to live with than, not a huge deal tho.
Would be great if this could be done, thank you for considering it Lacus!

User avatar
TheLacus
Posts: 983
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: Cursor

Post by TheLacus » Wed Apr 17, 2019 5:14 pm

An update on this:

- Read/Write flag must be enabled.
- A log warning is produced when cursor is set but the operation is actually succesful. Might be due to this bug, fixed in a later version.
- Given that this is only a specific texture to be loaded passively from an assetbundle, i can actually apply it from SetupGameWizard without waiting for the actual game scene. I don't think there are any particular contraindications.

I'm going to submit a PR.
Mod System documentation - Learn how to create mods for Daggerfall Unity.
Modder Discussion - General help and discussion for the mod system.
Github Issues - Submit a bug report for the game, including the mod system.

User avatar
King of Worms
Posts: 2484
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Cursor

Post by King of Worms » Wed Apr 17, 2019 8:45 pm

Awesome thanks a lot, finally the blue 320*200 cursor will be gone, fingers crossed .)

Post Reply