#Tool: FRT/Godot mouse input package (Updated)

12 messages · Page 1 of 1 (latest)

dawn elm
#

(A slightly updated instruction to make it a little easier.)

This is a set with the asset + scripts needed to add a rudimentary mouse icon to frt/Godot games that usually lack it. Without the porter needing any coding know-how.

Godot already has a built in mouse icon selector, but sadly it doesn't seem to work in most cases when using frt on these handhelds.
The code is pretty simple, but it works.

Instructions:

  1. Extract the files of the .zip file here into the Godot project you want to add a mouse cursor to.
  2. In the Godot editor (with the game project open), In the upper left bar, go to Project > Project Settings, and then select AutoLoad in the top sections.
  3. Click on the folder icon next to "Path:", and in the file selection window select the MouseLayer.tscn file that you extracted earlier. Now click on the "add" button.

To change the mouse cursor, simply replace the .png file with a png of your choice and rename it to be the same as the one in this zip.

Edit: Check my comment a little further down for updated package

#

Accidentally deleted the old thread, hence the new one

arctic sonnet
dawn elm
#

Yeah, that's definitely a good idea, better to have it all in one place for potential porters

#

Do we have a git for the website or something for me to tack it on, or do you just manage it yourself?

dawn elm
#

Joanilson discovered an incompatibility with some Godot versions due to changes in the scripting language. Here is an updated version of my pack where a changed a few things to avoid using onready altogether, hopefully making it compatible with all 3.X versions

unreal rock
arctic sonnet
#

Frt is the runtime for Godot games ^^

unreal rock
#

I know… just trying my luck :p

dawn elm
# unreal rock Just to check, can this add a mouse for gamemaker games too? :p

I wish haha
No, this is essentially a Godot GDScript (Godot's proprietary scripting language) with a Godot specific image module to position the png included in 2D space and execute the script.
I'm sure implementing the same script in gamemaker's scripting language would be just as easy (not sure how modular gamemaker is though?), but I haven't taken any time to play around with it personally

wooden jackal
#

I think for gamemaker the best way to do this would be to extend gmloader and draw a mouse cursor directly in the SDL window.
That's what i'm planning to do to implement "touch" input on Bogodroid. Though I'm focusing on games with controller support anyway.
When I have that working I'll make a pull request to the gmloader-next repo to backport this feature (maybe put it behind a command flag), if Johnny is okay with that.