Please add on_gui_focus or on_gui_unfocus events that are raised when the element is defined with raise_focus_events as true (of course false by default)
When bringing this up in the discord, raiguard pointed out that it would add a lot of network overhead. Someone else promptly brought up on_gui_hover and its raise_hover_events
I just want to make my custom editable label parity with base game. eg: pressing escape canceling the edit
This would be implemented with these added events by registering the textfield as player.opened (and handling the window itself being 'closed') when focused and reinstating the window as opened when unfocused. Paired with a closed handler on the textfield itself that knows when it was closed due to being unfocused and when it was actually 'closed'
This already works when hard-calling the focus and unfocus handlers I wrote before realizing the events didn't exist. I just can't properly re-register the window as opened when someone clicks off of it. I do kind of enjoy the behavior of it canceling it even when it's no longer focused, but that's not how base does it (I have absolutely lost blueprint names to this). I want parity, not whatever my idea of 'better' is (though I do consider the edit button label behavior a bug so I'll be fixing that :P)
Please add on_gui_focus and on_gui_unfocus
Re: Please add on_gui_focus and on_gui_unfocus
I'm trying to reimplement the search bar from base game and this sounds like it would make it possible, so add me to the count of people wanting this.
Either that or an is_focused field on LuaGuiElement to be able to check if something is focused.
Either that or an is_focused field on LuaGuiElement to be able to check if something is focused.