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

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

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

...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 = Laya.Stage; import Brow...

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

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; import Browser = Laya.Browser;...

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

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 = Laya.Browser; impo...

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

4. UI-TextArea [ 98%]

... new TextArea(""); ta.skin = skin; ta.font = "Arial"; ta.fontSize = 18; ta.bold = true; ta.color = "#3d3d3d"; ta.pos(100, 15); ta.size(375, 355); ta.padding = "70,8,8,8"; Laya.stage.addChild(ta); } } new UI_TextArea();module laya { import Stage = Laya.Stage; import TextArea = Laya.TextArea; import B...

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

5. 文本-复杂的文本样式 [ 95%]

...xt.fontSize = 40; txt.font = "Microsoft YaHei"; txt.color = "#ff0000"; txt.bold = true; txt.leading = 5; //设置描边属性 txt.stroke = 2; txt.strokeColor = "#ffffff"; txt.borderColor = "#00ff00"; txt.x = (Laya.stage.width - txt.textWidth) / 2; txt.y = (Laya.stage.height - txt.textHeight) / 2; } ...

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

6. 计时器-间隔循环 [ 93%]

...; let t = new Text(); t.text = text; t.fontSize = 30; t.color = "white"; t.bold = true; t.pivot(t.width / 2, t.height / 2); t.pos(x, y); Laya.stage.addChild(t); return t; } animateTimeBased() { this.rotateTimeBasedText.rotation += 1; } animateFrameRateBased() { this.rotateFrameRateBasedText.rotation...

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

7. 文本-字符限制 [ 93%]

...addChild(input); input.size(200, 30); input.borderColor = "#FFFF00"; input.bold = true; input.fontSize = 20; input.color = "#FFFFFF"; input.padding = [0, 4, 0, 4]; return input; } } new Text_Restrict();module laya { import Input = Laya.Input; import Stage = Laya.Stage; import Text = Laya.Text; impor...

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

8. UI-Input [ 83%]

...0, 50); ti.sizeGrid = "0,40,0,40"; ti.font = "Arial"; ti.fontSize = 30; ti.bold = true; ti.color = "#606368"; Laya.stage.addChild(ti); return ti; } } } new laya.UI_Input();package { import laya.display.Stage; import laya.ui.TextInput; import laya.utils.Handler; import laya.webgl.WebGL; public class ...

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

9. 屏幕适配-屏幕适配 [ 82%]

...w Text(); this.txt.text = "点击我切换适配模式(noscale)"; this.txt.bold = true; this.txt.pos(0, 200); this.txt.fontSize = 30; this.txt.on("click", this, this.onTxtClick); Laya.stage.addChild(this.txt); //实例一个小人,放到右上角,并相对布局 let boy1 = new Image(); boy1.skin...

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