This member cannot be used in scripts, but is usable in the command bar and plugins.
WindowFocusReleased fires immediately when the user stops interacting with the PluginGui’s window, usually by clicking on on something not in the window. This functions works similarly to the similarly-named
If focus is moving to another
PluginGui while the user had this PluginGui in focus, then this event fires before the other’s
PluginGui/WindowFocused|WindowFocused event. However, if the main game window is being put in focus, this event fires after
Detecting PluginGui Focus State
This code sample demonstrates how the focus state of a
PluginGui can be tracked using the
PluginGui/WindowFocusReleased|WindowFocusReleased events. It changes the
PluginGui/Title|Title as the focus state changes.
local dwpgi = DockWidgetPluginGuiInfo.new( Enum.InitialDockState.Float, true, true, 200, 50, 1, 1 ) local widget = plugin:CreateDockWidgetPluginGui("TestWidget", dwpgi) widget.WindowFocusReleased:Connect(function (...) widget.Title = "I'm not in focus :(" end) widget.WindowFocused:Connect(function (...) widget.Title = "I'm in focus :D" end)