GA好望角|魔力宝贝私服|魔力私服|魔力私服|GA反外挂

 找回密码
 立即注册
凤凰(QQ:715837)
售前咨询
GA白皮书(客户端)
GA白皮书(服务端)
cgdev.me开发者论坛
放映地(炫斗魔力公益PK服)
新服发布站
欢迎来到GA好望角~
价格公示表
回首页
关于妖城与某些恶意人士对我们恶意抹黑的回应
查看: 2737|回复: 0

GA framework 3.1 测试

[复制链接]

134

主题

141

帖子

141

积分

管理员

Rank: 9Rank: 9Rank: 9

金钱
2269
号角币
474
发表于 2021-11-17 05:04:19 | 显示全部楼层 |阅读模式
      

--本代码支持二建端直接执行看效果
--以下代码可以实时在浏览器中编辑修改 并执行查看效果
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
?>






回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|GA好望角

GMT+8, 2024-11-21 19:28 , Processed in 0.069700 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表