marwing, mouse doesn't work on `N` notes screen
duianto opened this issue · 1 comments
duianto commented
In marwing
, the mouse doesn't work on the N
notes screen.
The mouse cursor should:
- become visible when
N
is pressed. - be hidden when the notes screen is closed:
N
esc
- or mouse click on top right
X
captaincolonelfox commented
I did this for PauseMenu
a-little-game-called-mario/scenes/ui/PauseMenu.gd
Lines 169 to 171 in 98151aa
a-little-game-called-mario/scenes/ui/PauseMenu.gd
Lines 179 to 181 in 98151aa
But doing the same thing for every UI node seems tedious, it would be better to use signals and make Marwing scene manage this on it own:
func _ready():
EventBus.connect("notes_opened", Input, "set_mouse_mode", [Input.MOUSE_MODE_VISIBLE])
EventBus.connect("notes_closed", Input, "set_mouse_mode", [Input.MOUSE_MODE_CAPTURED])
But there is a problem, the DialogueBox
in marwing level is a Popup
which is block the other UI controls. Not sure though if there is a reason for it to be a popup, and we probably can change it to be just a Control