⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chgmode.gml

📁 在线游戏最新服务器端源代码
💻 GML
字号:
#ifndef chgmode_gml
#define chgmode_gml


#define usermodetypeGIF

#ifdef usermodetypeGIF
#define usermodepath $.\..\..\imgs\manmode\
#define usermodeex .gif#mask,32,16
#define MAINFACEW 200
#define MAINFACEH 130
#define usermodeframe 8
#define usermodewidth 32
#define usermodeheight 32
#define usermanmodecount 64
#define userwmanmodecount 7
#define usermodeshowdelay 300
#else
#define usermodepath $.\..\..\imgs\manmode\
#define usermodeex .ale
#define MAINFACEW 200
#define MAINFACEH 150
#define usermodeframe 96
#define usermodewidth 30
#define usermodeheight 50
#define usermanmodecount 5
#define userwmanmodecount 3
#define usermodeshowdelay 100
#endif


#define modelinemax 5



#define userfacepath $.\face\face
#define userfaceex .gif
#define userfacecount 1

<style>
.usermodeitem:img{
	autopos=1;
	manpath=man;
	size=#(usermodewidth),#(usermodeheight);
	OnCreate={<: src=#(usermodepath)$[manpath]\man#(usermodeex);
#ifdef usermodetypeGIF
		src=#(usermodepath)$[manpath]\man#(usermodeex);
		frame=(($[count]%16)*2+($[count]/16)*128+16*2*2);
		dx=(($[count]%16)*64);
		dy=(($[count]/16)*128);
#else
		src=#(usermodepath)$[manpath]\man$[count]#(usermodeex);
		frame=75;
#endif
//		ctrl=loop(frame,0,(#(usermodeframe)-1),1,(150+rand(#(usermodeshowdelay))));
		>
	};
#ifdef usermodetypeGIF
	OnClick={<: pid.pid.showimgobj.eve=setpos,$[frame],$[dx],$[dy];pid.pid.count=*count;>};
#else
	OnClick={<: pid.pid.showimgobj.src=*src;pid.pid.showimgobj.eve=setpos,$[ypos];pid.pid.count=*count;>};
#endif
}
.mode2chg:div{
	size=200,100;
	class=rdragclass;
	bk2=color(#CCFFFF);

	autosubpos=low(3,1,2,1);

	usersex=0;startid=0;
	OnRefList={<: 
		count=0;
		if=(usersex)?{
			while(count<#(modelinemax)){
			if=(count+startid<#(userwmanmodecount))?{<: ?*count;><usermodeitem manpath=wman;count=(pid.startid+pid.count);>};
			count=(count+1);
			}
		}:{
			while(count<#(modelinemax)){
			if=(count+startid<#(usermanmodecount))?{<usermodeitem manpath=man;count=(pid.startid+pid.count);>};
			count=(count+1);
			}
		};
		>
	};
	OnCreate={<: pid.modelistobj=*id;eve=RefList;>};
	OntoLeft={<: if=(startid-#(modelinemax)>=0)?{startid=(startid-#(modelinemax));delallsub=1;eve=RefList;};>};
	OntoRight={<: if=(usersex)?{mmax=#(userwmanmodecount);}:{mmax=#(usermanmodecount);};
		if=(startid+#(modelinemax)<mmax)?{startid=(startid+#(modelinemax));delallsub=1;eve=RefList;};
		>
	};
}
.lightballstyle{
 draw=-1:{wv();offsetorg(-22,4);Circlelight(0,0,rdsize/40+8,#99FFFF);
	    Circlelight(0,0,rdsize/10,#660000);
	    torus(0,0,rdsize/30+6,3,R50G15B30);
	    torus2(0,0,rdsize*15/100,8,R17G25B32);
	    torus2(rdsize/100,rdsize/100,rdsize*15/100+3,9,R7G25B32);
	}
 ctrl#light=loop(rdsize,80,150,8,0);
}
.lightballstyle2{
 draw=-1:{wv();offsetorg(width+22,4);Circlelight(0,0,rdsize/40+8,#99FFFF);
	    Circlelight(0,0,rdsize/10,#660000);
	    torus(0,0,rdsize/30+6,3,R50G15B30);
	    torus2(0,0,rdsize*15/100,8,R17G25B32);
	    torus2(rdsize/100,rdsize/100,rdsize*15/100+3,9,R7G25B32);
	}
 ctrl#light=loop(rdsize,80,150,8,0);
}
.nolightballstyle{
 draw=null;ctrl#light=null;
}
.MenuBtn:Text{
 font=黑体,8,12,600;color=#FFFFFF;anti=1;
 ctrl=loopt(1,alpha,0,255,8,80);
 left=1;
 OnMouseOver={<: bk=roundbar(#CCCCCC,11,#0066AF,-9,-1);bk#t=shadow(0,255,0,0,2,2);
 if=(left)?{class=lightballstyle}:{class=lightballstyle2};>};
 OnmouseOut={<: bk=null;bk#t=null;class=nolightballstyle>};
}
.MenuIcon:text{
 pos=-18,-4;font=Webdings,20,20,800;anti=1;color=#CCFFFF;
 src=8;
 filltext={bar(0,0,40,40,#09999F);Circlelight(6,6,13,#FFFFCC);Circlelight(6,6,5,#FFFFFF);};
 bk=shadow(#006666,250,0,0,2);
 clip=0;ctrl=loopt(1,alpha,0,255,12,20);
}
.MenuBtn:Text{
 font=黑体,8,12,600;color=#FFFFFF;anti=1;italic=1;
 ctrl=loopt(1,alpha,0,255,8,40);
 iconsrc=8;txpos=60;left=1;
 OnCreate#icon={<: if=(left)?{picon=new MenuIcon{src="$[iconsrc]";};}:{picon=new MenuIcon{src="$[iconsrc]";pos=$[txpos],-4}};>};
 OnMouseOver={<: bk=roundbar(#2689AF,11,#0066AF,-9,-1);bk#t=shadow(0,255,0,0,2,2);
	if=(left)?{class=lightballstyle}:{class=lightballstyle2};>};
 OnmouseOut={<: bk=null;bk#t=null;class=nolightballstyle>};
}
.facetrychgmode:div{
	pid=desktop;
	size=#(MAINFACEW),#(MAINFACEH);
	bk=round4_3(#CCFFFF,16,#CCFFFF);
	//bk#line1=round(#002323,16,1,2,2);
	class=dragclass;count=-1;oldcount=-1;
	Ontrychg={<: if=(count!=-1)?{&desktop.myid.pman.eve=chgmode,$[count];};del=1;>};
	Ontestchg={<: if=(oldcount==-1)?{oldcount=*&desktop.myid.pman.modeid;};&desktop.myid.pman.eve=testmode,$[count];>};
	Oncancel={<: if=(oldcount!=-1)?{&desktop.myid.pman.eve=testmode,$[oldcount];};del=1;>};
	{
		<human 
			pos=(pid.width-width)/2,0;
			OnCreate={<: pid.showimgobj=*id;>};
			Onsetpos={<: 
#ifdef usermodetypeGIF
				framemap=1,0,3,2,4,5;
				mutisrc=walk('$.\..\..\imgs\manmode\man\man.gif#mask,2,4,32,32,$[ep1],$[ep2]',4);
				pos=(pid.width-width)/2-30,20;
				ctrl=loop(frame,0,(framemax-1),1,#(usermodeshowdelay));
#else
				pos=(pid.width-width)/2-30,20+$[ep0];
				ctrl=loop(frame,0,(framemax-1),1,#(usermodeshowdelay));
#endif
				>
			};
		>
		<mode2chg pos=15,pid.height-#(usermodeheight)-30;></mode2chg>
		<MenuBtn pos=30,pid.height-20; src="toleft";OnClick={<: pid.modelistobj.eve=toLeft>};iconsrc=7;>
		<MenuBtn pos=100,pid.height-20; src="toRight";OnClick={<: pid.modelistobj.eve=toRight>};left=0;>
		<MenuBtn pos=pid.width-80,10; src="确定";OnClick={<: pid.eve=trychg;>};left=0;txpos=35;iconsrc=a;>
		<MenuBtn pos=pid.width-80,30; src="预览";OnClick={<: pid.eve=testchg;>};left=0;txpos=35;iconsrc=`;>
		<MenuBtn pos=pid.width-80,50; src="取消";OnClick={<: pid.eve=cancel;>};left=0;txpos=35;iconsrc=r;>
	};
}
</style>

#define DEBUGCHGMODE2

#ifdef DEBUGCHGMODE
<facetrychgmode></facetrychgmode>
/*
<div size=#(MAINFACEW),#(MAINFACEH);bk=color(#006699);class=dragclass;count=-1;
	Ontrychg={<: if=(count!=-1)?{&desktop.myid.pman.eve=chgmode,$[count];};eve=cancel;>};
	Oncancel={<: del=1;>};
>
<human 
	pos=(pid.width-width)/2,0;
	OnCreate={<: pid.showimgobj=*id;>};
	Onsetpos={<: 
#ifdef usermodetypeGIF
		framemap=1,0,3,2,4,5;
		mutisrc=walk('$.\..\..\imgs\manmode\man\allmanicon.gif#mask,2,4,32,32,$[ep1],$[ep2]',4);
		pos=(pid.width-width)/2-30,20;
		ctrl=loop(frame,0,(framemax-1),1,#(usermodeshowdelay));
#else
		pos=(pid.width-width)/2-30,20+$[ep0];
		ctrl=loop(frame,0,(framemax-1),1,#(usermodeshowdelay));
#endif
		>
	};
>
<mode2chg pos=15,pid.height-#(usermodeheight)-30;></mode2chg>
<MenuBtn pos=30,pid.height-20; src="toleft";OnClick={<: pid.modelistobj.eve=toLeft>};>
<MenuBtn pos=100,pid.height-20; src="toRight";OnClick={<: pid.modelistobj.eve=toRight>};left=0;>
<MenuBtn pos=pid.width-80,20; src="确定";OnClick={<: pid.eve=trychg;>};left=0;>
</div>
*/
//<human mutisrc=walk('$.\..\..\imgs\manmode\man\man.gif#mask,2,-4,32,32,0,0,16,32',#(usermodedirection));pos=100,100;>
#endif
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -