How to hide mouse cursor in Godot Media Controller

This is a repost of my instruction that originally were posted in July 2024 and hosted at GillPinball Atlassian Confluence.
Instruction is written for GMC/Godot Media Controller and MPF/Mission Pinball Framework (https://missionpinball.org/) but shouldn’t differ much if programing anything else in Godot.

  1. Load your MPFWindow scene in Godot.
  2. Add any Child Node, I suggest you add a label.
  3. Make the label hidden so it don’t show up in all your scenes.
  4. Right click on your Label and choose Attach script. Create the gd-script.
  5. Go to Script at the top or double click the script in the FileSystem (inside Godot).
  6. Add a function like below…. if you have another node than Label the extends differs.
GDScript
extends Label

func _ready():
      Input.mouse_mode = Input.MOUSE_MODE_HIDDEN

Leave a Reply

Your email address will not be published. Required fields are marked *