[EntryPoint]class uC:CoroutineScene{Skin@D;Font@AG;IF@F;GE@m;HE@lD;array<VA@>WA(5);IE@N;JE@Q;KE@BA;LE@f;
KD@HB;void Initialize(){@D=GetSkin();@AG=D.GetFont("Normal64");}void Run(){RunCoroutine(Coroutine(BG),"Select:Main");
RunCoroutine(Coroutine(CG),"Select:HilightCursorEffect");RunCoroutine(Coroutine(DG),"Select:HilightCursorEffect");
YieldTime(0.5);RunCoroutine(Coroutine(EG),"Select:KeyInput");while(true)YieldTime(30);}void Draw(){}void BG(){@F=IF();
FG();@m=GE(D);m.vC(pA::Center);m.UB=true;m.VB=true;m.wA=true;@lD=HE(D);@N=IE(D,GetIntData("AutoPlay"),GetBoolData("MusicSelector::ToolTipVisibility"));
@Q=JE(D);@BA=KE(D,GetDoubleData("SpeedPreset::CustomSpeed"),GetIntData("SpeedPreset::Index"));@HB=KD(D);
@f=LE(D,GetIntData("CharacterSelector::CharacterIndex"),HB);@lD.p=f.hB();@WA[0]=cast<VA>(N);@WA[1]=cast<VA>(Q);
@WA[2]=cast<VA>(BA);@WA[3]=cast<VA>(f);@WA[4]=cast<VA>(HB);N.w(GetIntData("MusicSelector::CategoryIndex"),GetIntData("MusicSelector::MusicIndex"),P(GetIntData("MusicSelector::Difficulty")),GetIntData("MusicSelector::Level"));
F.O("LevelUp").T=N.FC();F.O("LevelDown").T=N.GC();F.kA(array<string>={"Left","Right","Select","LevelDown","LevelUp","SwitchToCategory"});
while(true)YieldFrame(1);}void qA(string LD,string h,int value){SettingItem@XA=GetSettingItem(LD,h);
if(XA!is null){while(parseInt(XA.GetItemText())<value)XA.MoveNext();while(parseInt(XA.GetItemText())>value)XA.MovePrevious();
}}void JF(string LD,string h,bool value){SettingItem@XA=GetSettingItem(LD,h);if(XA!is null){if(((XA is null)?false:(XA.GetItemText()=="有効"))!=value)XA.MoveNext();
}}void TH(string LD,string h,string GG){SettingItem@XA=GetSettingItem(LD,h);if(XA!is null){SetData(GG,parseInt(XA.GetItemText()));
}}void EG(){while(true){if(IsKeyTriggered(Key::INPUT_ESCAPE)){SettingItem@XA;qA("Skin_Data","LastSelectedMusicCategoryIndex",N.YA+0);
qA("Skin_Data","LastSelectedMusicIndex",N.i+0);qA("Skin_Data","LastUsedDifficulty",N.n+0);qA("Skin_Data","LastUsedLevel",N.ME+0);
qA("Skin_Data","LastSelectedCharacterIndex",f.i+0);p@U=f.hB();qA("Skin_Data","LastSelectedSkillIndex",((U is null)?0:U.HG)+0);
qA("Skin_Data","LastSelectedPlayMode",N.wC);JF("Skin_Data","ToolTipVisibility",N.MD);if(Execute("Title.as"))Disappear();
}if(IsKeyTriggered(Key::INPUT_LSHIFT)||IsKeyTriggered(Key::INPUT_RSHIFT)){N.wC=(N.wC==2)?0:(N.wC+1);
}if(IsKeyTriggered(Key::INPUT_F1)){N.MD=!N.MD;}F.IG();YieldFrame(1);}}void CG(){while(true)m.ND();}void DG(){while(true)HB.ND();
}void FG(){DA@L;if(F is null||D is null)return;@L=DA(D,D.GetImage("Button-Green_3"),"Left",ZA(JG));L.aA("左",0,3,true,false);
L.rA(INPUT_LEFT);F.fA(L);@L=DA(D,D.GetImage("Button-Green_3"),"Right",ZA(KG));L.aA("右",3,3,true,false);
L.rA(INPUT_RIGHT);F.fA(L);@L=DA(D,D.GetImage("Button-Orange_4"),"Select",ZA(KF));L.aA("選択",6,4,true,false);
L.rA(INPUT_RETURN);F.fA(L);@L=DA(D,D.GetImage("Button-Orange_4"),"Customise",ZA(KF));L.aA("カスタマイズ",6,4,true,false);
L.rA(INPUT_RETURN);F.fA(L);@L=DA(D,D.GetImage("Button-Red_4"),"Enter",ZA(LG));L.aA("決定",6,4,true,false);
L.rA(INPUT_RETURN);F.fA(L);@L=DA(D,D.GetImage("Button-Purple_4"),"ChangeSettings",ZA(MG));L.aA("設定変更",6,4,false,false);
L.rA(INPUT_RETURN);F.fA(L);@L=DA(D,D.GetImage("Button-White_2"),"SortMusic",ZA(NE));L.aA("楽曲ソート",10,2,false,false);
L.HC(0.85,1);F.fA(L);@L=DA(D,D.GetImage("Button-White_2"),"CharaInfo",ZA(NE));L.aA("キャラ詳細",10,2,false,false);
L.HC(0.85,1);F.fA(L);@L=DA(D,D.GetImage("Button-White_2"),"LevelDown",ZA(LF));L.aA("-レベル",10,2,true,false);
L.rA(INPUT_DOWN);F.fA(L);@L=DA(D,D.GetImage("Button-White_2"),"PrevHeader",ZA(LF));L.aA("前の先頭へ",10,2,false,false);
L.HC(0.8,1);L.rA(INPUT_DOWN);F.fA(L);@L=DA(D,D.GetImage("Button-White_2"),"LevelUp",ZA(MF));L.aA("レベル+",12,2,true,false);
L.rA(INPUT_UP);F.fA(L);@L=DA(D,D.GetImage("Button-White_2"),"NextHeader",ZA(MF));L.aA("次の先頭へ",12,2,false,false);
L.HC(0.8,1);L.rA(INPUT_UP);F.fA(L);@L=DA(D,D.GetImage("Button-Yellow_2"),"SwitchToCategory2",ZA(NF));
L.aA("ジャンル切り替え",12,2,true,false);L.HC(0.5,1);L.rA(INPUT_TAB);F.fA(L);@L=DA(D,D.GetImage("Button-Yellow_2"),"SwitchToCategory",ZA(NF));
L.aA("ジャンル切り替え",14,2,true,false);L.HC(0.5,1);L.rA(INPUT_TAB);F.fA(L);@L=DA(D,D.GetImage("Button-Blue_2"),"SwitchToMusic",ZA(NE));
L.aA("曲選択へ戻る",14,2,true,false);L.HC(0.7,1);L.rA(INPUT_BACK);F.fA(L);@L=DA(D,D.GetImage("Button-Purple_2"),"OverLimit",ZA(OF));
L.aA("限界突破",14,2,false,false);F.fA(L);@L=DA(D,D.GetImage("Button-Red_2"),"DecideBack",ZA(OF));L.aA("決定して戻る",14,2,true,false);
L.HC(0.7,1);L.rA(INPUT_BACK);F.fA(L);}void JG(void){for(uint C=0;C<WA.length();C++){if(WA[C].o()){WA[C].UC();
F.O("Left").T=WA[C].q();F.O("Right").T=WA[C].r();m.UB=WA[C].q();m.VB=WA[C].r();break;}}if(N.o()){F.O("LevelUp").T=N.FC();
F.O("LevelDown").T=N.GC();j@c=cast<j>(N.sA);F.O("Select").T=(c!is null&&c.n!=P::IB);}if(Q.o()){if(Q.VC()){F.O("Enter").eA();
F.O("Select").xA();j@c=cast<j>(Q.xC(2));CA@I=(c is null)?null:c.SA();F.O("Enter").T=(I!is null);}else{F.O("Enter").xA();
F.O("Select").eA();}}if(BA.o()){if(BA.i==BA.JA)F.O("ChangeSettings").eA();else F.O("ChangeSettings").xA();
}}void KG(void){for(uint C=0;C<WA.length();C++){if(WA[C].o()){WA[C].WC();F.O("Left").T=WA[C].q();F.O("Right").T=WA[C].r();
m.UB=WA[C].q();m.VB=WA[C].r();break;}}if(N.o()){F.O("LevelUp").T=N.FC();F.O("LevelDown").T=N.GC();j@c=cast<j>(N.sA);
F.O("Select").T=(c!is null&&c.n!=P::IB);}if(Q.o()){if(Q.VC()){F.O("Enter").eA();F.O("Select").xA();j@c=cast<j>(Q.xC(2));
CA@I=(c is null)?null:c.SA();F.O("Enter").T=(I!is null);}else{F.O("Enter").xA();F.O("Select").eA();}}if(BA.o()){if(BA.i==BA.JA)F.O("ChangeSettings").eA();
else F.O("ChangeSettings").xA();}}void KF(void){if(N.o()){N.Enter();Q.w(f.sA,N.sA,BA.sA);F.kA(array<string>={"Left","Right","Enter","LevelDown","LevelUp","SwitchToMusic"});
F.O("Left").T=Q.q();F.O("Right").T=Q.r();m.UB=Q.q();m.VB=Q.r();F.O("LevelUp").T=N.FC()&&(N.YA!=0);F.O("LevelDown").T=N.GC()&&(N.YA!=0);
j@c=cast<j>(Q.xC(2));CA@I=(c is null)?null:c.SA();F.O("Enter").T=(I!is null);}else if(Q.o()){if(Q.NG()){Q.Enter();
f.w();F.kA(array<string>={"Left","Right","Customise","CharaInfo","SwitchToCategory2","DecideBack"});
F.O("Left").T=f.q();F.O("Right").T=f.r();m.UB=f.q();m.VB=f.r();}if(Q.OG()){Q.Enter();BA.w();F.kA(array<string>={"Left","Right","DecideBack"});
if(BA.i==BA.JA)F.O("ChangeSettings").eA();F.O("Left").T=BA.q();F.O("Right").T=BA.r();m.UB=BA.q();m.VB=BA.r();
}}else if(f.o()){f.PF();m.wA=false;HB.w(f.hB());F.kA(array<string>={"Left","Right","Enter","PrevHeader","NextHeader","OverLimit"});
F.O("Left").T=HB.q();F.O("Right").T=HB.r();F.O("Enter").T=true;}YieldTime(0.7);return;}void LG(void){if(Q.o()){if(Q.VC()){l@W=N.sA;
CA@I=(W is null)?null:cast<j>(W).SA();@W=f.sA;p@U=(W is null)?null:cast<wB>(W).p;if(I!is null){SetData("ScoreInfo::JacketPath",I.OE);
SetData("ScoreInfo::Title",I.uC);SetData("ScoreInfo::Artist",I.OD);SetData("ScoreInfo::Level",I.hA);
SetData("ScoreInfo::ExtraLevel",I.XC);SetData("ScoreInfo::Difficulty",I.n);SetData("ScoreInfo::Background",I.QF);
}if(U!is null){SetData("CharaInfo::Level",U.yC);SetData("CharaInfo::ExpRate",U.RF);}SetData("CharacterSelector::CharacterIndex",f.i);
SetData("MusicSelector::CategoryIndex",N.YA);SetData("MusicSelector::MusicIndex",N.i);SetData("MusicSelector::Difficulty",N.n);
SetData("MusicSelector::Level",N.ME);SetData("SpeedPreset::Index",BA.i);SetData("SpeedPreset::CustomSpeed",BA.PG);
SetData("SpeedPreset::Speed",BA.zC);SetData("TrackCount",GetIntData("TrackCount")+1);qA("Skin_Data","LastSelectedMusicCategoryIndex",N.YA+0);
qA("Skin_Data","LastSelectedMusicIndex",N.i+0);qA("Skin_Data","LastUsedDifficulty",N.n+0);qA("Skin_Data","LastUsedLevel",N.ME+0);
qA("Skin_Data","LastSelectedCharacterIndex",f.i+0);qA("Skin_Data","LastSelectedSkillIndex",f.i+0);qA("Skin_Data","LastSelectedPlayMode",N.wC);
JF("Skin_Data","ToolTipVisibility",N.MD);HB.QG(f.hB().d);f.RG();if(N.SG()==CursorState::Confirmed&&Execute("Play.as")){Disappear();
}else{HB.TG(f.hB().d);f.UG();N.VG();}}}if(HB.o()){HB.Enter();d@I=HB.PE;p@U=f.hB();f.WG(I);f.Enter();
@lD.p=U;Q.YC(f.sA,1);Q.PD();m.wA=true;F.kA(array<string>={"Left","Right","LevelDown","LevelUp","SwitchToMusic"});
if(Q.VC())F.O("Enter").eA();else F.O("Select").eA();F.O("Left").T=Q.q();F.O("Right").T=Q.r();m.UB=Q.q();
m.VB=Q.r();j@c=Q.QE();F.O("Enter").T=(c!is null&&c.SA()!is null);if(U!is null&&I!is null){SetData("CharacterSelector::SkillOfChara["+formatInt(U.mD,'',2)+"]",I.IC);
}}YieldTime(0.7);return;}void MG(void){if(Q.o()){BA.Enter();Q.w();if(Q.VC()){F.kA(array<string>={"Left","Right","Enter","LevelDown","LevelUp","SwitchToMusic"});
j@c=cast<j>(Q.xC(2));CA@I=(c is null)?null:c.SA();F.O("Enter").T=(I!is null);}else{F.kA(array<string>={"Left","Right","Select","LevelDown","LevelUp","SwitchToMusic"});
}F.O("Left").T=Q.q();F.O("Right").T=Q.r();m.UB=Q.q();m.VB=Q.r();}YieldTime(0.7);return;}void LF(void){if(N.o()||Q.o()){N.XG();
F.O("LevelUp").T=N.FC();F.O("LevelDown").T=N.GC();j@c=(N.o())?cast<j>(N.iB):Q.QE();F.O("Select").T=(c!is null&&c.n!=P::IB);
F.O("Enter").T=(c!is null&&c.SA()!is null);}}void MF(void){if(N.o()||Q.o()){N.YG();F.O("LevelUp").T=N.FC();
F.O("LevelDown").T=N.GC();j@c=(N.o())?cast<j>(N.iB):Q.QE();F.O("Select").T=(c!is null&&c.n!=P::IB);F.O("Enter").T=(c!is null&&c.SA()!is null);
}}void NF(void){if(N.o()){N.SF();F.kA(array<string>={"Left","Right","SortMusic","DecideBack"});}else if(f.o()){f.SF();
F.kA(array<string>={"Left","Right","DecideBack"});}m.vC(pA::Top);YieldTime(0.5);return;}void NE(void){if(Q.o()){Q.ZC();
N.PD();F.kA(array<string>={"Left","Right","Select","LevelDown","LevelUp","SwitchToCategory"});F.O("Left").T=N.q();
F.O("Right").T=N.r();m.UB=N.q();m.VB=N.r();F.O("LevelUp").T=N.FC();F.O("LevelDown").T=N.GC();}YieldTime(0.7);
return;}void OF(void){if(N.o()){N.TF();F.kA(array<string>={"Left","Right","Select","LevelDown","LevelUp","SwitchToCategory"});
m.vC(pA::Center);}else if(f.o()){if(f.RE()){f.TF();F.kA(array<string>={"Left","Right","Customise","CharaInfo","SwitchToCategory2","DecideBack"});
m.vC(pA::Center);}else{f.Enter();@lD.p=f.hB();Q.YC(f.sA,1);Q.PD();F.kA(array<string>={"Left","Right","LevelDown","LevelUp","SwitchToMusic"});
if(Q.VC())F.O("Enter").eA();else F.O("Select").eA();F.O("Left").T=Q.q();F.O("Right").T=Q.r();m.UB=Q.q();
m.VB=Q.r();}}else if(BA.o()){BA.Enter();BA.ZG();Q.YC(BA.sA,3);Q.PD();F.kA(array<string>={"Left","Right","LevelDown","LevelUp","SwitchToMusic"});
if(Q.VC())F.O("Enter").eA();else F.O("Select").eA();F.O("Left").T=Q.q();F.O("Right").T=Q.r();m.UB=Q.q();
m.VB=Q.r();}YieldTime(0.7);return;}}enum KA{JB,WB,lA}enum P{xB,aC,bC,AD,yB,IB}enum PA{JB,WB,lA}class CA{private uint QD,RD,SE;
private string TE,UE,VE,WE;private P bA;private int cC;private string XE,XB,YE;private SettingItem@jB,SD;
private uint nD,ZE;private bool oD;CA(){QD=0;RD=0;SE=0;TE="";UE="";VE="";WE="";bA=P::IB;cC=0;XE="";XB="未実装";
YE="";nD=0;ZE=0;oD=false;@jB=null;@SD=null;}CA(uint aG,uint bG,uint cG){QD=aG;RD=bG;SE=cG;}uint UF{get{return QD;
}}uint VF{get{return RD;}}uint WF{get{return SE;}}string uC{get{return TE;}set{TE=value;}}string OD{get{return UE;
}set{UE=value;}}string TD{get{return VE;}set{VE=value;}}string OE{get{return WE;}set{WE=value;}}P n{get{return bA;
}set{bA=value;if(GetBoolData("SkinSettings::UseMusicResults")){@jB=GetSettingItem("MusicInfo",QD+"_"+RD);
@SD=GetSettingItem("MusicInfo",QD+"_"+RD+"_"+bA);}else{@jB=null;@SD=null;}if(SD!is null){nD=int(1010000*(parseFloat(SD.GetItemText())/1000000.0));
}else{nD=0;}if(jB!is null){int aE=int(parseFloat(jB.GetItemText())/7776);if(aE==0){XB="100以下";}else if(aE<120){XB=""+(100+aE);
}else{XB="220以上";}}else{XB="未実装";}if(jB is null)return;int dC;switch(value){case P::xB:dC=int(parseFloat(jB.GetItemText())/1)%6;
break;case P::aC:dC=int(parseFloat(jB.GetItemText())/6)%6;break;case P::bC:dC=int(parseFloat(jB.GetItemText())/36)%6;
break;case P::AD:dC=int(parseFloat(jB.GetItemText())/216)%6;break;default:dC=0;}oD=(dC%2!=0);ZE=dC/2;
}}int hA{get{return cC;}set{cC=value;}}string XC{get{return XE;}set{XE=value;}}string XF{get{return XB;
}}string QF{get{return YE;}set{YE=value;}}bool UH{get{return oD;}/*set{oD=value;}*/}uint dG{get{return int(nD/1000000.0*1010000.0);
}}uint VH{get{return ZE;}}CA@aA(MusicCursor@e){if(e is null)return this;uC=e.GetMusicName(0);OD=e.GetArtistName(0);
TD=e.GetDesignerName(0);OE=e.GetMusicJacketFileName(0);n=P(e.GetDifficulty(0));hA=e.GetLevel(0);XC=e.GetExtraLevel(0);
QF=e.GetBackgroundFileName(0);return this;}}class LA{private array<CA@>yA;private KA zB;private Image@bE=null;
private string XB;LA(){zB=KA::JB;XB="未実装";}LA(KA pD){switch(pD){case KA::JB:case KA::WB:case KA::lA:zB=pD;
break;default:zB=KA::JB;}XB="未実装";}KA Type{get{return zB;}}string uC{get{return(yA.length()==0)?"":yA[0].uC;
}}string OD{get{return(yA.length()==0)?"":yA[0].OD;}}Image@YF{get{return bE;}}string TD{get{return(yA.length()==0)?"":yA[0].TD;
}}string XF{get{return XB;}/*set{XB=value;}*/}uint ZF{get{return yA.length();}}bool eC(KA pD){return(Type==pD);
}LA@kB(CA@I){if(I is null)return null;if(Type==KA::lA||I.n==P::IB||(Type==KA::JB&&I.n!=P::yB)||(Type==KA::WB&&I.n==P::yB)){if(bE is null)@bE=Image(I.OE);
yA.insertLast(I);}return this;}bool aF(P KB){return(SA(KB)!is null);}CA@SA(P KB){for(uint C=0;C<yA.length();
C++)if(yA[C].n==KB)return yA[C];return null;}CA@SA(uint H){return(H<yA.length())?yA[H]:null;}}class zA{private PA zB;
private string BD;private array<LA@>UD;zA(){zB=PA::JB;}zA(PA qD){switch(qD){case PA::JB:case PA::WB:case PA::lA:zB=qD;
break;default:zB=PA::JB;}}PA Type{get{return zB;}}string Name{get{return BD;}set{BD=value;}}uint cE{get{return UD.length();
}}bool eC(PA qD){return(Type==qD);}zA@lB(LA@TA){if(TA is null)return null;if(Type!=PA::lA)UD.insertAt(0,TA);
else UD.insertLast(TA);return this;}LA@dE(uint H){return(H<UD.length())?UD[H]:null;}}class p{private uint bF,WH,cF;
private double dF;private Character@eF;private CharacterImages@fF;private d@EA;p(uint H,Character@fC,CharacterImages@eG){bF=H;
@eF=fC;@fF=eG;yC=1;RF=0.0;}d@d{get{return EA;}set{@EA=value;}}Character@Character{get{return eF;}}CharacterImages@CharacterImages{get{return fF;
}}uint mD{get{return bF;}}uint HG{get{return(EA!is null)?EA.IC:0;}}uint yC{get{return cF;}set{cF=(value==0)?1:((value>25)?25:value);
}}double RF{get{return dF;}set{dF=(value<0.0)?0.0:((value>1.0)?1.0:value);}}}class d{private uint gF;
private Skill@hF;d(uint H,Skill@tA){gF=H;@hF=tA;}uint IC{get{return gF;}}Skill@Skill{get{return hF;}}}funcdef void ZA(void);
class DA{Container@mA;TextSprite@YB;Sprite@VD,CD,gC;array<Key>JC={Key::INPUT_A,Key::INPUT_Z,Key::INPUT_S,Key::INPUT_X,Key::INPUT_D,Key::INPUT_C,Key::INPUT_F,Key::INPUT_V,Key::INPUT_G,Key::INPUT_B,Key::INPUT_H,Key::INPUT_N,Key::INPUT_J,Key::INPUT_M,Key::INPUT_K,Key::INPUT_COMMA};
private array<Key>eE();private string BD="Name",iF="";private ZA@jF=null;private uint rD=JC.length(),KC=JC.length();
private bool sD=false,hC=false;DA(Skin@D,Image@fG,string h,ZA@gG){BD=h;@jF=gG;@mA=Container();mA.Apply("x:215, y:820, z:2");
@VD=Sprite();VD.SetImage(fG);VD.Apply("origX:0, origY:54");VD.Apply("x:0, y:0, z:0");@YB=TextSprite(D.GetFont("Bold32"),"");
YB.SetAlignment(TextAlign::Center,TextAlign::Center);YB.Apply("origX:0, origY:15, z:1, r:255, g:255, b:255");
@CD=Sprite();CD.SetImage(D.GetImage("MusicSelect-Button-DisableMask"));CD.Apply("origX:0, origY:45, x:0, y:0, z:3, alpha:1");
@gC=Sprite();gC.SetImage(D.GetImage("MusicSelect-Button-ClickedMask"));gC.Apply("origX:0, origY:45, x:0, y:0, z:3, alpha:0");
mA.AddChild(VD);mA.AddChild(YB);mA.AddChild(CD);mA.AddChild(gC);AddSprite(mA);tD=0;Width=0;T=true;wA=false;
}string Name{get{return BD;}}string hG{get{return iF;}set{if(YB!is null)YB.SetText(value);iF=value;}}uint tD{get{return rD;
}set{if(value>=JC.length())value=JC.length()-1;if(value==rD)return;rD=value;mA.Apply("x:"+(215+53*rD));
}}uint Width{get{return KC;}set{if(value>=JC.length())value=JC.length()-1;if(value==KC)return;KC=value;
YB.Apply("x:"+(53*KC/2.0)+", y:0");YB.SetRangeScroll(53*KC-6,20,48);CD.Apply("scaleX:"+KC);gC.Apply("scaleX:"+KC);
}}bool T{get{return sD;}set{if(sD==value)return;sD=value;CD.Apply("alpha:"+((sD)?0:0.7));}}bool wA{get{return hC;
}set{hC=value;mA.Apply("y:"+((hC)?720:820));}}DA@aA(string value,uint iG,uint jG,bool kG,bool lG){hG=value;
tD=iG;Width=jG;T=kG;wA=lG;return this;}void xA(){if(!hC)return;mA.AbortMove();mA.Apply("y:720");mA.AddMove("move_by(x:0, y:100, time:0.2)");
hC=false;}void eA(){if(hC)return;mA.AbortMove();mA.Apply("y:820");mA.AddMove("move_by(x:0, y:-100, time:0.2)");
hC=true;}bool Fire(){return(mG()&&nG());}bool mG(){if(!T||!wA)return false;for(uint C=0;C<Width&&(C+tD)<JC.length();
C++)if(IsKeyTriggered(JC[C+tD]))return true;for(uint C=0;C<eE.length();C++)if(IsKeyTriggered(eE[C]))return true;
return false;}bool nG(){if(!T)return false;gC.Apply("alpha:1");gC.AddMove("alpha(x:1, y:0, time:0.15)");
jF();return true;}void XH(double fE,double gE){YB.Apply("x:"+fE+", y:"+gE);}void HC(double iC,double LC){YB.Apply("origY:"+(15*LC)+", scaleX:"+iC+", scaleY:"+LC);
YB.SetRangeScroll(int((53*KC-6)/iC),int(20/LC),48);}void rA(Key uD){eE.insertLast(uD);}}class IF{private array<DA@>mB;
void fA(DA@L){if(L!is null)mB.insertLast(L);}DA@O(string h){for(uint C=0;C<mB.length();C++)if(mB[C].Name==h)return mB[C];
return null;}void kA(array<string>hE){for(uint C=0;C<mB.length();C++){uint V;bool nB=true;for(V=0;V<hE.length();
V++){if(mB[C].Name==hE[V]){hE.removeAt(V);mB[C].eA();nB=false;break;}}if(nB)mB[C].xA();}}void IG(void){for(uint C=0;
C<mB.length();C++)if(mB[C].Fire())break;}}enum pA{Top,Center}class GE{private Container@oB,AB;private SynthSprite@AC,MC,ZB;
private pA WD;private bool iE=true,jE=true,jC;GE(Skin@D){@oB=Container();oB.Apply("z:2");@ZB=SynthSprite(512,512);
ZB.Apply("origX:256, origY:256, z:0");ZB.Transfer(D.GetImage("HighlightCursor"),(512-300)/2,(512-300)/2);
oB.AddChild(ZB);@AC=SynthSprite(30,45);AC.Apply("origX:15, origY:22, x:-155, y:0, z:0");AC.Transfer(D.GetImage("HighlightCursor-Arrow"),0,0);
AC.Apply("angle:3.141");@MC=SynthSprite(30,45);MC.Apply("origX:15, origY:22, x:155, y:0, z:0");MC.Transfer(D.GetImage("HighlightCursor-Arrow"),0,0);
@AB=Container();AB.Apply("z:6");AB.AddChild(AC);AB.AddChild(MC);AddSprite(oB);AddSprite(AB);J=pA::Center;
wA=false;}pA J{get{return WD;}set{if(value==pA::Top){oB.Apply("x:640, y:190");ZB.Apply("scaleX:"+(245.0/300)+", scaleY:"+(60.0/300));
AB.Apply("x:640, y:190, scaleX:0.9, scaleY:0.9");}else if(value==pA::Center){oB.Apply("x:640, y:430");
ZB.Apply("scaleX:"+(330.0/300)+", scaleY:"+(450.0/300));AB.Apply("x:640, y:430, scaleX:1, scaleY:1");
}else return;WD=value;}}bool UB{get{return iE;}set{if(iE==value)return;iE=value;if(value)AC.Apply("alpha:1");
else AC.Apply("alpha:0");}}bool VB{get{return jE;}set{if(jE==value)return;jE=value;if(value)MC.Apply("alpha:1");
else MC.Apply("alpha:0");}}bool wA{get{return jC;}set{jC=value;if(jC){oB.Apply("alpha:1");AB.Apply("alpha:1");
}else{oB.Apply("alpha:0");AB.Apply("alpha:0");}}}void vC(pA kE){if(kE==pA::Top&&WD!=pA::Top){oB.AddMove("move_to(y:190, time:0.2)");
ZB.AddMove("scale_to(x:"+(245.0/300)+", y:"+(60.0/300)+", time:0.2)");AB.AddMove("move_to(y:190, time:0.2)");
AB.AddMove("scale_to(x:0.9, y:0.9, time:0.2)");}else if(kE==pA::Center&&WD!=pA::Center){oB.AddMove("move_to(y:430, time:0.2)");
ZB.AddMove("scale_to(x:"+(330.0/300)+", y:"+(450.0/300)+", time:0.2)");AB.AddMove("move_to(y:430, time:0.2)");
AB.AddMove("scale_to(x:1, y:1, time:0.2)");}else return;WD=kE;}void ND(void){ZB.Apply("alpha:0.9");ZB.AddMove("alpha(x:0.9, y:0.4, time:0.6, ease:inout_sine)");
ZB.AddMove("alpha(x:0.4, y:0.9, time:0.6, wait:0.6, ease:inout_sine)");AC.AddMove("move_by(x:-10, y:0, time:0.6, ease:inout_sine)");
AC.AddMove("move_by(x:10, y:0, time:0.6, wait:0.6, ease:inout_sine)");MC.AddMove("move_by(x:10, y:0, time:0.6, ease:inout_sine)");
MC.AddMove("move_by(x:-10, y:0, time:0.6, wait:0.6, ease:inout_sine)");YieldTime(1.2);}}abstract class l{private Container@a;
private int nA;private bool jC;l(void){@a=Container();AddSprite(a);J=0;wA=false;}void AddChild(Sprite@XD)final{if(XD!is null)a.AddChild(XD);
}void Apply(const string&in BB)final{a.Apply(BB);}void AddMove(const string&in BB)final{a.AddMove(BB);
}void AbortMove(void)final{a.AbortMove();}int FA(void){return FA(nA);}private int FA(int S){return 0;
}int kC(void){return kC(nA);}private int kC(int S){return 0;}double GA(void){return GA(nA);}private double GA(int S){return 1.0;
}double HA(void){return HA(nA);}private double HA(int S){return 1.0;}uint BC(void){return BC(nA);}private uint BC(int S){return 1;
}double aB(void){return aB(nA);}private double aB(int S){return 1.0;}int J{get{return nA;}set{if(value>1000)value=1000;
if(value<-1000)value=-1000;nA=value;AbortMove();Apply("x:"+FA(nA)+", y:"+kC(nA));Apply("scaleX:"+GA(nA)+", scaleY:"+HA(nA));
Apply("z:"+BC(nA)+", alpha:"+aB(nA));}}bool wA{get{return jC;}set{jC=value;a.Apply("alpha:"+((jC)?aB():0));
}}void vC(int S,double cA,double x)final{if(S==J)return;AddMove("move_to(x:"+FA(S)+", y:"+kC(S)+",time:"+cA+", wait:"+x+")");
AddMove("scale_to(x:"+GA(S)+", y:"+HA(S)+",time:"+cA+", wait:"+x+")");AddMove("alpha(x:"+aB(J)+", y:"+aB(S)+",time:"+cA+", wait:"+x+")");
Apply("z:"+BC(S));nA=S;}void DD(int oG,double cA,double x)final{vC(oG+J,cA,x);}void vD(double cA,double x)final{DD(-1,cA,x);
}void wD(double cA,double x)final{DD(1,cA,x);}}abstract class xD:l{private Sprite@yD;xD(Skin@D){super();
@yD=Sprite();yD.Apply("origX:143, origY:198, x:0, y:0, z:2");AddChild(yD);}private int FA(int S)override{int b=640;
if(S>0)b+=285+205*(S-1);if(S<0)b+=-285+205*(S+1);return b;}private int kC(int S)override{return(S==0)?428:445;
}private double GA(int S)override{return(S==0)?1.0:0.7;}private double HA(int S)override{return(S==0)?1.0:0.7;
}void LB(Image@pG){yD.SetImage(pG);}}class j:xD{private LA@pB;private P bA,YH=P::IB;private Sprite@YD,lC;
private TextSprite@mC,nC,uA,oC,pC;private TextSprite@NC,OC,qC;private array<Image@>dA(6);private Image@lE;
j(Skin@D){super(D);Font@zD=D.GetFont("Normal32");Font@kF=D.GetFont("Normal16");@lE=D.GetImage("MusicSelectFrame-NoImage");
@dA[0]=D.GetImage("MusicSelectFrame-BASIC");@dA[1]=D.GetImage("MusicSelectFrame-ADVANCED");@dA[2]=D.GetImage("MusicSelectFrame-EXPERT");
@dA[3]=D.GetImage("MusicSelectFrame-MASTER");@dA[4]=D.GetImage("MusicSelectFrame-WORLDSEND");@dA[5]=D.GetImage("MusicSelectFrame-NOTFOUND");
@YD=Sprite();YD.Apply("origX:143, origY:198, x:37, y:23, alpha:0, z:1");YD.SetImage(D.GetImage("MusicSelectFrame-Locked"));
@lC=Sprite();lC.Apply("z:0");Sprite@lF=Sprite(D.GetImage("MusicSelectFrame-Black"));lF.Apply("origX:143, origY:198, x:37, y:23, z:-1");
@mC=TextSprite(zD,"");mC.SetAlignment(TextAlign::Center,TextAlign::Center);mC.SetRangeScroll(260,20,64);
mC.Apply("origX:143, origY:198");mC.Apply("x:143, y:295, z:3, r:0, g:0, b:0");@nC=TextSprite(kF,"");
nC.SetAlignment(TextAlign::Center,TextAlign::Center);nC.SetRangeScroll(260.0,20,64);nC.Apply("origX:143, origY:198");
nC.Apply("x:143, y:320, z:3, r:0, g:0, b:0");@uA=TextSprite(zD,"");uA.SetAlignment(TextAlign::Center,TextAlign::Center);
uA.Apply("origX:143, origY:198");uA.Apply("x:37, y:260, z:3, r:0, g:0, b:0");@pC=TextSprite(D.GetFont("Bold16"),"");
pC.SetAlignment(TextAlign::Center,TextAlign::Center);pC.Apply("origX:"+(143/0.9)+", origY:198");pC.Apply("x:37, y:232, z:3, scaleX:0.9, r:255, g:255, b:255");
@oC=TextSprite(zD,"");oC.SetAlignment(TextAlign::Center,TextAlign::Center);oC.Apply("origX:143, origY:198");
oC.Apply("x:55, y:247, z:3, r:0, g:0, b:0");@NC=TextSprite(D.GetFont("Bold16"),"");NC.SetAlignment(TextAlign::Left,TextAlign::Center);
NC.SetRangeScroll(110,20,64);NC.Apply("origX:143, origY:198");NC.Apply("x:104, y:381, z:3, r:255, g:255, b:255");
@OC=TextSprite(D.GetFont("Bold16"),"1,010,000");OC.SetAlignment(TextAlign::Right,TextAlign::Center);
OC.Apply("origX:143, origY:198");OC.Apply("x:278, y:361, z:3, r:255, g:255, b:255");@qC=TextSprite(D.GetFont("Bold16"),"");
qC.SetAlignment(TextAlign::Left,TextAlign::Center);qC.Apply("origX:"+(143/0.8)+", origY:198, scaleX:0.8");
qC.Apply("x:250, y:381, z:3, r:255, g:255, b:255");AddChild(lF);AddChild(lC);AddChild(YD);AddChild(mC);
AddChild(nC);AddChild(uA);AddChild(pC);AddChild(oC);AddChild(NC);AddChild(OC);AddChild(qC);n=P::xB;J=-5;
}bool qG(LA@TA){@pB=TA;if(TA is null)return false;Image@ED=(TA.YF is null)?lE:TA.YF;if(ED.Width==0||ED.Height==0)@ED=lE;
double iC=216.0/ED.Width,LC=216.0/ED.Height;lC.Apply("origX:"+(143.0/iC)+", origY:"+(198.0/LC));lC.Apply("scaleX:"+iC+", scaleY:"+LC+", x:37, y:23");
lC.SetImage(ED);mC.SetText(TA.uC);nC.SetText(TA.OD);qC.SetText(TA.XF);if(TA.Type==KA::lA)n=TA.SA(0).n;
else if(TA.aF(P::IB))n=P::IB;else if(TA.aF(P::yB))n=P::yB;else return false;return true;}P n{get{return bA;
}set{bA=value;switch(bA){case P::xB:LB(dA[0]);break;case P::aC:LB(dA[1]);break;case P::bC:LB(dA[2]);
break;case P::AD:LB(dA[3]);break;case P::yB:LB(dA[4]);break;case P::IB:LB(dA[5]);break;}CA@I=(pB is null)?null:pB.SA(bA);
YD.Apply("alpha:"+((I!is null)?0:1));uA.SetText("");pC.SetText("");oC.SetText("");NC.SetText("");OC.SetText("");
if(bA==P::IB){lC.SetImage(null);OC.SetText("");qC.SetText("");}else if(I!is null){if(bA==P::yB){string mE="";
if(I.hA<=5)for(int C=0;C<I.hA;C++)mE+="☆";else mE="☆ × "+I.hA;pC.SetText(mE);uA.SetText(I.XC);}else{uA.SetText(""+I.hA);
if(I.XC=="+")oC.SetText(I.XC);}NC.SetText(I.TD);OC.SetText(""+I.dG);}}}private uint BC(int S)override{return 5;
}LA@dE(void){return pB;}CA@SA(void){return(pB is null)?null:pB.SA(n);}CA@SA(P KB){return(pB is null)?null:pB.SA(KB);
}CA@SA(uint QA){return(pB is null)?null:pB.SA(QA);}}class wB:xD{private p@CB;private d@EA;private array<Image@>gA(5),dA(5);
private Container@PC;private Sprite@ZD,qB,y,s;private TextSprite@QC,MA,z,oA;private bool nE;private double aD;
wB(Skin@D){super(D);Font@zD=D.GetFont("Normal32");Font@kF=D.GetFont("Normal16");@dA[0]=D.GetImage("Character-Frame-Normal");
@dA[1]=D.GetImage("Character-Frame-Bronze");@dA[2]=D.GetImage("Character-Frame-Silver");@dA[3]=D.GetImage("Character-Frame-Gold");
@dA[4]=D.GetImage("Character-Frame-LvMax");@gA[0]=D.GetImage("Character-Frame-Back-Normal");@gA[1]=D.GetImage("Character-Frame-Back-Bronze");
@gA[2]=D.GetImage("Character-Frame-Back-Silver");@gA[3]=D.GetImage("Character-Frame-Back-Gold");@gA[4]=D.GetImage("Character-Frame-Back-LvMax");
@ZD=Sprite();ZD.Apply("origX:143, origY:198, x:3, y:3, z:0");@qB=Sprite();qB.Apply("origX:143, origY:198, x:3, y:30, z:1");
@QC=TextSprite(D.GetFont("Normal32"),"");QC.SetAlignment(TextAlign::Center,TextAlign::Center);QC.SetRangeScroll(242,20,64);
QC.Apply("origX:143, origY:198");QC.Apply("x:143, y:212, z:3, r:0, g:0, b:0");AddChild(ZD);AddChild(qB);
AddChild(QC);@PC=Container();PC.Apply("x:-138, y:80, z:3");@s=Sprite();s.Apply("x:206, y:4, z:1");@y=Sprite();
y.Apply("scaleX:0.5, scaleY:0.6, x:172, y:2, z:1");y.SetImage(D.GetImage("SkillInfo-Level-Base"));/*for(uint C=0;
C<FD.length();C++){@FD[C]=Sprite();FD[C].Apply("x:0, y:0");}*/@MA=TextSprite(D.GetFont("Normal32"),"");
MA.Apply("x:7, y:0, z:1, r:0, g:0, b:0");MA.Apply("scaleX:0.75, scaleY:0.75");MA.SetAlignment(TextAlign::Top,TextAlign::Left);
MA.SetRangeScroll(int(163/0.75),int(20/0.75),48);@z=TextSprite(D.GetFont("Bold32"),"");z.SetAlignment(TextAlign::Center,TextAlign::Center);
z.Apply("scaleX:0.6, scaleY:0.6, x:188, y:11, z:2, r:0, g:0, b:0");@oA=TextSprite(D.GetFont("Normal16"),"");
oA.Apply("x:7, y:25, scaleX:0.8, scaleY:0.8, z:1, r:0, g:0, b:0");oA.SetAlignment(TextAlign::Top,TextAlign::Left);
oA.SetRich(true);AddChild(PC);PC.AddChild(s);PC.AddChild(y);PC.AddChild(MA);PC.AddChild(z);PC.AddChild(oA);
@EA=null;nE=true;}p@p{get{return CB;}set{@CB=value;if(CB is null)return;if(nE){CB.CharacterImages.ApplySmallImage(qB);
qB.Apply("scaleX:1, scaleY:1, x:3, y:30");int H=0;if(CB.yC<5)H=0;else if(CB.yC<10)H=1;else if(CB.yC<15)H=2;
else if(CB.yC<25)H=3;else H=4;LB(dA[H]);ZD.SetImage(gA[H]);}else{double RC=(CB.Character is null)?1.0:CB.Character.Metric.WholeScale;
aD=RC;CB.CharacterImages.ApplyFullImage(qB);qB.Apply("scaleX:"+RC+", scaleY:"+RC+", x:3, y:-100");ZD.SetImage(null);
}QC.SetText(CB.Character.Name);@this.d=CB.d;}}d@d{get{return EA;}set{@EA=value;Skill@tA=(EA is null)?null:EA.Skill;
if(tA!is null){string h=tA.Name;int b=h.findLast("+");string QA=(b>0)?h.substr(b):"";if(b>0)h.erase(b);
Image@IA=Image(tA.IconPath);double rB=68.0/((IA is null)?68:IA.Width);double sB=68.0/((IA is null)?68:IA.Height);
s.SetImage(IA);s.Apply("scaleX:"+rB+", scaleY:"+sB);MA.SetText(h);y.Apply("alpha:"+((b>0)?1:0));z.SetText(QA);
oA.SetText(tA.Description);}else{s.SetImage(null);MA.SetText("");y.Apply("alpha:0");z.SetText("");oA.SetText("");
}}}private uint BC(int S)override{return 4;}bool rG{set{QC.Apply("alpha:"+((value)?1:0));}}bool sG{set{nE=value;
}}void tG(int fE,int gE){s.Apply("x:"+fE+", y:"+gE);}void mF(void){qB.AbortMove();}void nF(double RC){qB.Apply("scaleX:"+(aD*RC)+", scaleY:"+(aD*RC));
}void oF(double RC,double cA,double x,string uG){qB.AddMove("scale_to(x:"+(aD*RC)+", y:"+aD+", time:"+cA+", wait:"+x+", ease:"+uG+")");
}}class rC:xD{private TextSprite@MB;private double bD;rC(Skin@D,uint QA){super(D);@MB=TextSprite(D.GetFont("Normal32"),"");
MB.SetAlignment(TextAlign::Center,TextAlign::Center);MB.Apply("origX:143, origY:198, x:144, y:297, z:2");
AddChild(MB);switch(QA){case 0:LB(D.GetImage("SpeedPreset-BASIC"));MB.Apply("r:43, g:206, b:100");MB.SetText("2");
bD=2;break;case 1:LB(D.GetImage("SpeedPreset-ADVANCED"));MB.Apply("r:249, g:128, b:64");MB.SetText("4");
bD=4;break;case 2:LB(D.GetImage("SpeedPreset-EXPERT"));MB.Apply("r:244, g:23, b:133");MB.SetText("6");
bD=6;break;case 3:LB(D.GetImage("SpeedPreset-SETTINGS"));MB.Apply("r:199, g:93, b:255");break;default:return;
}J=QA;}double zC{get{return bD;}set{if(value<1.0)value=1.0;if(value>30.0)value=30.0;value=((value*10)%1000)/10.0;
bD=value;MB.SetText(formatFloat(value,'',2,1));}}private uint BC(int S)override{return 4;}}class SC:l{private Sprite@AA;
private TextSprite@UA;SC(Skin@D){@AA=Sprite();AA.SetImage(D.GetImage("Category-Frame-Normal"));AA.Apply("origX:104, origY:24, z:0");
@UA=TextSprite(D.GetFont("Normal32"),"");UA.SetAlignment(TextAlign::Center,TextAlign::Center);UA.Apply("y:-3, z:1, r:0, g:0, b:0");
AddChild(AA);AddChild(UA);J=0;}int FA(int S){int b=640;if(S>0)b+=285+166*(S-1);if(S<0)b+=-285+166*(S+1);
return b;}int kC(int S){return(S==0)?191:192;}double GA(int S){return(S==0)?1.0:0.7;}double HA(int S){return(S==0)?1.0:0.7;
}uint BC(int S){return 3;}void oE(Image@GD){if(GD!is null)AA.SetImage(GD);}void pE(const string&in h){UA.SetText(h);
}}class vG{private d@EA;private Container@a;private Sprite@AA,s,y;private array<Sprite@>FD(10);private TextSprite@UA,z,oA;
vG(Skin@D){@a=Container();a.Apply("x:-138, y:80, z:3");@AA=Sprite();AA.Apply("x:0, y:0, z:0");AA.SetImage(D.GetImage("Character-Skill-Base"));
@s=Sprite();s.Apply("x:206, y:4, z:1");@y=Sprite();y.Apply("scaleX:0.5, scaleY:0.6, x:172, y:2, z:1");
y.SetImage(D.GetImage("SkillInfo-Level-Base"));/*for(uint C=0;C<FD.length();C++){@FD[C]=Sprite();FD[C].Apply("x:0, y:0");
}*/@UA=TextSprite(D.GetFont("Normal32"),"");UA.Apply("x:7, y:0, z:1, r:0, g:0, b:0");UA.Apply("scaleX:0.75, scaleY:0.75");
UA.SetAlignment(TextAlign::Top,TextAlign::Left);UA.SetRangeScroll(int(163/0.75),int(20/0.75),48);@z=TextSprite(D.GetFont("Bold32"),"");
z.SetAlignment(TextAlign::Center,TextAlign::Center);z.Apply("scaleX:0.6, scaleY:0.6, x:188, y:11, z:2, r:0, g:0, b:0");
@oA=TextSprite(D.GetFont("Normal16"),"");oA.Apply("x:7, y:25, z:1, r:0, g:0, b:0");oA.SetAlignment(TextAlign::Top,TextAlign::Left);
oA.SetRich(true);a.AddChild(AA);a.AddChild(s);a.AddChild(y);a.AddChild(UA);a.AddChild(z);a.AddChild(oA);
@EA=null;}d@d{get{return EA;}set{@EA=value;Skill@tA=(EA is null)?null:EA.Skill;if(tA!is null){string h=tA.Name;
int b=h.findLast("+");string QA=(b>0)?h.substr(b):"";if(b>0)h.erase(b);Image@IA=Image(tA.IconPath);double rB=68.0/((IA is null)?68:IA.Width);
double sB=68.0/((IA is null)?68:IA.Height);s.SetImage(IA);s.Apply("scaleX:"+rB+", scaleY:"+sB);UA.SetText(h);
y.Apply("alpha:"+((b>0)?1:0));z.SetText(QA);oA.SetText(tA.Description);}else{s.SetImage(null);UA.SetText("");
y.Apply("alpha:0");z.SetText("");oA.SetText("");}}}Container@Container{get{return a;}}}class qE:l{private Sprite@AA,iA;
private bool rE;qE(Skin@D){super();@AA=Sprite();AA.SetImage(D.GetImage("SlideSelector-Item-Base"));AA.Apply("z:0");
AddChild(AA);@iA=Sprite();iA.SetImage(D.GetImage("SlideSelector-Item-Set"));iA.Apply("x:340, y:-5, scaleX:0.6, scaleY:0.6, z:5");
AddChild(iA);cD=false;}bool cD{get{return rE;}set{rE=value;iA.Apply("alpha:"+((rE)?1:0));}}void xA(double cA,double x){J=J;
AddMove("move_to(x:"+(FA()-700)+", time:"+cA+", wait:"+x+")");}void eA(double cA,double x){J=J;Apply("x:"+(FA()-700));
AddMove("move_to(x:"+FA()+", time:"+cA+", wait:"+x+")");}private int FA(int S)override{int b=178;if(S>0)b+=7+35*S;
if(S<0)b+=-7+35*S;return b;}private int kC(int S)override{int b=386;if(S>0)b+=7+70*S;if(S<0)b+=-7+70*S;
return b;}private uint BC(int S)override{return 8;}private double aB(int S)override{return(-2<=S&&S<=3)?1:0;
}}class sE:qE{private d@EA;private Sprite@s,y;private TextSprite@MA,z;sE(Skin@D){super(D);@s=Sprite();
s.Apply("x:24, y:0, z:1");@y=Sprite();y.Apply("scaleX:0.6, scaleY:0.6, x:350, y:18, z:1");y.SetImage(D.GetImage("SkillInfo-Level-Base"));
@MA=TextSprite(D.GetFont("Bold32"),"");MA.SetAlignment(TextAlign::Left,TextAlign::Center);MA.Apply("scaleX:0.6, scaleY:0.6, x:90, y:28, z:1, r:255, g:255, b:255");
MA.SetRangeScroll(int(260/0.6),int(20/0.6),64);@z=TextSprite(D.GetFont("Bold32"),"");z.SetAlignment(TextAlign::Center,TextAlign::Center);
z.Apply("scaleX:0.6, scaleY:0.6, x:370, y:28, z:2, r:0, g:0, b:0");AddChild(s);AddChild(y);AddChild(MA);
AddChild(z);@EA=null;}d@d{get{return EA;}set{@EA=value;if(EA!is null){string h=EA.Skill.Name;int b=h.findLast("+");
string QA=(b>0)?h.substr(b):"";if(b>0)h.erase(b);Image@IA=Image(EA.Skill.IconPath);double rB=54.0/((IA is null)?54:IA.Width);
double sB=54.0/((IA is null)?54:IA.Height);s.SetImage(IA);s.Apply("scaleX:"+rB+", scaleY:"+sB);MA.SetText(h);
y.Apply("alpha:"+((b>0)?1:0));z.SetText(QA);}}}}class dD{private Container@a;private Sprite@AA,CC,iA;
dD(Skin@D){@a=Container();a.Apply("x:164, y:374, z:9");@AA=Sprite();AA.SetImage(D.GetImage("SlideSelector-Item-Selecting"));
AA.Apply("z:1");@CC=Sprite();CC.SetImage(D.GetImage("SlideSelector-Item-Hilight"));CC.Apply("origX:255, origY:40, x:255, y:40, z:0");
@iA=Sprite();iA.SetImage(D.GetImage("SlideSelector-Item-Set"));iA.Apply("origX:44, origY:14, x:440, y:0, z:5, alpha:0");
AddChild(AA);AddChild(CC);AddChild(iA);AddSprite(a);}void xA(double cA,double x){AbortMove();Apply("x:"+164+", y:"+374);
AddMove("move_to(x:"+(164-700)+", time:"+cA+", wait:"+x+")");}void eA(double cA,double x){AbortMove();
Apply("x:"+(164-700)+", y:"+374);AddMove("move_to(x:"+164+", time:"+cA+", wait:"+x+")");}bool cD{set{iA.Apply("alpha:"+((value)?1:0));
}}void pF(double x){iA.AddMove("alpha(x:0, y:1, time:0.5, wait:"+x+")");iA.AddMove("scale_to(x:6, y:6, time:0, wait:"+x+")");
iA.AddMove("scale_to(x:0.9, y:0.9, time:0.2, wait:"+x+")");iA.AddMove("scale_to(x:1.1, y:1.1, time:0.05, wait:"+(x+0.2)+")");
iA.AddMove("scale_to(x:1.0, y:1.0, time:0.05, wait:"+(x+0.25)+")");}void AddChild(Sprite@XD){if(XD!is null)a.AddChild(XD);
}void Apply(string&in BB){a.Apply(BB);}void AddMove(string&in BB){a.AddMove(BB);}void AbortMove(void){a.AbortMove();
}void ND(void){CC.Apply("alpha:0.9, scaleX:1.01, scaleY:1.05");CC.AddMove("scale_to(x:1, y:1, time:0.6, ease:inout_sine)");
CC.AddMove("alpha(x:0.9, y:0.4, time:0.6, ease:inout_sine)");CC.AddMove("scale_to(x:1.01, y:1.05, time:0.6, wait:0.6, ease:inout_sine)");
CC.AddMove("alpha(x:0.4, y:0.9, time:0.6, wait:0.6, ease:inout_sine)");YieldTime(1.2);}}abstract class VA{private SynthSprite@k;
private array<l@>K;private bool bB=false;private uint t=0;VA(void){}VA(Skin@D){@k=SynthSprite(1280,720);
k.Transfer(D.GetImage("Selector-Base"),0,0);k.Apply("origX:640, origY:360, x:640, y:370, z:1, alpha:0");
AddSprite(k);}void w(void){k.AbortMove();k.Apply("scaleX:0, scaleY:0");k.AddMove("scale_to(x:1, y:1, time:0.30, wait:0.35)");
k.AddMove("alpha(x:0, y:1, time:0.30, wait:0.35)");tB(i);for(uint C=0;C<K.length();C++){if(K[C]is null)continue;
if(K[C].J==0){K[C].wA=true;}else{K[C].wA=false;K[C].AbortMove();K[C].Apply("x:640, scaleX:0, scaleY:0");
K[C].AddMove("scale_to(x:"+K[C].GA()+", y:"+K[C].HA()+", time:0.30, wait:0.35)");K[C].AddMove("move_to(x:"+K[C].FA()+", time:0.30, wait:0.35)");
K[C].AddMove("alpha(x:0, y:"+K[C].aB()+", time:0.30, wait:0.35)");}}bB=true;}void w(uint H){if(H<TC)H=TC;
if(H>JA)H=JA;t=H;VA::w();}void ZC(void){k.AbortMove();k.AddMove("scale_to(x:0, y:0, time:0.30)");k.AddMove("alpha(x:1, y:0, time:0.30)");
for(uint C=0;C<K.length();C++){if(K[C]is null||K[C].J==0)continue;K[C].wA=true;K[C].AbortMove();K[C].AddMove("scale_to(x:0, y:0, time:0.30)");
K[C].AddMove("move_to(x:640, time:0.30)");K[C].AddMove("alpha(x:"+K[C].aB()+", y:0, time:0.30)");}bB=false;
}void ZC(uint H){tB(H);VA::ZC();}void Enter(void){k.AbortMove();k.AddMove("scale_to(x:1, y:0.95, time:0.03, wait:0.03)");
k.AddMove("scale_to(x:2, y:2, time:0.30, wait:0.06)");k.AddMove("alpha(x:1, y:0, time:0.30, wait:0.06)");
for(uint C=0;C<K.length();C++){if(K[C]is null||K[C].J==0)continue;K[C].AbortMove();K[C].AddMove("scale_to(x:"+(K[C].GA()*0.9)+", y:"+(K[C].HA()*0.9)+", time:0.03, wait:0.03)");
K[C].AddMove("move_to(x:"+((K[C].FA()-640)*0.9+640)+", time:0.03, wait:0.03)");K[C].AddMove("scale_to(x:"+(K[C].GA()*2)+", y:"+(K[C].HA()*2)+", time:0.30, wait:0.06)");
K[C].AddMove("move_to(x:"+((K[C].FA()-640)*2+640)+", time:0.30, wait:0.06)");K[C].AddMove("alpha(x:"+K[C].aB()+", y:0, time:0.30, wait:0.06)");
}bB=false;}void PD(void){k.AbortMove();k.Apply("scaleX:2, scaleY:2, alpha:0");k.AddMove("scale_to(x:1, y:1, time:0.30, wait:0.35)");
k.AddMove("alpha(x:0, y:1, time:0.30, wait:0.35)");for(uint C=0;C<K.length();C++){if(K[C]is null||K[C].J==0)continue;
K[C].AbortMove();K[C].Apply("scaleX:"+(K[C].GA()*2)+", scaleY:"+(K[C].HA()*2)+", alpha:0");K[C].AddMove("scale_to(x:"+K[C].GA()+", y:"+K[C].HA()+", time:0.30, wait:0.35)");
K[C].AddMove("move_to(x:"+K[C].FA()+", time:0.30, wait:0.35)");K[C].AddMove("alpha(x:0, y:"+K[C].aB()+", time:0.30, wait:0.35)");
}bB=true;}void ZH(void){bB=true;}void PF(void){bB=false;}void tB(uint H){if(H>JA)return;t=H;for(uint C=0;
C<K.length();C++){if(K[C]is null)continue;K[C].J=C-t;}}void WC(void){if(!r())return;for(uint C=0;C<K.length();
C++){if(K[C]is null)continue;K[C].vD(0.2,0);}t++;}void UC(void){if(!q())return;for(uint C=0;C<K.length();
C++){if(K[C]is null)continue;K[C].wD(0.2,0);}t--;}uint JA{get{return 0;}}uint TC{get{return 0;}}uint i{get{return t;
}}l@sA{get{return K[i];}}bool o(void){return bB;}bool r(void){return(t<JA);}bool q(void){return(t>TC);
}void YC(l@W,uint H){if(H==K.length())K.insertLast(W);else if(H>K.length())K.resize(H+1);@K[H]=W;}l@xC(uint H){return(H<K.length())?K[H]:null;
}}abstract class uB:VA{private uint NB=0;private bool tE=false;private uint DB=0;private array<l@>M(9);
private array<l@>E(9);private SynthSprite@u,DC,cB;private TextSprite@RA;uB(Skin@D){super(D);for(uint C=0;
C<this.E.length();C++){@M[C]=SC(D);M[C].J=(C<=4)?(C-8):(C-1);}@u=SynthSprite(1280,24);u.Transfer(D.GetImage("CategorizeSelector-CategoryBase"),0,0);
u.Apply("origX:640, origY:12, x:640, y:193, z:1, alpha:0");AddSprite(u);@DC=SynthSprite(454,3);DC.Transfer(D.GetImage("CategorizeSelector-IndexBase"),0,0);
DC.Apply("x:412, y:630, z:2, alpha:0");AddSprite(DC);@cB=SynthSprite(458,7);cB.Transfer(D.GetImage("CategorizeSelector-IndexHilight"),0,0);
cB.Apply("y:628, z:3, alpha:0");AddSprite(cB);@RA=TextSprite(D.GetFont("Normal32"),"");RA.SetAlignment(TextAlign::Center,TextAlign::Center);
RA.Apply("x:640, y:645, z:3, r:255, g:255, b:255, alpha:0");AddSprite(RA);}void w(void){if(vA==0)return;
qF(YA);VA::w();for(uint C=0;C<M.length();C++){if(M[C]is null)continue;M[C].AbortMove();M[C].Apply("x:640, y:363, scaleX:0, scaleY:0, alpha:0");
M[C].AddMove("scale_to(x:"+M[C].GA()+", y:"+M[C].HA()+", time:0.30, wait:0.35)");M[C].AddMove("move_to(x:"+M[C].FA()+", time:0.30, wait:0.35)");
M[C].AddMove("move_by(y:-170, time:0.30, wait:0.35)");M[C].AddMove("alpha(x:0, y:1, time:0.30, wait:0.35)");
}for(uint C=0;C<E.length();C++){if(E[C]is null||E[C].J==0)continue;if(E[C].J<-3||3<E[C].J)continue;E[C].AbortMove();
E[C].Apply("x:640, scaleX:0, scaleY:0, alpha:0");E[C].AddMove("scale_to(x:"+E[C].GA()+", y:"+E[C].HA()+", time:0.30, wait:0.35)");
E[C].AddMove("move_to(x:"+E[C].FA()+", time:0.30, wait:0.35)");E[C].AddMove("alpha(x:0, y:1, time:0.30, wait:0.35)");
}u.AbortMove();u.Apply("y:363, scaleX:0, scaleY:0, alpha:0");u.AddMove("scale_to(x:1, y:1, time:0.30, wait:0.35)");
u.AddMove("move_by(y:-170, time:0.30, wait:0.35)");u.AddMove("alpha(x:0, y:1, time:0.30, wait:0.35)");
DC.Apply("alpha:1");cB.Apply("alpha:1");RA.Apply("alpha:1");dB();}void w(uint H){w();}void w(uint uE,uint eD){if(vA==0)return;
NB=uE%vA;if(OB!=0)this.t=eD%OB;uB::w();}void ZC(void){for(uint C=0;C<M.length();C++){if(M[C]is null)continue;
M[C].AbortMove();M[C].AddMove("scale_to(x:0, y:0, time:0.30)");M[C].AddMove("move_to(x:640, time:0.30)");
M[C].AddMove("alpha(x:1, y:0, time:0.30)");}for(uint C=0;C<E.length();C++){if(E[C]is null||E[C].J==0)continue;
if(E[C].J<-3||3<E[C].J)continue;E[C].AbortMove();E[C].AddMove("scale_to(x:0, y:0, time:0.30)");E[C].AddMove("move_to(x:640, time:0.30)");
E[C].AddMove("alpha(x:1, y:0, time:0.30)");}u.AbortMove();u.AddMove("scale_to(x:0, y:0, time:0.30)");
u.AddMove("alpha(x:1, y:0, time:0.30)");DC.Apply("alpha:0");cB.Apply("alpha:0");RA.Apply("alpha:0");
VA::ZC();}void Enter(void){for(uint C=0;C<M.length();C++){if(M[C]is null)continue;M[C].AbortMove();M[C].Apply("y:193");
M[C].AddMove("scale_to(x:"+(M[C].GA()*0.9)+", y:"+(M[C].HA()*0.9)+", time:0.03, wait:0.03)");M[C].AddMove("move_to(x:"+((M[C].FA()-640)*0.9+640)+", time:0.30, wait:0.03)");
M[C].AddMove("move_by(y:13, time:0.03, wait:0.03)");M[C].AddMove("scale_to(x:"+(M[C].GA()*2)+", y:"+(M[C].HA()*2)+", time:0.30, wait:0.06)");
M[C].AddMove("move_to(x:"+((M[C].FA()-640)*2+640)+", time:0.30, wait:0.06)");M[C].AddMove("move_by(y:-170, time:0.30, wait:0.06)");
M[C].AddMove("alpha(x:1, y:0, time:0.30, wait:0.06)");}for(uint C=0;C<E.length();C++){if(E[C]is null||E[C].J==0)continue;
if(E[C].J<-3||3<E[C].J)continue;E[C].AbortMove();E[C].AddMove("scale_to(x:"+(E[C].GA()*0.9)+", y:"+(E[C].HA()*0.9)+", time:0.03, wait:0.03)");
E[C].AddMove("move_to(x:"+((E[C].FA()-640)*0.9+640)+", time:0.30, wait:0.03)");E[C].AddMove("scale_to(x:"+(E[C].GA()*2)+", y:"+(E[C].HA()*2)+", time:0.30, wait:0.06)");
E[C].AddMove("move_to(x:"+((E[C].FA()-640)*2+640)+", time:0.30, wait:0.06)");E[C].AddMove("alpha(x:1, y:0, time:0.30, wait:0.06)");
}u.AbortMove();u.Apply("y:193");u.AddMove("scale_to(x:0.9, y:0.9, time:0.03, wait:0.03)");u.AddMove("move_by(y:13, time:0.03, wait:0.03)");
u.AddMove("scale_to(x:2, y:2, time:0.30, wait:0.06)");u.AddMove("move_by(y:-170, time:0.30, wait:0.06)");
u.AddMove("alpha(x:1, y:0, time:0.30, wait:0.06)");DC.Apply("alpha:0");cB.Apply("alpha:0");RA.Apply("alpha:0");
VA::Enter();}void PD(void){for(uint C=0;C<M.length();C++){if(M[C]is null)continue;M[C].AbortMove();M[C].Apply("y:23, scaleX:"+(M[C].GA()*2)+", scaleY:"+(M[C].HA()*2)+", alpha:0");
M[C].AddMove("scale_to(x:"+M[C].GA()+", y:"+M[C].HA()+", time:0.30)");M[C].AddMove("move_to(x:"+M[C].FA()+", time:0.30)");
M[C].AddMove("move_by(y:170, time:0.30)");M[C].AddMove("alpha(x:0, y:1, time:0.30)");}for(uint C=0;C<E.length();
C++){if(E[C]is null||E[C].J==0)continue;if(E[C].J<-3||3<E[C].J)continue;E[C].AbortMove();E[C].Apply("x:"+((E[C].FA()-640)*2+640)+", scaleX:"+(E[C].GA()*2)+", scaleY:"+(E[C].HA()*2)+", alpha:0");
E[C].AddMove("scale_to(x:"+E[C].GA()+", y:"+E[C].HA()+", time:0.30)");E[C].AddMove("move_to(x:"+E[C].FA()+", time:0.30)");
E[C].AddMove("alpha(x:0, y:1, time:0.30)");}u.AbortMove();u.Apply("y:23, scaleX:2, scaleY:2, alpha:0");
u.AddMove("scale_to(x:1, y:1, time:0.30)");u.AddMove("move_by(y:170, time:0.30)");u.AddMove("alpha(x:0, y:1, time:0.30)");
DC.Apply("alpha:1");cB.Apply("alpha:1");RA.Apply("alpha:1");this.k.AbortMove();this.k.Apply("scaleX:2, scaleY:2, alpha:0");
this.k.AddMove("scale_to(x:1, y:1, time:0.30)");this.k.AddMove("alpha(x:0, y:1, time:0.30)");this.bB=true;
}void qF(uint H){uint V;if(H>EB)return;NB=H;V=(NB+(vA-1)*4)%vA;for(uint C=0;C<M.length();C++,V=(V+1)%vA){if(M[C]is null)continue;
fD(M[C],V);M[C].J=C-4;}}void tB(uint H){int V;if(H>eB)return;this.t=H;V=H-4;for(uint C=0;C<E.length();
C++,V++){if(E[C]is null)continue;if(V>=0&&FB(E[C],V)){E[C].J=C-4;}else E[C].J=-6;}DB=4;dB();}void wG(void){uint V;
if(vA==0)return;for(uint C=0;C<E.length();C++){if(E[C]is null)continue;if(-3<=E[C].J&&E[C].J<=3){E[C].DD(-7,0.2,0);
}}NB=(NB+1)%vA;V=(NB+4)%vA;for(uint C=0;C<M.length();C++){if(M[C]is null)continue;if(-3<=M[C].J&&M[C].J<=4){M[C].vD(0.2,0);
}else if(V<=EB){if(fD(M[C],V))M[C].J=4;else M[C].J=5;V=EB+1;}}YieldTime(0.2);this.t=0;for(uint C=0;C<E.length();
C++){if(FB(E[C],this.t-4+C)){E[C].J=C;E[C].DD(-4,0.2,0);}else E[C].J=-10;}DB=4;dB();}void xG(void){uint V;
if(vA==0)return;for(uint C=0;C<E.length();C++){if(E[C]is null)continue;if(-3<=E[C].J&&E[C].J<=3){E[C].DD(7,0.2,0);
}}NB=(NB+vA-1)%vA;V=(NB+(vA-1)*4)%vA;for(uint C=0;C<9;C++){l@W=yG(C);if(W is null)continue;if(-4<=W.J&&W.J<=3)W.wD(0.2,0);
else if(V<=EB){if(fD(W,V))W.J=-4;else W.J=-5;V=EB+1;}}YieldTime(0.2);this.t=JA;for(uint C=0;C<E.length();
C++){if(FB(E[C],this.t-4+C)){E[C].J=C-8;E[C].DD(4,0.2,0);}else E[C].J=-10;}DB=4;dB();}void WC(void){if(RE()||i==eB){wG();
}else{uint V=i+5;for(uint C=0;C<E.length();C++){if(-3<=E[C].J&&E[C].J<=4){E[C].vD(0.15,0);}else if(V<=eB){if(FB(E[C],V))E[C].J=4;
else E[C].J=10;V=eB+1;}else E[C].J=10;if(E[C].J==0)DB=C;}this.t++;dB();}}void UC(void){if(RE()||i==vE){xG();
}else{uint V=(i<5)?(eB+1):(i-5);for(uint C=0;C<E.length();C++){if(-4<=E[C].J&&E[C].J<=3){E[C].wD(0.15,0);
}else if(V<=eB){if(FB(E[C],V))E[C].J=-4;else E[C].J=-5;V=eB+1;}else E[C].J=-5;if(E[C].J==0)DB=C;}this.t--;
dB();}}void dB(void){if(OB==0){cB.Apply("scaleX:1, x:410");RA.SetText("-");}else{double rF=(458.0/OB);
cB.Apply("scaleX:"+(rF/458)+", x:"+(rF*this.t+410));RA.SetText((this.t+1)+" / "+OB);}}l@zG(uint H){return(H<E.length())?E[H]:null;
}l@yG(uint H){return(H<M.length())?M[H]:null;}uint YA{get{return NB;}}l@sA{get{return iB;}}l@iB{get{return(DB<E.length())?E[DB]:null;
}}l@aH{get{for(uint C=0;C<M.length();C++){if(M[C].J==0)return M[C];}return null;}}bool r(void){return true;
}bool q(void){return true;}uint JA{get{return eB;}}uint TC{get{return vE;}}uint eB{get{return 0;}}uint vE{get{return 0;
}}uint OB{get{return eB-vE+1;}}uint EB{get{return 0;}}uint AH{get{return 0;}}uint vA{get{return EB-AH+1;
}}bool RE(void){return tE;}void SF(void){tE=true;}void TF(void){tE=false;}bool fD(l@W,uint H){return false;
}bool FB(l@W,uint H){return false;}}class IE:uB{private array<zA@>jA(22);private array<zA@>NA;private P bA=P::xB;
private uint EC;private Image@sF,tF,uF;private array<Image@>gA(6);private Sprite@sC;private TextSprite@HD;
private MusicCursor@PB;private bool vF;IE(Skin@D,int BH,bool CH){super(D);for(uint C=0;C<this.E.length();
C++){@this.E[C]=j(D);this.E[C].Apply("alpha:0");}for(uint C=0;C<jA.length();C++){@jA[C]=zA(PA::lA);if(C<6)jA[C].Name="LEVEL"+(C+1);
else if(C<21)jA[C].Name="LEVEL"+(C/2+4)+((C%2==0)?"":"+");else jA[C].Name="その他レベル";}@sF=D.GetImage("Category-Frame-Normal");
@tF=D.GetImage("Category-Frame-WorldsEnd");@uF=D.GetImage("Category-Frame-LevelFilter");@gA[0]=D.GetImage("MusicSelect-BackGround-BASIC");
@gA[1]=D.GetImage("MusicSelect-BackGround-ADVANCED");@gA[2]=D.GetImage("MusicSelect-BackGround-EXPERT");
@gA[3]=D.GetImage("MusicSelect-BackGround-MASTER");@gA[4]=D.GetImage("MusicSelect-BackGround");@gA[5]=D.GetImage("MusicSelect-BackGround");
@sC=Sprite();sC.Apply("z:0");AddSprite(sC);@HD=TextSprite(D.GetFont("Normal32"),"");HD.SetAlignment(TextAlign::Left,TextAlign::Bottom);
HD.Apply("scaleX:0.7, scaleY:0.7, x:5, y:720, z:1, r:0, g:0, b:0");AddSprite(HD);EC=0;NA.insertLast(jA[EC]);
wC=BH;MD=CH;@PB=MusicCursor();DH();}int wC{get{return GetIntData("AutoPlay");}set{if(value<0)value=0;
if(value>2)value=2;string BB="ゲームモード切替 : Shift\r\n";switch(value){case 0:BB+="スライダー:マニュアル\r\nエアー:マニュアル";
break;case 1:BB+="スライダー:オート\r\nエアー:オート";break;case 2:BB+="スライダー:マニュアル\r\nエアー:オート";break;}BB+="\r\nF1 で非表示";
HD.SetText(BB);SetData("AutoPlay",value);}}bool MD{get{return vF;}set{vF=value;HD.Apply("alpha:"+((value)?1:0));
}}void w(void){w(1,0,P::xB,17);}void w(uint uE,uint EH,P KB,uint QA){uB::w(uE,EH);if(YA==EB)QB(P::yB);
else if(YA!=0)QB(KB);QB(QA);}void Enter(void){l@g=iB;if(g!is null){LA@TA=cast<j>(g).dE();g.AbortMove();
g.AddMove("scale_to(x:"+(g.GA()*0.9)+", y:"+(g.HA()*0.9)+", time:0.03)");g.AddMove("scale_to(x:"+g.GA()+", y:"+g.HA()+", time:0.03, wait:0.03)");
}uB::Enter();}void tB(uint H){uB::tB(H);sC.SetImage(gA[cast<j>(iB).n]);}void WC(void){uB::WC();sC.SetImage(gA[cast<j>(iB).n]);
}void UC(void){uB::UC();sC.SetImage(gA[cast<j>(iB).n]);}void QB(P KB){zA@U=(YA>EB)?null:NA[YA];bool nB=false;
if(U is null)return;switch(KB){case P::xB:case P::aC:case P::bC:case P::AD:nB=U.eC(PA::JB);bA=KB;break;
case P::yB:case P::IB:nB=U.eC(PA::WB);break;}if(!nB)return;for(uint C=0;C<this.E.length();C++){cast<j@>(this.E[C]).n=KB;
}sC.SetImage(gA[KB]);}void QB(uint QA){if(QA<jA.length()&&EC!=QA){EC=QA;@NA[0]=jA[QA];qF(YA);if(YA==0){tB(0);
}}}void YG(void){if(!FC())return;if(YA==0){QB(EC+1);}else{switch(bA){case P::xB:QB(P::aC);break;case P::aC:QB(P::bC);
break;case P::bC:QB(P::AD);break;}}}void XG(void){if(!GC())return;if(YA==0){QB(EC-1);}else{switch(bA){case P::aC:QB(P::xB);
break;case P::bC:QB(P::aC);break;case P::AD:QB(P::bC);break;}}}uint eB{get{return(this.NB>EB)?0:(NA[this.NB].cE-1);
}}uint EB{get{return(NA.length()==0)?0:(NA.length()-1);}}uint n{get{return bA;}}uint ME{get{return EC;
}}bool FC(void){if(YA==0)return(EC<(jA.length()-1));else if(YA==EB)return false;else return(bA!=P::AD);
}bool GC(void){if(YA==0)return(EC>0);else if(YA==EB)return false;else return(bA!=P::xB);}private void DH(){ReloadMusic();
MusicCursor@e=MusicCursor();int g=0;zA@wE=zA(PA::WB);wE.Name="";e.Previous();auto FH=e.GetCategoryName(0);
e.Next();while(true){int xE=0;zA@U=zA();auto h=e.GetCategoryName(0);U.Name=h;e.Enter();e.Previous();
auto GH=e.GetMusicName(0);auto HH=e.GetMusicJacketFileName(0);e.Next();while(true){int yE=0;LA@zE=LA(),AF=LA(KA::WB);
e.PreviousVariant();auto IH=P(e.GetDifficulty(0));auto QA=e.GetLevel(0);auto JH=e.GetExtraLevel(0);auto KH=e.GetDesignerName(0);
e.NextVariant();while(true){CA@I=CA(g,xE,yE).aA(e);if(I.n==P::yB){AF.kB(I);}else{zE.kB(I);if(0<I.hA&&I.hA<=6){jA[I.hA-1].lB(LA(KA::lA).kB(I));
}else if(7<=I.hA&&I.hA<=13){jA[2*I.hA-((I.XC!="+")?8:7)].lB(LA(KA::lA).kB(I));}else if(I.hA==14){jA[20].lB(LA(KA::lA).kB(I));
}else{jA[21].lB(LA(KA::lA).kB(I));}}bool nB=(IH==I.n);nB=nB&&(QA==I.hA)&&(JH==I.XC)&&(KH==I.TD);if(nB)break;
yE++;e.NextVariant();}while(yE-->0)e.PreviousVariant();if(zE.ZF>0)U.lB(zE);if(AF.ZF>0)wE.lB(AF);if(e.GetMusicName(0)==GH&&e.GetMusicJacketFileName(0)==HH)break;
xE++;e.Next();}while(xE-->0)e.Previous();e.Exit();NA.insertLast(U);if(e.GetCategoryName(0)==FH)break;
g++;e.Next();}while(g-->0)e.Previous();NA.insertLast(wE);for(uint C=1;C<NA.length();C++){if(NA[C].cE==0){if(NA[C].Type==PA::JB){NA[C].lB(LA(KA::JB).kB(CA()));
}else if(NA[C].Type==PA::WB){NA[C].lB(LA(KA::WB).kB(CA()));}else if(NA[C].Type==PA::lA){NA[C].lB(LA(KA::lA).kB(CA()));
}}}for(uint C=0;C<jA.length();C++){if(jA[C].cE==0){jA[C].lB(LA(KA::lA).kB(CA()));}}}CursorState SG(void){j@c=cast<j>(iB);
CA@I=(c is null)?null:c.SA();if(PB is null||I is null)return CursorState::Error;uint H=I.UF;while(H-->0)PB.Next();
PB.Enter();H=I.VF;while(H-->0)PB.Next();H=I.WF;while(H-->0)PB.NextVariant();return PB.Enter();}void VG(void){j@c=cast<j>(iB);
CA@I=(c is null)?null:c.SA();if(PB is null||I is null)return;uint H=I.WF;while(H-->0)PB.PreviousVariant();
H=I.VF;while(H-->0)PB.Previous();PB.Exit();H=I.UF;while(H-->0)PB.Previous();}bool fD(l@W,uint H){zA@U=NA[H];
if(U.eC(PA::JB))cast<SC>(W).oE(sF);if(U.eC(PA::WB))cast<SC>(W).oE(tF);if(U.eC(PA::lA))cast<SC>(W).oE(uF);
if(U.eC(PA::WB))cast<SC>(W).pE("");else cast<SC>(W).pE(U.Name);return true;}bool FB(l@W,uint H){zA@U=NA[YA];
LA@TA=(U is null)?null:U.dE(H);if(!cast<j>(W).qG(TA)&&TA!is null){cast<j>(W).n=bA;}return(TA!is null);
}}class JE:VA{JE(Skin@D){super(D);this.K.resize(5);}void w(l@fC,l@wF,l@gD){if(fC!is null){YC(fC,1);}if(wF!is null){YC(wF,2);
}if(gD!is null){YC(gD,3);}VA::w(2);}void ZC(void){VA::ZC(2);}uint JA{get{return 4;}}wB@bH(void){return(this.K[1]is null)?null:cast<wB>(this.K[1]);
}j@QE(void){return(this.K[2]is null)?null:cast<j>(this.K[2]);}rC@cH(void){return(this.K[3]is null)?null:cast<rC>(this.K[3]);
}bool dH(void){return i==0;}bool NG(void){return i==1;}bool VC(void){return i==2;}bool OG(void){return i==3;
}bool eH(void){return i==4;}bool r(void){return(i<JA-1);}bool q(void){return(i>TC+1);}}class KE:VA{KE(Skin@D,double LH,uint MH){l@W;
super(D);this.t=MH;for(uint C=0;C<=JA;C++){@W=rC(D,C);W.J=-5;YC(W,C);}cast<rC>(xC(3)).zC=LH;}void ZG(void){float gD=zC;
SettingItem@XA=GetSettingItem("Play","Hispeed");while(parseFloat(XA.GetItemText())<gD)XA.MoveNext();
while(parseFloat(XA.GetItemText())>gD)XA.MovePrevious();}uint JA{get{return 3;}}double zC{get{return cast<rC>(sA).zC;
}}double PG{get{return cast<rC>(xC(3)).zC;}}}class LE:uB{private array<p@>NA;private array<Skill@>ID;
private CharacterManager@fB;private KD@xF;LE(Skin@D,uint eD,KD@NH){super(D);@xF=NH;OH();for(uint C=0;
C<this.E.length();C++){@this.E[C]=wB(D);}tB(eD);for(uint C=0;C<this.E.length();C++){this.E[C].Apply("alpha:0");
}}uint eB{get{return NA.length()-1;}}uint EB{get{return 0;}}void PF(void){this.bB=false;this.u.AbortMove();
this.u.Apply("alpha:0");for(uint C=0;C<this.M.length();C++){if(this.M[C]is null)continue;this.M[C].AbortMove();
this.M[C].Apply("alpha:0");}for(uint C=0;C<this.E.length();C++){if(this.E[C]is null||this.E[C].J==0)continue;
if(this.E[C].J<-3||3<this.E[C].J)continue;this.E[C].AbortMove();this.E[C].AddMove("alpha(x:1, y:0, time:0.1, wait:0.3)");
}}void Enter(void){if(o()){uB::Enter();return;}this.k.AbortMove();this.k.AddMove("alpha(x:1, y:0, time:0.30)");
this.DC.Apply("alpha:0");this.cB.Apply("alpha:0");this.RA.Apply("alpha:0");}bool fD(l@W,uint H){cast<SC>(W).pE("全キャラ");
return true;}bool FB(l@W,uint H){p@U=(H<TC||JA<H)?null:NA[H];@cast<wB>(W).p=U;return(U!is null);}void OH(void){@fB=GetCharacterManager();
int g=GetIntData("CharacterSelector::CursorPosition");while(g-->0)fB.Previous();fB.Previous();auto BF=fB.GetCharacter(0).Name;
fB.Next();g=0;while(true){Character@fC=fB.GetCharacter(0);p@U=p(g,fC,fB.CreateCharacterImages(0));string uD="CharacterSelector::SkillOfChara["+formatInt(g,'',2)+"]";
uint H=GetIntData((ExistsData(uD))?uD:"CharacterSelector::DefaultSkillIndex");@U.d=xF.CF(H);NA.insertLast(U);
if(BF==fC.Name)break;g++;fB.Next();}while(g-->0)fB.Previous();}p@hB(void){return cast<wB>(iB).p;}void WG(d@I){p@U=hB();
if(U!is null)@U.d=I;FB(sA,i);}void RG(void){p@U=hB();if(U is null)return;uint g=U.mD;while(g-->0)fB.Next();
SetData("CharacterSelector::CursorPosition",U.mD);return;}void UG(void){p@U=hB();if(U is null)return;
uint g=U.mD;while(g-->0)fB.Previous();return;}}abstract class hD:VA{private array<qE@>E(8);private dD@OA;
private Sprite@tC,gB;private TextSprite@RA;private uint DB;hD(Skin@D){super();@this.k=SynthSprite(1280,720);
this.k.Transfer(D.GetImage("SlideSelector-Base"),0,0);this.k.Apply("origX:640, origY:360, x:640, y:370, z:5, alpha:0");
AddSprite(this.k);@tC=Sprite();tC.SetImage(D.GetImage("SlideSelector-ItemIndex-Base"));tC.Apply("x:25, y:244, z:6, alpha:0");
AddSprite(tC);@gB=Sprite();gB.SetImage(D.GetImage("SlideSelector-ItemIndex-Hilight"));gB.Apply("x:25, y:244, z:7, alpha:0");
AddSprite(gB);@RA=TextSprite(D.GetFont("Normal32"),"");RA.SetAlignment(TextAlign::Right,TextAlign::Center);
RA.Apply("x:220, y:620, z:7, r:255, g:255, b:255, alpha:0");AddSprite(RA);@OA=dD(D);OA.xA(0,0);}void w(void){this.k.AbortMove();
this.k.AddMove("alpha(x:0, y:1, time:0.30)");tB(i);for(uint C=0;C<E.length();C++){if(E[C]is null)continue;
E[C].eA(0.30,0);E[C].cD=(E[C].J==0);}OA.eA(0.30,0);tC.Apply("alpha:1");gB.Apply("alpha:1");RA.Apply("alpha:1");
dB();this.bB=true;}void w(uint eD){if(OB!=0)this.t=eD%OB;w();}void Enter(void){YieldTime(0.65);this.k.AbortMove();
this.k.AddMove("alpha(x:1, y:0, time:0.30)");for(uint C=0;C<E.length();C++){if(E[C]is null)continue;
E[C].xA(0.30,0);}OA.xA(0.30,0);tC.Apply("alpha:0");gB.Apply("alpha:0");RA.Apply("alpha:0");this.bB=false;
}void ND(void){OA.ND();}void tB(uint H){int V;if(H>JA)return;this.t=H;V=H-3;for(uint C=0;C<E.length();
C++,V++){if(E[C]is null)continue;if(V>=0&&FB(E[C],V)){E[C].J=C-3;if(E[C].J==0&&AE(OA,V)){OA.Apply("Alpha:1");
}else{OA.Apply("Alpha:0");}}else E[C].J=-10;}DB=3;dB();}void WC(void){if(!r())return;uint V=i+5;OA.AbortMove();
OA.AddMove("alpha(x:1, y:0, time:0.1)");for(uint C=0;C<E.length();C++){if(-2<=E[C].J&&E[C].J<=4){E[C].vD(0.2,0);
}else if(V<=JA){if(FB(E[C],V))E[C].J=4;else E[C].J=10;V=JA+1;}else E[C].J=10;if(E[C].J==0)DB=C;}this.t++;
YieldTime(0.1);if(AE(OA,i)){OA.AddMove("alpha(x:0, y:1, time:0.1, wait:0.05)");}dB();}void UC(void){if(!q())return;
uint V=(i<4)?(JA+1):(i-4);OA.AbortMove();OA.AddMove("alpha(x:1, y:0, time:0.1)");for(uint C=0;C<E.length();
C++){if(-3<=E[C].J&&E[C].J<=3){E[C].wD(0.2,0);}else if(V<=JA){if(FB(E[C],V))E[C].J=-3;else E[C].J=-5;
V=JA+1;}else E[C].J=-5;if(E[C].J==0)DB=C;}this.t--;YieldTime(0.1);if(AE(OA,i)){OA.AddMove("alpha(x:0, y:1, time:0.1, wait:0.05)");
}dB();}void dB(void){if(OB==0){gB.Apply("alpha:0, scaleX:1, scaleY:1, x:25, y:244");RA.SetText("-");
}else{double rB=(223.0/OB);double sB=(390.0/OB);gB.Apply("scaleX:"+(rB/223)+", scaleY:"+(sB/390));gB.Apply("x:"+(rB*this.t+25));
gB.Apply("y:"+(sB*this.t+244));RA.SetText((this.t+1)+" / "+OB);}}l@zG(uint H){return(H<E.length())?E[H]:null;
}l@sA{get{return(DB<E.length())?E[DB]:null;}}uint OB{get{return JA-TC+1;}}bool FB(l@W,uint H){return false;
}bool AE(dD@W,uint H){return false;}}class KD:hD{private array<d@>ID();private Sprite@s,y;private TextSprite@MA,z;
private SkillManager@vB;private d@DF;private wB@v;private Sprite@EF,FF;private TextSprite@BE;KD(Skin@D){super(D);
for(uint C=0;C<this.E.length();C++){@this.E[C]=sE(D);this.E[C].J=C-3;}PH();QH(D);RH(D);tB(0);for(uint C=0;
C<this.E.length();C++){this.E[C].xA(0,0);}this.tC.Apply("alpha:0");this.gB.Apply("alpha:0");this.RA.Apply("alpha:0");
}void PH(void){@vB=GetSkillManager();int g=GetIntData("SkillSelector::CursorPosition");while(g-->0)vB.Previous();
vB.Previous();auto BF=vB.GetSkill(0).Name;vB.Next();g=0;while(true){Skill@tA=vB.GetSkill(0);ID.insertLast(d(g,tA));
if(BF==tA.Name)break;g++;vB.Next();}while(g-->0)vB.Previous();}void QH(Skin@D){@s=Sprite();s.Apply("x:42, y:-1, z:2");
@y=Sprite();y.Apply("x:404, y:24, z:2");y.SetImage(D.GetImage("SkillInfo-Level-Base"));@MA=TextSprite(D.GetFont("Normal32"),"");
MA.SetAlignment(TextAlign::Left,TextAlign::Center);MA.Apply("x:130, y:40, r:0, g:0, b:0, z:2");MA.SetRangeScroll(270,32,64);
@z=TextSprite(D.GetFont("Normal32"),"");z.SetAlignment(TextAlign::Center,TextAlign::Center);z.Apply("x:435, y:40, r:0, g:0, b:0, z:3");
this.OA.AddChild(s);this.OA.AddChild(y);this.OA.AddChild(MA);this.OA.AddChild(z);}void RH(Skin@D){@v=wB(D);
v.Apply("x:640, y:428, z:10, alpha:0");v.LB(D.GetImage("SkillSelector-SkillInfo-Base"));v.rG=false;v.sG=false;
v.tG(215,4);@EF=Sprite(D.GetImage("SkillSelector-SkillInfo-LimitBreak"));@FF=Sprite(D.GetImage("SkillSelector-SkillInfo-LimitBreak-DisableMask"));
EF.Apply("origX:143, origY:198, x:287, y:225, z:3");FF.Apply("origX:143, origY:198, x:287, y:225, z:5");
@BE=TextSprite(D.GetFont("Bold16"),"0");BE.SetAlignment(TextAlign::Center,TextAlign::Center);BE.Apply("origX:143, origY:198, x:342, y:268, z:4, r:0, g:0, b:0");
v.AddChild(EF);v.AddChild(FF);v.AddChild(BE);}void w(p@U){@v.p=U;v.AbortMove();v.Apply("x:640, y:428, alpha:0");
v.AddMove("alpha(x:0, y:1, time:0.05, wait:0.03)");v.AddMove("move_to(x:920, time:0.30, wait:0.03, ease:out_sine)");
v.mF();v.nF(0.9);v.oF(1.0,0.35,0.03,"out_sine");@DF=U.d;w((U is null||U.d is null)?0:U.d.IC);}void Enter(void){this.OA.pF(0);
this.OA.pF(0.65);for(uint C=0;C<this.E.length();C++){this.E[C].cD=false;}hD::Enter();v.AbortMove();v.Apply("x:920, y:428, alpha:1");
v.AddMove("alpha(x:1, y:0, time:0.20, wait:0.05)");v.AddMove("move_to(x:640, time:0.30, ease:in_sine)");
v.mF();v.nF(1.0);v.oF(0.9,0.35,0,"in_sine");}void WC(void){if(!r())return;hD::WC();@v.d=PE;}void UC(void){if(!q())return;
hD::UC();@v.d=PE;}uint JA{get{return ID.length()-1;}}uint TC{get{return 0;}}bool FB(l@W,uint H){d@I=CF(H);
@cast<sE>(W).d=I;return(I!is null);}bool AE(dD@W,uint H){d@I=CF(H);if(I!is null){string h=I.Skill.Name;
int b=h.findLast("+");string QA=(b>0)?h.substr(b):"";if(b>0)h.erase(b);Image@IA=Image(I.Skill.IconPath);
double rB=80.0/((IA is null)?80:IA.Width);double sB=80.0/((IA is null)?80:IA.Height);s.SetImage(IA);
s.Apply("scaleX:"+rB+", scaleY:"+sB);MA.SetText(h);y.Apply("alpha:"+((b>0)?1:0));z.SetText(QA);W.cD=(DF!is null&&DF.IC==I.IC);
}return(I!is null);}d@CF(uint H){return(H<ID.length())?ID[H]:null;}d@PE{get{return ID[i];}}void QG(d@I){if(I is null)return;
uint g=I.IC;while(g-->0)vB.Next();SetData("SkillSelector::CursorPosition",I.IC);return;}void TG(d@I){if(I is null)return;
uint g=I.IC;while(g-->0)vB.Previous();return;}}class HE{private Container@a;private Sprite@AA,CE,fH,DE;
private Sprite@EE,GF,HF,iD;private TextSprite@gH,jD;private TextSprite@uA,UA,kD,JD;private uint hH,iH,cC,jH;
private double GB;private string BD;private p@FE;HE(Skin@D){@a=Container();a.Apply("z:15");@AA=Sprite();
Image@GD=D.GetImage("NamePlate");AA.SetImage(GD);int yF=GD.Width,zF=GD.Height;if(yF>0&&zF>0){AA.Apply("scaleX:"+(380.0/yF)+", scaleY:"+(140.0/zF)+", z:0");
}a.AddChild(AA);@CE=Sprite();CE.Apply("x:95, y:5, z:1");CE.SetImage(D.GetImage("NamePlate-Ticket-NoTicket"));
a.AddChild(CE);@DE=Sprite();DE.Apply("x:95, y:30, z:1");DE.SetImage(D.GetImage("NamePlate-Profile"));
a.AddChild(DE);@EE=Sprite();EE.Apply("x:95, y:59, z:1");EE.SetImage(D.GetImage("NamePlate-User-Base"));
a.AddChild(EE);@iD=Sprite();iD.Apply("x:312, y:61, z:1");a.AddChild(iD);@GF=Sprite(D.GetImage("NamePlate-Emblem-Frame"));
GF.Apply("x:247, y:96, z:2");a.AddChild(GF);@HF=Sprite(D.GetImage("NamePlate-Emblem-Icon"));HF.Apply("x:258, y:90, z:3");
a.AddChild(HF);@jD=TextSprite(D.GetFont("Bold32"),GetStringData("NamePlate::Profile"));jD.Apply("scaleX:0.65, scaleY:0.65, x:232, y:44, z:2, r:0, g:0, b:0");
jD.SetAlignment(TextAlign::Center,TextAlign::Center);jD.SetRangeScroll(int(260/0.65),48,48);a.AddChild(jD);
@uA=TextSprite(D.GetFont("Bold32"),"");uA.Apply("x:120, y:98, z:2, r:0, g:0, b:0");uA.SetAlignment(TextAlign::Left,TextAlign::Bottom);
a.AddChild(uA);@UA=TextSprite(D.GetFont("Normal32"),GetStringData("NamePlate::Name"));UA.Apply("x:160, y:96, z:2, r:0, g:0, b:0");
UA.SetAlignment(TextAlign::Left,TextAlign::Bottom);UA.SetRangeScroll(140,20,48);a.AddChild(UA);@kD=TextSprite(D.GetFont("Bold32"),"RATING");
kD.Apply("x:100, y:95, scaleX:0.6, scaleY:0.6, z:2");kD.SetAlignment(TextAlign::Left,TextAlign::Top);
a.AddChild(kD);@JD=TextSprite(D.GetFont("Bold32"),"");JD.Apply("x:160, y:95, z:2, scaleX:0.6, scaleY:0.6");
JD.SetAlignment(TextAlign::Left,TextAlign::Top);a.AddChild(JD);AddSprite(a);hA=GetIntData("NamePlate::Level");
SH=GetDoubleData("NamePlate::Rating");}uint hA{get const{return cC;}set{if(value==0)value=1;cC=value%100;
uA.SetText(""+cC);}}double SH{get const{return GB;}set{if(value<0.0)value=0.0;if(value>15.99)value=15.99;
GB=value;int RB,SB,TB;if(0.0<=GB&&GB<2.0){RB=0;SB=0;TB=255;}else if(GB<4.0){RB=0;SB=255;TB=0;}else if(GB<7.0){RB=255;
SB=128;TB=0;}else if(GB<10.0){RB=255;SB=0;TB=0;}else if(GB<12.0){RB=255;SB=0;TB=255;}else if(GB<13.0){RB=128;
SB=64;TB=0;}else if(GB<14.0){RB=128;SB=128;TB=128;}else if(GB<14.5){RB=255;SB=255;TB=0;}else if(GB<15.0){RB=255;
SB=255;TB=128;}else{RB=128;SB=255;TB=128;}kD.Apply("r:"+RB+", g:"+SB+", b:"+TB);JD.Apply("r:"+RB+", g:"+SB+", b:"+TB);
JD.SetText(formatFloat(GB,'',2,2));}}p@p{get{return FE;}set{@FE=value;if(FE is null)return;double iC=52.0/128;
double LC=52.0/128;FE.CharacterImages.ApplyFaceImage(iD);iD.Apply("scaleX:"+iC+", scaleY:"+LC);}}}