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

Function set_text_box_padding

perro_editor/res/scripts/ui/editor_ui.rs:3959–3970  ·  view source on GitHub ↗
(
    ctx: &mut ScriptContext<'_, API>,
    name: &str,
    x: f32,
    y: f32,
)

Source from the content-addressed store, hash-verified

3957pub fn find_vec2_value(data: &SceneNodeData, field: &str) -> Option<Vector2> {
3958 for (name, value) in data.fields.iter() {
3959 if name.as_ref() == field {
3960 return match value {
3961 SceneValue::Vec2 { x, y } => Some(Vector2::new(*x, *y)),
3962 SceneValue::Vec3 { x, y, .. } => Some(Vector2::new(*x, *y)),
3963 _ => None,
3964 };
3965 }
3966 }
3967 data.base_ref()
3968 .and_then(|base| find_vec2_value(base, field))
3969}
3970
3971pub fn find_vec3_value(data: &SceneNodeData, field: &str) -> Option<Vector3> {
3972 for (name, value) in data.fields.iter() {
3973 if name.as_ref() == field {

Calls 1

find_namedFunction · 0.85

Tested by

no test coverage detected