Files
itgmania212121/Themes/MouseTest/BGAnimations/ScreenTitleMenu underlay.lua
T

50 lines
1.1 KiB
Lua
Raw Normal View History

2011-03-17 01:47:30 -04:00
local t = Def.ActorFrame{};
local mou = Def.ActorFrame{
LoadFont("common normal")..{
Name="Coords";
2013-07-01 21:41:29 -04:00
InitCommand=function(self)
self:align(0, 0);
self:x(SCREEN_LEFT + 8);
self:y(SCREEN_BOTTOM - 48);
end;
2011-03-17 01:47:30 -04:00
};
};
local function UpdateMouse(self)
local coords = self:GetChild("Coords")
local mouseX = INPUTFILTER:GetMouseX()
local mouseY = INPUTFILTER:GetMouseY()
local text = "[Mouse] X: ".. mouseX .." Y: ".. mouseY;
coords:settext(text)
end
2013-07-01 21:41:29 -04:00
mou.InitCommand=function(self)
self:SetUpdateFunction();
UpdateMouse();
end;
2011-03-17 01:47:30 -04:00
t[#t+1] = mou;
t[#t+1] = Def.ActorFrame{
LoadFont("Common normal")..{
Name="Title";
Text=THEME:GetString("MouseTest","Title");
2013-07-01 21:41:29 -04:00
InitCommand=function(self)
self:CenterX();
self:y(SCREEN_TOP + 28);
self:diffuse(color("#333333"));
end;
2011-03-17 01:47:30 -04:00
};
LoadFont("Common normal")..{
Name="Instructions";
Text=THEME:GetString("MouseTest","Instructions");
2013-07-01 21:41:29 -04:00
InitCommand=function(self)
self:x(SCREEN_LEFT + 12);
self:align(0, 0);
self:y(SCREEN_TOP + 42);
self:diffuse(color("#333333"));
self:zoom(2 / 3);
self:wrapwidthpixels(SCREEN_WIDTH * 1.5);
end;
2011-03-17 01:47:30 -04:00
};
};
2011-02-23 21:23:51 -06:00
return t;