swarm-0.5.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.TUI.Border

Description

Special border drawing functions that can include labels in more places than just the top center.

Synopsis

Horizontal border labels

data HBorderLabels n Source #

Labels for a horizontal border, with optional left, middle, and right labels.

plainHBorder :: HBorderLabels n Source #

A plain horizontal border with no labels.

Rectangular border labels

data BorderLabels n Source #

Labels for a rectangular border, with optional left, middle, and right labels on the top and bottom.

plainBorder :: BorderLabels n Source #

A plain rectangular border with no labels.

Border-drawing functions

hBorderWithLabels :: HBorderLabels n -> Widget n Source #

Draw a horizontal border with three optional labels. The left label (if present) will be placed two units away from the left end of the border, and the right label will be placed two units away from the right end. The center label, if present, will always be centered in the border overall, regardless of the width of the left and right labels. This ensures that when the labels change width, they do not cause the other labels to wiggle.

borderWithLabels :: BorderLabels n -> Widget n -> Widget n Source #

Put a rectangular border around the specified widget with the specified label widgets placed around the border.