Laya游戏开发Laya游戏开发实战

Laya FairyGui系列五 GImage GGraph

2019-11-20  本文已影响0人  s0ok

图形(GGraph)

const testGraph = new fairygui.GGraph();
testGraph.drawRect(1,'0xff0000','0xff0000');
// 需要设置图形的大小,否则显示不出来
testGraph.setSize(200,200);
testCom.addChild(testGraph);

图片(GImage)

const testImage = UIPackage.CreateObject("包名","图片名").asImage;

FGUI中的图片为了保证简单高效所以一旦创建不允许修改Texture也不允许点击,在有动态修改Texture或者支持点击的需求应该改为使用装载器(GLoader)。

上一篇 下一篇

猜你喜欢

热点阅读