helper BGA for optimizing texture usage in simple frame graphics

This commit is contained in:
Chris Danford
2006-12-05 12:26:23 +00:00
parent 5245fbbdc2
commit b764e300f6
2 changed files with 20 additions and 0 deletions
@@ -0,0 +1,7 @@
local File, Width = ...
local FullFile = THEME:GetPathB('','_frame files 3x1/'..File )
return Def.ActorFrame { children = {
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,0;pause;horizalign,right;x,-Width/2) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,1;pause;zoomtowidth,Width) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,2;pause;horizalign,left;x,Width/2) };
}}
@@ -0,0 +1,13 @@
local File, Width, Height = ...
local FullFile = THEME:GetPathB('','_frame files 3x3/'..File )
return Def.ActorFrame { children = {
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,0;pause;horizalign,right;vertalign,bottom;x,-Width/2;y,-Height/2) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,1;pause;zoomtowidth,Width;vertalign,bottom;zoomtowidth,Width;y,-Height/2) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,2;pause;horizalign,left;vertalign,bottom;x,Width/2;y,-Height/2) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,3;pause;horizalign,right;x,-Width/2;zoomtoheight,Height) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,4;pause;zoomtowidth,Width;zoomtoheight,Height) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,5;pause;horizalign,left;x,Width/2;zoomtoheight,Height) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,6;pause;horizalign,right;vertalign,top;x,-Width/2;y,Height/2) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,7;pause;zoomtowidth,Width;vertalign,top;zoomtowidth,Width;y,Height/2) };
LoadActor( FullFile )() .. { InitCommand=cmd(setstate,8;pause;horizalign,left;vertalign,top;x,Width/2;y,Height/2) };
}}