Skip to content

Add a margin between notifications #2

@skaldarnar

Description

@skaldarnar

The notifications are currently displayed in a TeraNUI/UIList with a custom list item renderer NotificationRenderer. A message is rendered directly under the previous one without and margin between them.

image

The underlying issue here is probably with TeraNUI rather than with the renderer or the way we use the UIList. The item renderer only controls how the content of the list item is displayed, but not how the background is rendered. The item cell renderer gets the item region with margins subtracted, while the background is drawn for the full area...

https://github.com/MovingBlocks/TeraNUI/blob/release/v1.x/nui/src/main/java/org/terasology/nui/widgets/UIList.java#L99-L100

One way to solve this within this module would be to use a custom skin which does not render a background on UIList. The custom item renderer could then render a background on it's own just for the reduced area. This is closely related to #3 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs DiscussionRequires help discussing a reported issue or provided PRType: ImprovementRequest for or addition/enhancement of a feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions