(
ctx: &mut ScriptContext<'_, API>,
name: &str,
spacing: f32,
pad_x: f32,
pad_top: f32,
pad_bottom: f32,
)
| 4290 | let Some(color) = Color::from_hex(fill) else { |
| 4291 | return; |
| 4292 | }; |
| 4293 | if let Some(id) = find_named(ctx, name) { |
| 4294 | let _ = with_node_mut!(ctx.run, UiButton, id, |node| { |
| 4295 | node.style.fill = color; |
| 4296 | }); |
| 4297 | } |
| 4298 | } |
| 4299 | |
| 4300 | pub fn set_panel_fill<API: ScriptAPI + ?Sized>( |
| 4301 | ctx: &mut ScriptContext<'_, API>, |
| 4302 | name: &str, |
| 4303 | fill: &str, |
| 4304 | ) { |
| 4305 | let Some(color) = Color::from_hex(fill) else { |
| 4306 | return; |
| 4307 | }; |
| 4308 | if let Some(id) = find_named(ctx, name) { |
| 4309 | let _ = with_node_mut!(ctx.run, UiPanel, id, |node| { |
no test coverage detected