LineTextView-useBySpawnUnits

This commit is contained in:
shishanyue 2023-07-25 14:03:57 +08:00 committed by GitHub
parent 75b58f25ba
commit a5d06cce2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,9 +26,9 @@ outline: deep
如没特殊注明函数均支持commonCallBack
:::
### LineTextView
### LineTextView-函数列表
::: info
函数列表:\
函数列表:
1.setText \
Data: ("text",type="string") \
设置显示的文本 \
@ -40,5 +40,47 @@ Data: ("commonHeadLength",type="number") ("indexStart",type="number") ("in
设置文本的颜色 \
4.setTextScale \
Data: ("textScale",type="number") \
设置文本的缩放 \
设置文本的缩放
:::
### LineTextView-使用
LineTextView作为RW-Engine最基本的组件
<br>
默认以ini被铁锈加载。
<br>
所以使用LineTextView有俩种方式
<br>
第一种是spawnUnits生成一个LineTextView
<br>
或者在附属添加LineTextView
<br>
第二种是copyForm这个ini
<br>
::: info
第一种方式
:::
<br>
```ini
[core]
@memory LTVSystem:unit
[hiddenAction_created]
autoTriggerOnEvent:created
resetCustomTimer:true
#创建文本框
spawnUnits:LineTextViewSystem
#文本框会自动发送tag为addLTVSystemToEpoll给该单位
[hiddenAction_addLTVSystemToEpoll]
autoTriggerOnEvent:newMessage(withTag="addLTVSystemToEpoll")
setUnitMemory:LTVSystem = eventSource
[action_setTextTest]
text:setText
isVisible:true
sendMessageTo:memory.LTVSystem
sendMessageWithTags:setText
sendMessageWithData:text="B站关注学画画的十山月"
```