Skip to content

UI texture slicing should support responsive insets values #18997

Closed
@ickshonpe

Description

@ickshonpe

What problem does this solve or what need does it fill?

UI texture slicing should support responsive inset values.

What solution would you like?

Change the insets value in NodeImageMode::Sliced to a UiRect:

    ImageNode {
        image: asset_server.load("textures/fantasy_ui_borders/panel-border-010.png"),
        image_mode: NodeImageMode::Sliced {
            insets: UiRect::all(Val::Percent(10.)),
            center_scale_mode: SliceScaleMode::Stretch,
            sides_scale_mode: SliceScaleMode::Stretch,
            max_corner_scale: 1.0,
        }
        ..default()
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenA-UIGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possibleS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions