Hello,
I'm having trouble with Lotro.UI.Window events. I understand that there's some sort of caveat here but I seem to miss it.
Code:
MyWindow = class(Turbine.UI.Window());
function MyWindow:Constructor()
Turbine.UI.Window.Constructor(self);
self.defaultWidth = 220;
self.defaultHeight = 100;
self:SetMinimumHeight(self.defaultHeight);
self:SetSize(self.defaultWidth, self.defaultHeight);
self:SetMouseVisible(true);
self:SetWantsUpdates(true); -- seems like it doesn't do anything
local bbg = Turbine.UI.Color(rgb(7),rgb(32),rgb(71));
self:SetBackColor( bbg );
self:SetPosition(100,100);
self:SetVisible(true);
Turbine.Shell.WriteLine((Dump(self.MouseDownHandler));
--self.MouseDown = function(s,a) debug("MouseDown"); end; -- not working
self.MouseDown = self.MouseDownHandler; -- not working
end
function MyWindow:MouseDownHandler(s,a)
Turbine.Shell.WriteLine("MouseDownHandler");
end
--Not working either
--function MyWindow:MouseDown(s,a)
-- Turbine.Shell.WriteLine("MouseDown");
--end
So it paints but there are no events recorded. However any added control to the window works fine. To make sure that the windows answers, do I have to make sure it has a "shadow" control to get the events?
TIA