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

大约有 6 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0017 秒)

1. 文本-字数限制 [ 100%]

...th >> 1; inputText.y = Laya.stage.height - inputText.height >> 1; // 设置字体样式 inputText.bold = true; inputText.bgColor = "#666666"; inputText.color = "#ffffff"; inputText.fontSize = 20; inputText.maxChars = 5; } } new Text_MaxChars();module laya { import Input = Laya.Input; import Stage = ...

来源: Laya2.0_示例 发布时间: 20240929

2. 文本-单行输入 [ 99%]

... 移动端输入提示符 inputText.prompt = "Type some word..."; // 设置字体样式 inputText.bold = true; inputText.bgColor = "#666666"; inputText.color = "#ffffff"; inputText.fontSize = 20; } } new Text_InputSingleline();module laya { import Input = Laya.Input; import Stage = Laya.Stage; impor...

来源: Laya2.0_示例 发布时间: 20240929

3. 文本-禁止编辑 [ 99%]

...文本不可编辑,但可复制"; inputText.editable = false; // 设置字体样式 inputText.bold = true; inputText.bgColor = "#666666"; inputText.color = "#ffffff"; inputText.fontSize = 20; } } new Text_Editable();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser...

来源: Laya2.0_示例 发布时间: 20240929

4. 文本-位图字体 [ 95%]

... { // 设置空格的宽 this.bitmapFont.setSpaceWidth(10); // 注册位图字体 Laya.Text.registerBitmapFont(fontName, this.bitmapFont); this.createText(fontName); } createText(font) { let txt = new Laya.Text(); Laya.stage.addChild(txt); txt.width = 250; txt.wordWrap = true; txt.text = "Do one thi...

来源: Laya2.0_示例 发布时间: 20240929

5. 文本-多行输入 [ 64%]

... 移动端输入提示符 inputText.prompt = "Type some word..."; // 设置字体样式 inputText.bgColor = "#666666"; inputText.color = "#ffffff"; inputText.fontSize = 20; } } new Text_InputMultiline();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Browser = Laya.Browser...

来源: Laya2.0_示例 发布时间: 20240929

6. UI-RefreshList [ 49%]

...i.autoPlay = true; this.refreshLoading.addChild(this.loadingAni); // 加载字体 this.loadingLabel = new Label("加载中...."); this.loadingLabel.font = "Microsoft YaHei"; this.loadingLabel.fontSize = 25; this.loadingLabel.color = "#a6a6a6"; this.loadingLabel.pos(61, 24); this.refreshLoading.addCh...

来源: Laya2.0_示例 发布时间: 20240929