From 4db9cf7cee663070f679084f668ec0ce719b41df Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Wed, 19 Jul 2023 21:17:45 -0700 Subject: [PATCH] UITextBox muxh better --- source/funkin/editors/ui/UIState.hx | 2 ++ source/funkin/editors/ui/UITextBox.hx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/funkin/editors/ui/UIState.hx b/source/funkin/editors/ui/UIState.hx index 924b4ec0..f264e8ca 100644 --- a/source/funkin/editors/ui/UIState.hx +++ b/source/funkin/editors/ui/UIState.hx @@ -104,6 +104,8 @@ class UIState extends MusicBeatState { if (FlxG.mouse.justReleased) currentFocus = (hoveredSprite is IUIFocusable) ? (cast hoveredSprite) : null; + FlxG.sound.keysAllowed = currentFocus != null ? !(currentFocus is UITextBox) : true; + if (hoveredSprite != null) { Mouse.cursor = hoveredSprite.cursor; hoveredSprite = null; diff --git a/source/funkin/editors/ui/UITextBox.hx b/source/funkin/editors/ui/UITextBox.hx index 2659f7d0..2d7661f1 100644 --- a/source/funkin/editors/ui/UITextBox.hx +++ b/source/funkin/editors/ui/UITextBox.hx @@ -30,6 +30,8 @@ class UITextBox extends UISliceSprite implements IUIFocusable { members.push(caretSpr); this.multiline = multiline; position = text.length; + + cursor = IBEAM; } var cacheRect:Rectangle = new Rectangle();