(
ctx: &mut ScriptContext<'_, API>,
name: &str,
visible: bool,
)
| 4319 | }); |
| 4320 | } |
| 4321 | } |
| 4322 | |
| 4323 | pub fn set_button_fill<API: ScriptAPI + ?Sized>( |
| 4324 | ctx: &mut ScriptContext<'_, API>, |
| 4325 | name: &str, |
| 4326 | fill: &str, |
| 4327 | ) { |
| 4328 | let Some(color) = Color::from_hex(fill) else { |
| 4329 | return; |
| 4330 | }; |
| 4331 | if let Some(id) = find_named(ctx, name) { |
| 4332 | let _ = with_node_mut!(ctx.run, UiButton, id, |node| { |
| 4333 | node.style.fill = color; |
| 4334 | }); |
| 4335 | } |
no test coverage detected