HelloWorld theme handled.

This commit is contained in:
Jason Felds
2013-07-02 20:28:29 -04:00
parent 2d5d45e365
commit e805184fd0
16 changed files with 1116 additions and 747 deletions
@@ -1,4 +1,10 @@
return Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("#fffdf200"));
OnCommand=cmd(decelerate,1;diffusealpha,1);
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("#fffdf200"));
end;
OnCommand=function(self)
self:decelerate(1);
self:diffusealpha(1);
end;
};
@@ -1,6 +1,13 @@
return Def.ActorFrame{
Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("#fffdf200"));
OnCommand=cmd(sleep,1.125;decelerate,0.875;diffusealpha,1);
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("#fffdf200"));
end;
OnCommand=function(self)
self:sleep(1.125);
self:decelerate(0.875);
self:diffusealpha,(1);
end;
};
}
@@ -15,24 +15,55 @@ return Def.ActorFrame {
Def.ActorFrame{
Name="Flourishes";
-- it has to be 0.05 since 0.9 uses up space on both sides.
InitCommand=cmd(x,SCREEN_LEFT+(SCREEN_WIDTH*0.05);y,SCREEN_CENTER_Y;);
InitCommand=function(self)
self:x(SCREEN_LEFT + (SCREEN_WIDTH * 0.05);
self:y(SCREEN_CENTER_Y);
end;
Def.Quad{
Name="Red";
InitCommand=cmd(horizalign,left;zoomto,0,4;diffuse,color("#DA8989");diffuserightedge,color("#FFBBBB"));
OnCommand=cmd(sleep,0.1;linear,lineTime;zoomx,lineWidth);
InitCommand=function(self)
self:horizalign(left);
self:zoomto(0, 4);
self:diffuse(color("#DA8989"));
self:diffuserightedge(color("#FFBBBB"));
end;
OnCommand=function(self)
self:sleep(0.1);
self:linear(lineTime);
self:zoomx(lineWidth);
end;
};
Def.Quad{
Name="Yellow";
InitCommand=cmd(y,4;horizalign,left;zoomto,0,4;diffuse,color("#DAD989");diffuserightedge,color("#FFFCBB"));
OnCommand=cmd(sleep,0.05;linear,lineTime;zoomx,lineWidth);
InitCommand=function(self)
self:y(4);
self:horizalign(left);
self:zoomto(0, 4);
self:diffuse(color("#DAD989"));
self:diffuserightedge(color("#FFFCBB"));
end;
OnCommand=function(self)
self:sleep(0.05);
self:linear(lineTime);
self:zoomx(lineWidth);
end;
};
Def.Quad{
Name="Blue";
InitCommand=cmd(y,8;horizalign,left;zoomto,0,4;diffuse,color("#89C6DA");diffuserightedge,color("#BBEEFF"));
OnCommand=cmd(linear,lineTime;zoomx,lineWidth);
InitCommand=function(self)
self:y(8);
self:horizalign(left);
self:zoomto(0, 4);
self:diffuse(color("#89C6DA"));
self:diffuserightedge(color("#BBEEFF"));
end;
OnCommand=function(self)
self:linear(lineTime);
self:zoomx(lineWidth);
end;
};
};
@@ -48,25 +79,61 @@ return Def.ActorFrame {
-- and moves it 60 pixels to the left of horizontal center.
-- diffusealpha,0 makes the object invisible,
-- which is handy for transitions...
InitCommand=cmd(x,SCREEN_CENTER_X*0.8125;y,SCREEN_CENTER_Y-44;diffusealpha,0;);
InitCommand=function(self)
self:x(SCREEN_CENTER_X * 0.8125);
self:y(SCREEN_CENTER_Y - 44);
self:diffusealpha(0);
end;
-- ...as we see in the OnCommand. linear means to perform the next
-- commands over a span of time (in seconds).
-- diffusealpha,1 makes the logo fade in when applied here.
OnCommand=cmd(linear,0.5;diffusealpha,1;);
OnCommand=function(self)
self:linear(0.5);
self:diffusealpha(1);
end;
};
-- Creative Commons logo, using a local file in the same directory:
LoadActor( "creativecommons" )..{
InitCommand=cmd(x,SCREEN_LEFT+64;y,SCREEN_BOTTOM-43;Real);
OnCommand=cmd(addy,32;cropbottom,1;fadebottom,1;decelerate,0.8;cropbottom,0;fadebottom,0;addy,-32);
InitCommand=function(self)
self:x(SCREEN_LEFT + 64);
self:y(SCREEN_BOTTOM - 43);
self:Real();
end;
OnCommand=function(self)
self:addy(32);
self:cropbottom(1);
self:fadebottom(1);
self:decelerate(0.8);
self:cropbottom(0);
self:fadebottom(0);
self:addy(-32);
end;
};
-- Making a cheap reflection effect for the sake of showing off the fov and
-- vanishpoint commands on ActorFrames.
Def.ActorFrame{
InitCommand=cmd(fov,45;vanishpoint,SCREEN_LEFT+64,SCREEN_BOTTOM-20;);
InitCommand=function(self)
self:fov(45);
self:vanishpoint(SCREEN_LEFT + 64, SCREEN_BOTTOM - 20);
end;
LoadActor( "creativecommons" )..{
InitCommand=cmd(x,SCREEN_LEFT+64;y,SCREEN_BOTTOM-20;valign,0;zoomy,-0.6;rotationx,-60;diffusealpha,0.6;Real;);
OnCommand=cmd(croptop,1;fadetop,0;decelerate,0.8;croptop,0;fadetop,1;);
InitCommand=function(self)
self:x(SCREEN_LEFT + 64);
self:y(SCREEN_BOTTOM - 20);
self:valign(0);
self:zoomy(-0.6);
self:rotationx(-60);
self:diffusealpha(0.6);
self:Real();
end;
OnCommand=function(self)
self:croptop(1);
self:fadetop(0);
self:decelerate(0.8);
self:croptop(0);
self:fadetop(1);
end;
};
};
};
@@ -4,5 +4,7 @@ return Def.Quad{
-- colors can either be entered as hex ("#FFFFFFFF") or 0..1 ("1.0,1.0,1.0,1.0")
-- where the values are Red, Green, Blue, and Alpha (transparency).
InitCommand=cmd(FullScreen;diffuse,color("#fffdf2"));
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("#fffdf2"));
};
@@ -1,6 +1,12 @@
return Def.ActorFrame{
Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("#fffdf2FF"));
OnCommand=cmd(decelerate,0.75;diffusealpha,0);
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("#fffdf2FF"));
end;
OnCommand=function(self)
self:decelerate(0.75);
self:diffusealpha(0);
end;
};
};
@@ -1,6 +1,12 @@
return Def.ActorFrame{
Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("#fffdf200"));
OnCommand=cmd(decelerate,0.875;diffusealpha,1);
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("#fffdf200"));
end;
OnCommand=function(self)
self:decelerate(0.875);
self:diffusealpha(1);
end;
};
}
+5 -1
View File
@@ -1,4 +1,8 @@
local time = ...
if not time then time = 1.0 end
return Def.Actor{ OnCommand=cmd(sleep,time); };
return Def.Actor{
OnCommand=function(self)
self:sleep(time);
end;
};
@@ -1,21 +1,50 @@
local t = Def.ActorFrame{
Def.Quad{
InitCommand=cmd(zoomto,SCREEN_WIDTH,96;diffuse,color("#EEF4FFCC"));
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH, 96);
self:diffuse(color("#EEF4FFCC"));
end;
};
Def.ActorFrame{
InitCommand=cmd(y,12);
InitCommand=function(self)
self:y(12);
end;
LoadFont("_frutiger roman 24px")..{
Name="Header";
Text=ScreenString("Header");
InitCommand=cmd(x,-312;y,-34;halign,0;diffuse,color("#111111FF");diffusetopedge,color("#11111188");shadowlength,-1;shadowcolor,color("#FFFFFF44"));
InitCommand=function(self)
self:x(-312);
self:y(-34);
self:halign(0);
self:diffuse(color("#111111FF"));
self:diffusetopedge(color("#11111188"));
self:shadowlength(-1);
self:shadowcolor(color("#FFFFFF44"));
end;
};
Def.Quad{
InitCommand=cmd(zoomto,SCREEN_WIDTH*0.975,2;y,-20;diffuse,color("#111111FF");diffusetopedge,color("#11111188");shadowlength,-1;shadowcolor,color("#FFFFFF44");fadeleft,0.1;faderight,0.625);
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH * 0.975, 2);
self:y(-20);
self:diffuse(color("#111111FF"));
self:diffusetopedge(color("#11111188"));
self:shadowlength(-1);
self:shadowcolor(color("#FFFFFF44"));
self:fadeleft(0.1);
self:faderight(0.625);
end;
};
LoadFont("_frutiger roman 24px")..{
Name="Explanation";
Text=ScreenString("Explanation");
InitCommand=cmd(x,-312;y,-14;align,0,0;diffuse,color("#111111FF");zoom,0.65;wrapwidthpixels,(SCREEN_WIDTH));
InitCommand=function(self)
self:x(-312);
self:y(-14);
self:align(0, 0);
self:diffuse(color("#111111FF"));
self:zoom(0.65);
self:wrapwidthpixels(SCREEN_WIDTH);
end;
};
};
};
@@ -4,29 +4,68 @@ local itemName = gc:GetName()
local t = Def.ActorFrame{
-- focused frame
LoadActor( THEME:GetPathG("ReferenceBase","ItemFocused") )..{
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0);
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0);
end;
};
-- unfocused
LoadActor( THEME:GetPathG("SectionMenu","ItemUnfocused") )..{
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,0);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,1);
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(0);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(1);
end;
};
Def.ActorFrame{
LoadFont("_frutiger roman 24px")..{
Name="SectionName";
Text=ScreenString(itemName);
InitCommand=cmd(x,-250;y,-6;halign,0;diffuse,color("#222222FF"));
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0.5);
InitCommand=function(self)
self:x(-250);
self:y(-6);
self:halign(0);
self:diffuse(color("#222222FF"));
end;
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0.5);
end;
};
LoadFont("_frutiger roman 24px")..{
Name="SectionDesc";
Text=ScreenString(itemName.."Desc");
InitCommand=cmd(x,-248;y,10;align,0,0;diffuse,color("#222222FF");zoom,0.5);
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0.5);
InitCommand=function(self)
self:x(-248);
self:y(10);
self:align(0, 0);
self:diffuse(color("#222222FF"));
self:zoom(0.5);
end;
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0.5);
end;
};
};
};
@@ -1,21 +1,50 @@
local t = Def.ActorFrame{
Def.Quad{
InitCommand=cmd(zoomto,SCREEN_WIDTH,120;diffuse,color("#EEF4FFCC"));
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH, 120);
self:diffuse(color("#EEF4FFCC"));
end;
};
Def.ActorFrame{
InitCommand=cmd(y,16);
InitCommand=function(self)
self:y(16);
end;
LoadFont("_frutiger roman 24px")..{
Name="Header";
Text=THEME:GetString("ScreenGuideMain","Header");
InitCommand=cmd(x,-312;y,-50;halign,0;diffuse,color("#111111FF");diffusetopedge,color("#11111188");shadowlength,-1;shadowcolor,color("#FFFFFF44"));
InitCommand=function(self)
self:x(-312);
self:y(-50);
self:halign(0);
self:diffuse(color("#111111FF"));
self:diffusetopedge(color("#11111188"));
self:shadowlength(-1);
self:shadowcolor(color("#FFFFFF44"));
end;
};
Def.Quad{
InitCommand=cmd(zoomto,SCREEN_WIDTH*0.975,2;y,-32;diffuse,color("#111111FF");diffusetopedge,color("#11111188");shadowlength,-1;shadowcolor,color("#FFFFFF44");fadeleft,0.1;faderight,0.625);
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH * 0.975, 2);
self:y(-32);
self:diffuse(color("#111111FF"));
self:diffusetopedge(color("#11111188"));
self:shadowlength(-1);
self:shadowcolor(color("#FFFFFF44"));
self:fadeleft(0.1);
self:faderight(0.625);
end;
};
LoadFont("_frutiger roman 24px")..{
Name="Explanation";
Text=THEME:GetString("ScreenGuideMain","Explanation");
InitCommand=cmd(x,-312;y,-24;align,0,0;diffuse,color("#111111FF");zoom,0.65;wrapwidthpixels,(SCREEN_WIDTH));
InitCommand=function(self)
self:x(-312);
self:y(-24);
self:align(0, 0);
self:diffuse(color("#111111FF"));
self:zoom(0.65);
self:wrapwidthpixels(SCREEN_WIDTH);
end;
};
};
};
@@ -4,35 +4,86 @@ local itemName = gc:GetName()
local t = Def.ActorFrame{
-- focused frame
LoadActor( THEME:GetPathG("SectionMenu","ItemFocused") )..{
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0);
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0);
end;
};
-- unfocused
LoadActor( THEME:GetPathG("SectionMenu","ItemUnfocused") )..{
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,0);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,1);
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(0);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(1);
end;
};
LoadActor( THEME:GetPathG("_section", "Guide") )..{
InitCommand=cmd(x,-240;y,-23;Real;halign,0);
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,0.9);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0.45);
InitCommand=function(self)
self:x(-240);
self:y(-23);
self:Real();
self:halign,(0);
end;
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(0.9);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0.45);
end;
};
Def.ActorFrame{
LoadFont("_frutiger roman 24px")..{
Name="SectionName";
Text=THEME:GetString("ScreenGuideMain",itemName);
InitCommand=cmd(x,-246;y,-6;halign,0;diffuse,color("#222222FF"));
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0.5);
InitCommand=function(self)
self:x(-246);
self:y(-6);
self:halign(0);
self:diffuse(color("#222222FF"));
end;
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0.5);
end;
};
LoadFont("_frutiger roman 24px")..{
Name="SectionDesc";
Text=THEME:GetString("ScreenGuideMain",itemName.."Desc");
InitCommand=cmd(x,-244;y,10;align,0,0;diffuse,color("#222222FF");zoom,0.5);
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0.5);
InitCommand=function(self)
self:x(-244);
self:y(10);
self:align(0, 0);
self:diffuse(color("#222222FF"));
self:zoom(0.5);
end;
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0.5);
end;
};
};
};
@@ -1,21 +1,50 @@
local t = Def.ActorFrame{
Def.Quad{
InitCommand=cmd(zoomto,SCREEN_WIDTH,96;diffuse,color("#EEF4FFCC"));
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH, 96);
self:diffuse(color("#EEF4FFCC"));
end;
};
Def.ActorFrame{
InitCommand=cmd(y,12);
InitCommand=function(self)
self:y(12);
end;
LoadFont("_frutiger roman 24px")..{
Name="Header";
Text=THEME:GetString("ScreenReferenceMain","Header");
InitCommand=cmd(x,-312;y,-34;halign,0;diffuse,color("#111111FF");diffusetopedge,color("#11111188");shadowlength,-1;shadowcolor,color("#FFFFFF44"));
InitCommand=function(self)
self:x(-312);
self:y(-34);
self:halign(0);
self:diffuse(color("#111111FF"));
self:diffusetopedge(color("#11111188"));
self:shadowlength(-1);
self:shadowcolor(color("#FFFFFF44"));
end;
};
Def.Quad{
InitCommand=cmd(zoomto,SCREEN_WIDTH*0.975,2;y,-20;diffuse,color("#111111FF");diffusetopedge,color("#11111188");shadowlength,-1;shadowcolor,color("#FFFFFF44");fadeleft,0.1;faderight,0.625);
InitCommand=function(self)
self:zoomto(SCREEN_WIDTH * 0.975, 2);
self:y(-20);
self:diffuse(color("#111111FF"));
self:diffusetopedge(color("#11111188"));
self:shadowlength(-1);
self:shadowcolor(color("#FFFFFF44"));
self:fadeleft(0.1);
self:faderight(0.625);
end;
};
LoadFont("_frutiger roman 24px")..{
Name="Explanation";
Text=THEME:GetString("ScreenReferenceMain","Explanation");
InitCommand=cmd(x,-312;y,-14;align,0,0;diffuse,color("#111111FF");zoom,0.65;wrapwidthpixels,(SCREEN_WIDTH));
InitCommand=function(self)
self:x(-312);
self:y(-14);
self:align(0, 0);
self:diffuse(color("#111111FF"));
self:zoom(0.65);
self:wrapwidthpixels(SCREEN_WIDTH);
end;
};
};
};
@@ -5,41 +5,104 @@ local url = gc:GetUrl()
local t = Def.ActorFrame{
-- focused frame
LoadActor( THEME:GetPathG("SectionMenu","ItemFocused") )..{
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0);
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha,(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0);
end;
};
-- unfocused
LoadActor( THEME:GetPathG("SectionMenu","ItemUnfocused") )..{
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,0);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,1);
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(0);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(1);
end;
};
LoadActor( THEME:GetPathG("_section", "Reference") )..{
InitCommand=cmd(x,-240;y,-23;Real;halign,0);
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,0.9);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0.45);
InitCommand=function(self)
self:x(-240);
self:y(-23);
self:Real();
self:halign(0);
end;
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(0.9);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0.45);
end;
};
Def.ActorFrame{
LoadFont("_frutiger roman 24px")..{
Name="SectionName";
Text=THEME:GetString("ScreenReferenceMain",itemName);
InitCommand=cmd(x,-246;y,-6;halign,0;diffuse,color("#222222FF"));
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0.5);
InitCommand=function(self)
self:x(-246);
self:y(-6);
self:halign(0);
self:diffuse(color("#222222FF"));
end;
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0.5);
end;
};
LoadFont("_frutiger roman 24px")..{
Name="SectionDesc";
Text=THEME:GetString("ScreenReferenceMain",itemName.."Desc");
InitCommand=cmd(x,-244;y,10;align,0,0;diffuse,color("#222222FF");zoom,0.5);
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0.5);
InitCommand=function(self)
self:x(-244);
self:y(10);
self:align(0, 0);
self:diffuse(color("#222222FF"));
self:zoom(0.5);
end;
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0.5);
end;
};
LoadActor(THEME:GetPathG("_tango","webbrowser"))..{
Name="UrlIcon";
InitCommand=cmd(x,224;y,4;zoom,0.75;visible,url~="");
GainFocusCommand=cmd(decelerate,0.25;diffusealpha,1);
LoseFocusCommand=cmd(stoptweening;decelerate,0.25;diffusealpha,0.5);
InitCommand=function(self)
self:x(224);
self:y(4);
self:zoom(0.75);
self:visible(url~="");
end;
GainFocusCommand=function(self)
self:decelerate(0.25);
self:diffusealpha(1);
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:decelerate(0.25);
self:diffusealpha(0.5);
end;
};
};
};
@@ -23,12 +23,40 @@ local t = Def.ActorFrame{
-- then an error will pop up telling you where you need to add the
-- string.
Text=THEME:GetString( 'ScreenTitleMenu', gc:GetText() );
InitCommand=cmd(zoom,0.85;y,-1;shadowlength,0;diffuse,color("#000000");halign,1;strokecolor,color("0,0,0,0"););
DisabledCommand=cmd( diffuse,color("0.45,0,0,1") );
GainFocusCommand=cmd(stoptweening;accelerate,0.15;diffuse,color("#000000");strokecolor,color("0.85,0.9,1,0.75"););
LoseFocusCommand=cmd(stoptweening;accelerate,0.2;diffuse,color("#888888");strokecolor,color("0,0,0,0"););
OffFocusedCommand=cmd(sleep,0.45;decelerate,1;addx,-32;diffuse,color("#FF000000"););
OffUnfocusedCommand=cmd(sleep,0.125*gc:GetIndex();linear,0.5;addx,SCREEN_CENTER_X;);
InitCommand=function(self)
self:zoom(0.85);
self:y(-1);
self:shadowlength(0);
self:diffuse(color("#000000"));
self:halign(1);
self:strokecolor(color("0,0,0,0"));
end;
DisabledCommand=function(self)
self:diffuse(color("0.45,0,0,1"));
end;
GainFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.15);
self:diffuse(color("#000000"));
self:strokecolor(color("0.85,0.9,1,0.75"));
end;
LoseFocusCommand=function(self)
self:stoptweening();
self:accelerate(0.2);
self:diffuse(color("#888888"));
self:strokecolor(color("0,0,0,0"));
end;
OffFocusedCommand=function(self)
self:sleep(0.45);
self:decelerate(1);
self:addx(-32);
self:diffuse(color("#FF000000"));
end;
OffUnfocusedCommand=function(self)
self:sleep(0.125 * gc:GetIndex());
self:linear(0.5);
self:addx(SCREEN_CENTER_X);
end;
};
};
+3 -3
View File
@@ -139,9 +139,9 @@ function ActorFrame:propagatecommand(...)
end
-- Shortcut for alignment.
-- cmd(align,0.5,0.5) -- align center
-- cmd(align,0.0,0.0) -- align top-left
-- cmd(align,0.5,0.0) -- align top-center
-- function(self) self:align(0.5,0.5); end; -- align center
-- function(self) self:align(0.0,0.0); end; -- align top-left
-- function(self) self:align(0.5,0.0); end; -- align top-center
function Actor:align(h, v)
self:halign( h )
self:valign( v )
@@ -2,7 +2,10 @@ local raveChildren
local bg = Def.ActorFrame{
Def.Quad{
InitCommand=cmd(FullScreen;diffuse,color("0,0,0,0"));
InitCommand=function(self)
self:FullScreen();
self:diffuse(color("0,0,0,0"));
end;
OnCommand=cmd(linear,5;diffusealpha,1);
};