File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import "Esy.ChatNotif.Callback";
77NotifWindow = class (Turbine .UI .Window ); -- Inherit from Turbine.UI.Window
88
99function NotifWindow :Constructor ()
10- -- Turbin Window fields
10+ -- Turbine Window fields
1111 Turbine .UI .Window .Constructor (self );
1212 local WINDOW_WIDTH = 500 ;
1313 local WINDOW_HEIGHT = 500 ;
@@ -18,6 +18,20 @@ function NotifWindow:Constructor()
1818 self :SetLock (SETTINGS .POSITION_LOCKED );
1919 self :SetVisible (true );
2020
21+
22+
23+ -- Hide the window when the UI is hidden
24+ self :SetWantsKeyEvents (true );
25+ self .KeyDown = function (sender , args )
26+ if (args .Action == Turbine .UI .Lotro .Action .Escape ) then
27+ self :SetVisible (true );
28+ elseif (args .Action == 268435635 ) then
29+ self :SetVisible (not self :IsVisible ());
30+ end
31+ end
32+
33+
34+
2135 -- Ability to move the window when unlocked
2236 local mousePositionBefore = nil ;
2337 local windowPositionBefore = nil ;
You can’t perform that action at this time.
0 commit comments