MouseTest theme covered.

This commit is contained in:
Jason Felds
2013-07-01 21:41:29 -04:00
parent c31d1f1c9d
commit ca1b8cb942
4 changed files with 74 additions and 24 deletions
@@ -12,30 +12,50 @@ local itemColors = {
};
local t = Def.ActorFrame{
--[[
Def.Actor{
Name="TitleMenuController";
GainFocusCommand=function(self)
MESSAGEMAN:Broadcast("TitleChange",{NewColor=itemColors[index+1]});
end;
};
]]
LoadFont("Common Normal")..{
Text=Screen.String(text);
InitCommand=cmd(diffuse,color("1,1,1,1"));
DisabledCommand=cmd(diffuse,color("0.5,0.5,0.5,0.85"));
--GainFocusCommand=cmd(stoptweening;linear,0.25;diffuse,itemColors[index+1]);
GainFocusCommand=cmd(stoptweening;linear,0.25;diffuse,color("1,0.2,0.2,1"));
LoseFocusCommand=cmd(stoptweening;linear,0.25;diffuse,color("1,1,1,1"));
InitCommand=function(self)
self:diffuse(color("1,1,1,1"));
end;
DisabledCommand=function(self)
self:diffuse(color("0.5,0.5,0.5,0.85"));
end;
GainFocusCommand=function(self)
self:stoptweening();
self:linear(0.25);
self:diffuse(color("1,0.2,0.2,1"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:linear(0.25);
self:diffuse(color("1,1,1,1"));
end;
};
--[[ begin triangle ]]
Def.Quad{
InitCommand=cmd(x,-SCREEN_WIDTH*0.105;zoomto,8,24;zwrite,true;blend,'BlendMode_NoEffect');
InitCommand=function(self)
self:x(-SCREEN_WIDTH * 0.105);
self:zoomto(8, 24);
self:zwrite(true);
self:blend('BlendMode_NoEffect');
end;
};
Def.Quad{
InitCommand=cmd(x,-SCREEN_WIDTH*0.1;zoomto,12,12;rotationz,45;diffuselowerleft,color("0,0,0,0");ztest,true);
GainFocusCommand=cmd(stoptweening;visible,true);
LoseFocusCommand=cmd(stoptweening;visible,false);
InitCommand=function(self)
self:x(-SCREEN_WIDTH * 0.1);
self:zoomto(12, 12);
self:rotationz(45);
self:diffuselowerleft(color("0,0,0,0"));
self:ztest(true);
end;
GainFocusCommand=function(self)
self:stoptweening();
self:visible(true);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:visible(false);
end;
};
--[[ end triangle ]]
};