Page 1 of 1

Cursor

Posted: Mon Apr 08, 2019 1:36 pm
by King of Worms
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 1728 times
cursor 64.png
cursor 64.png (4.99 KiB) Viewed 1728 times

Re: Cursor

Posted: Tue Apr 09, 2019 3:52 am
by Interkarma
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?

Re: Cursor

Posted: Tue Apr 16, 2019 3:40 pm
by TheLacus
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.

Re: Cursor

Posted: Tue Apr 16, 2019 5:20 pm
by King of Worms
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!

Re: Cursor

Posted: Wed Apr 17, 2019 5:14 pm
by TheLacus
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.

Re: Cursor

Posted: Wed Apr 17, 2019 8:45 pm
by King of Worms
Awesome thanks a lot, finally the blue 320*200 cursor will be gone, fingers crossed .)