--本代码支持二建端直接执行看效果
--以下代码可以实时在浏览器中编辑修改 并执行查看效果
TESTLoader = new.www('http://bbs.ml30.com/gacenter/Iselect/')
cc.view =
{
title = 'Iselect';
xpos = 120; ypos = 200;
sizex = 504; sizey = 327; pxpos = 504; pypos = 50;
on_init = function (view)
end;
on_load = function(view)
end;
};
cc.bmpbutton =
{
args = { TESTLoader.Uget('bg2.bmp') }; --控件的图档
title = 'bg'; --控件名
xpos = 0; ypos = 0; --注意:这里的坐标是相对坐标 以view的坐标为基准 即屏幕坐标=view坐标+本控件坐标
on_load = function(object)
end;
on_event = function(object)
object.id = TESTLoader.Uwait('bg2.bmp')
end;
};
cc.anime =
{
title = 'anime1';
xpos = 5 + 10 ;
ypos = 200;
animeID = 100086 ;
dir = 4;
action = 0;
}
cc.inputbox =
{
title = 'inputbox1';
xpos = 180;
ypos = -10;
sizex = 120;
sizey = 20;
event = function(object,event)
this.spComBox(object.mainview.xpos + object.xpos,object.mainview.ypos + object.ypos,object.mainview.xpos + object.xpos + object.sizex,object.mainview.ypos + object.ypos + object.sizey,10,0)
if event == Cevent.click then
end
if object.isfirstfocus() then
object.settext(object.text)
end
if object.isfocus() then
object.settext(object.text)
--Cli.SysMessage("获得焦点",4,3)
end
if not object.isfocus() then
this.spText(object.mainview.xpos + object.xpos,object.mainview.ypos + object.ypos,object.fontsize,object.text)
-- Cli.SysMessage("失去焦点",4,3)
end
end
}
cc.closebutton =
{
title = 'Iclose';
xpos = 461; ypos = 9;
event = function ( object )
Audio.Bell(54,320)
return 1;
end
};
cc.textbox =
{
title = 'Itextbox';
xpos = 50;
ypos = 150;
color = 6;
fontsize = 1;
}
cc.counter =
{
title ='Icounter';
--args = {};
xpos = 50; ypos = 35;
imageArry =
{
200481,201062,200831,200519,200606,201285
};
NameArry =
{
'沙拉','胡子大叔','忍者梅子','坏女人','陵女','小矮子'
};
on_result = function(selected,anime)
Cli.SysMessage('已经变身成'.. selected .. '[' .. anime .. '] 真漂亮,快给大家看看吧',4,3);
end;
}
cc.image =
{
title = 'Iimage1';
realXY = true;
xpos = 370; ypos = 160;
imageID = 243048;
on_lclick = function(object)
Cli.SysMessage( '左键被单击' ,4,3)
--object.imageID = 243049;
end;
on_rclick = function(object)
Cli.SysMessage( '右键被单击' ,4,3)
end;
on_dlclick = function(object)
Cli.SysMessage( '左键被双击' ,4,3)
end;
on_drclick = function(object)
Cli.SysMessage( '右键被双击' ,4,3)
end;
on_mousein = function(object)
Cli.SysMessage( '滑鼠进入' ,4,3)
object.imageID = 243050
end;
on_mouseout = function(object)
Cli.SysMessage( '滑鼠退出' ,4,3)
object.imageID = 243048
end;
on_event = function(object,event)
--object.imageID = 243048;
end;
};
<?
function Event.RegTalkEvent.Iselect(player,msg,color,font)
if msg == '/9' then
Client.RunABundle(player,'a.control.con1.lua')
Client.RunABundle(player,'__WEBFILE__')
Client.Close(player,'Iselect')
Client.Show(player,'Iselect')
end
end
function gacenter.finish(player)
NLG.SystemMessage(player,"[提示] 测试脚本执行完成2.")
Client.RunABundle(player,'a.control.con1.lua')
Client.RunABundle(player,'__WEBFILE__')
Client.Show(player,'Iselect')
end
?>
|