• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 786 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0062 秒)

271. 位图字体的制作与使用(TypeScript-LayaAir基础篇(TS)-文本) [ 67%]

...i } from "./ui/layaMaxUI"; //继承BitmapFont的ui场景类 export default class AllText extends ui.examples.text.BitmapFontUI { //给自己注册的字体起个名 private fontName: string = "diyFont"; constructor() {super();} onAwake(): void { //加载位位图字体 this.loadBitmapFont(); } /** *...

来源: Laya2.0_文档 发布时间: 20210715

272. laya.init 可以把画布创建到某个元素下吗? [ 67%]

...画布创建到某个元素下吗? 我想把它放到 wrap 下 <div class="wrap>    //  canvas </div> 2017-03-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: Laya.init...

来源: Laya_社区 发布时间: 20170317

273. UI-RadioGroup [ 67%]

....ui.RadioGroup; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_RadioGroup { private const SPACING:int = 150; private const X_OFFSET:int = 200; private const Y_OFFSET:int = 200; private var skins:Array; public function UI_RadioGroup() { // 不支持WebGL时自动切换至Canvas L...

来源: Laya_示例 发布时间: 20251209

274. 时间轴动画(TypeScript-LayaAir基础篇(TS)-动画基础) [ 67%]

...例代码如下: **入口类GameMain.ts** ```typescript // 程序入口 class GameMain{ constructor() { //初始化引擎 Laya.init(1334,750,Laya.WebGL); //设置舞台背景色 Laya.stage.bgColor = "#ffffff"; //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/ui.atla...

来源: Laya2.0_文档 发布时间: 20210715

275. 自定义UI导致编辑器无显示 [ 67%]

...;& (clipY=1); this._clipX=clipX; this._clipY=clipY; this.skin=url; } __class(LabelAtlas,'laya.customUI.LabelAtlas',_super); var __proto=LabelAtlas.prototype; return LabelAtlas; })(Clip) xml如下: <?xml version="1.0" encoding="utf-8"?> <uiComp> <!-- drag:0-...

来源: Laya_社区 发布时间: 20170206

276. 预制体模块 · LayaAir3文档 · LAYABOX [ 67%]

...itle预制体放到Box下 (动图3-5) 示例代码如下: const { regClass, property } = Laya; @regClass() export class ScriptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预...

来源: Laya3.0_文档 发布时间: 20241014

277. 分享:改变图片皮肤,保持图片原样宽高显示 [ 67%]

...laya.events.Event; import laya.ui.Image; import laya.utils.Handler; public class LayaAirDemo { private var image:Image; public function LayaAirDemo() { Laya.init(800,600); Laya.loader.load(["bg.jpg","logo.png"],Handler.create(this,onLoaded)); } private function onLoaded():void { image=new Image(); i...

来源: Laya_社区 发布时间: 20170628

278. 请问用laya的tab模板创建的tab,为啥没有点击事件啊?而且tab标签点击后没有一直处于按下状态 [ 67%]

...AssetLoaded2), null, Loader.ATLAS); function onAssetLoaded2() {     Laya.class(MyBoot, "MyBootClass", MyBootPage2UI);     UI = new MyBootClass();     Laya.stage.addChild(UI); } function MyBoot() {     MyBoot.super(this);          this.Boot.selectHandler = new Laya.Handler(this, onSelect...

来源: Laya_社区 发布时间: 20160722

279. 多行输入文本组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 67%]

...示。 (动图1-3) (动图1-4) 1.3 脚本控制TextArea const { regClass, property } = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * ...

来源: Laya3.0_文档 发布时间: 20251010

280. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 67%]

...动图8) 3、代码创建Dialog组件 代码运行结果: const { regClass, property } = Laya; @regClass() export class UI_Dialog extends Laya.Script { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number...

来源: Laya3.0_文档 发布时间: 20230303