0
点赞
收藏
分享

微信扫一扫

Egret Engine(二):滚动条配置


展示

Egret Engine(二):滚动条配置_游戏引擎

配置滚动条代码

const container: egret.DisplayObjectContainer = new egret.DisplayObjectContainer();
this.addChild(container);

const scrollView: egret.ScrollView = new egret.ScrollView();
scrollView.setContent(container);
scrollView.width = this.stage.stageWidth;
scrollView.height = this.stage.stageHeight;
this.addChild(scrollView);

let img = new egret.Bitmap(RES.getRes("bg_jpg"));
container.addChild(img);
img.width = this.stage.stageWidth;
img.height = this.stage.stageHeight * 2;


举报

相关推荐

0 条评论