Skip to content

Commit a5d06cc

Browse files
authored
LineTextView-useBySpawnUnits
1 parent 75b58f2 commit a5d06cc

1 file changed

Lines changed: 46 additions & 4 deletions

File tree

rustedwarfareapicode/src/RW-Engine/quick-start.md

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ outline: deep
2626
如没特殊注明,函数均支持commonCallBack
2727
:::
2828

29-
### LineTextView
29+
### LineTextView-函数列表
3030
::: info
31-
函数列表:\
31+
函数列表:
3232
1.setText \
3333
Data: ("text",type="string") \
3434
设置显示的文本 \
@@ -40,5 +40,47 @@ Data: ("commonHeadLength",type="number") ("indexStart",type="number") ("in
4040
设置文本的颜色 \
4141
4.setTextScale \
4242
Data: ("textScale",type="number") \
43-
设置文本的缩放 \
44-
:::
43+
设置文本的缩放
44+
:::
45+
46+
47+
### LineTextView-使用
48+
LineTextView作为RW-Engine最基本的组件
49+
<br>
50+
默认以ini被铁锈加载。
51+
<br>
52+
所以使用LineTextView有俩种方式
53+
<br>
54+
第一种是spawnUnits,生成一个LineTextView
55+
<br>
56+
或者在附属添加LineTextView
57+
<br>
58+
第二种是copyForm这个ini
59+
<br>
60+
::: info
61+
第一种方式
62+
:::
63+
<br>
64+
```ini
65+
[core]
66+
@memory LTVSystem:unit
67+
68+
[hiddenAction_created]
69+
autoTriggerOnEvent:created
70+
resetCustomTimer:true
71+
72+
#创建文本框
73+
spawnUnits:LineTextViewSystem
74+
75+
#文本框会自动发送tag为addLTVSystemToEpoll给该单位
76+
[hiddenAction_addLTVSystemToEpoll]
77+
autoTriggerOnEvent:newMessage(withTag="addLTVSystemToEpoll")
78+
setUnitMemory:LTVSystem = eventSource
79+
80+
[action_setTextTest]
81+
text:setText
82+
isVisible:true
83+
sendMessageTo:memory.LTVSystem
84+
sendMessageWithTags:setText
85+
sendMessageWithData:text="B站关注学画画的十山月"
86+
```

0 commit comments

Comments
 (0)