Skip to content

Commit

Permalink
show cursor when typing
Browse files Browse the repository at this point in the history
  • Loading branch information
XuYicong authored and IsaacMarovitz committed May 8, 2023
1 parent 2636736 commit ac33fe5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions PlayTools/Controls/ControlMode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ public class ControlMode {
}

func setMapping(_ mapped: Bool) {
keyboardMapped = mapped
if mapped {
PlayInput.shared.parseKeymap()
} else {
show(true)
PlayInput.shared.invalidate()
}
keyboardMapped = mapped
}

func show(_ show: Bool) {
if !editor.editorMode {
if keyboardMapped {
if show {
if !visible {
NotificationCenter.default.post(name: NSNotification.Name.playtoolsCursorWillShow,
Expand Down
1 change: 0 additions & 1 deletion PlayTools/Controls/PlayInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class PlayInput {
Toucher.writeLog(logMessage: "editor opened? \(show)")
if show {
self.invalidate()
mode.show(show)
if let keyboard = GCKeyboard.coalesced!.keyboardInput {
keyboard.keyChangedHandler = { _, _, keyCode, pressed in
PlayKeyboard.handleEditorEvent(keyCode: keyCode, pressed: pressed)
Expand Down

0 comments on commit ac33fe5

Please sign in to comment.