MCPcopy Create free account
hub / github.com/PerroEngine/Perro / set_text_box_h_align

Function set_text_box_h_align

perro_editor/res/scripts/ui/editor_ui.rs:3972–3982  ·  view source on GitHub ↗
(
    ctx: &mut ScriptContext<'_, API>,
    name: &str,
    align: UiTextAlign,
)

Source from the content-addressed store, hash-verified

3970}
3971
3972pub fn find_vec2_value(data: &SceneNodeData, field: &str) -> Option<Vector2> {
3973 for (name, value) in data.fields.iter() {
3974 if name.as_ref() == field {
3975 return match value {
3976 SceneValue::Vec2 { x, y } => Some(Vector2::new(*x, *y)),
3977 SceneValue::Vec3 { x, y, .. } => Some(Vector2::new(*x, *y)),
3978 _ => None,
3979 };
3980 }
3981 }
3982 data.base_ref()
3983 .and_then(|base| find_vec2_value(base, field))
3984}
3985

Calls 1

find_namedFunction · 0.85

Tested by

no test coverage detected