fixup: odn't use ScreenMetric outside of init

This commit is contained in:
Glenn Maynard
2007-03-07 03:58:16 +00:00
parent 62700dffa4
commit 764402bca7
@@ -1,28 +1,33 @@
local children = { }; local children = { };
children[#children+1] = Def.HelpDisplay { local function MakeHelpDisplay()
File = THEME:GetPathF("HelpDisplay", "text"); local X = self:x( ScreenMetric("HelpX") );
local Y = self:y( ScreenMetric("HelpY") );
local On = ScreenMetric("HelpOnCommand");
local Off = ScreenMetric("HelpOffCommand");
InitCommand=function(self) local t = Def.HelpDisplay {
local s = ScreenString("HelpText"); File = THEME:GetPathF("HelpDisplay", "text");
self:SetTipsColonSeparated(s);
end;
SetHelpTextCommand=function(self, params) InitCommand=function(self)
self:SetTipsColonSeparated( params.Text ); local s = ScreenString("HelpText");
end; self:SetTipsColonSeparated(s);
OnCommand=function(self) end;
self:x( ScreenMetric("HelpX") );
self:y( ScreenMetric("HelpY") );
local f = ScreenMetric("HelpOnCommand");
f(self);
end;
OffCommand=function(self)
local f = ScreenMetric("HelpOffCommand");
f(self);
end;
};
SetHelpTextCommand=function(self, params)
self:SetTipsColonSeparated( params.Text );
end;
OnCommand=function(self)
self:x( X );
self:y( Y );
On(self);
end;
OffCommand=Off;
};
return t;
end
children[#children+1] = MakeHelpDisplay();
return Def.ActorFrame { return Def.ActorFrame {
children = children; children = children;
}; };