overlay

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Composite

func Composite(fg, bg string, xPos, yPos Position, xOff, yOff int) string

Composite merges and flattens the background and foreground views into a single view. Ported from rmhubbert/bubbletea-overlay (MIT), adapted for internal use.

Types

type Model

type Model struct {
	Foreground viewer
	Background viewer
	XPosition  Position
	YPosition  Position
	XOffset    int
	YOffset    int
}

Model composes Foreground over Background at the requested position/offsets.

func New

func New(fore viewer, back viewer, xPos Position, yPos Position, xOff int, yOff int) *Model

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) View

func (m *Model) View() tea.View

type Position

type Position int

Position represents a relative offset in the TUI. There are five possible values; Top, Right, Bottom, Left, and Center.

const (
	Top Position = iota + 1
	Right
	Bottom
	Left
	Center
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL