Skip to content

Making use of NinePatchRect #960

Description

@ajhalme

NinePatchRect is a Godot feature for building UI elements that comprise a variable size central content piece and a frame of some kind on all sides.

We are currently doing something functionally similar "manually", using more basic Godot primitives:

  1. The black_sidebars.tscn Godot scene is effectively a five-patch version of NinePatchRect, used in city_screen.tscn and previously with the Palace View as well.
  2. The Popup UI element, OpenCiv3/C7/UIElements/Popups/Popup.cs, is pretty much a NinePatchRect in disguise. We use popups for displaying in-game popup panels.

The task is to see if we can use NinePatchRect to implement the Popup UI functionality in a more flexible way, and perhaps rebuild the black sidebars scene for cases where we are interested in the "focus/minigame" view with blacked out edges.

See #958 (comment) for a bit more discussion/context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    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