(
ctx: &mut ScriptContext<'_, API>,
name: &str,
align: UiHorizontalAlign,
)
| 4278 | if let Some(id) = find_named(ctx, name) { |
| 4279 | let text = text.to_string(); |
| 4280 | let _ = with_node_mut!(ctx.run, UiTextBox, id, |node| { |
| 4281 | if node.text.as_ref() != text { |
| 4282 | node.set_text(text); |
| 4283 | } |
| 4284 | }); |
| 4285 | } |
| 4286 | } |
| 4287 | |
| 4288 | pub fn read_text_box<API: ScriptAPI + ?Sized>( |
| 4289 | ctx: &mut ScriptContext<'_, API>, |
| 4290 | name: &str, |
| 4291 | ) -> Option<String> { |
| 4292 | let id = find_named(ctx, name)?; |
| 4293 | Some(with_node!(ctx.run, UiTextBox, id, |node| node |
no test coverage detected