popup

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Credit to @TypicalAM https://github.com/TypicalAM/goread

Credit to @TypicalAM https://github.com/TypicalAM/goread

Credit to @TypicalAM https://github.com/TypicalAM/goread/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatterStatsPopup

type BatterStatsPopup struct {
	// contains filtered or unexported fields
}

func NewBatterStatsPopup

func NewBatterStatsPopup(bg string, batterId int, width int, height int) *BatterStatsPopup

func (BatterStatsPopup) Init

func (p BatterStatsPopup) Init() tea.Cmd

func (BatterStatsPopup) Update

func (p BatterStatsPopup) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (BatterStatsPopup) View

func (p BatterStatsPopup) View() string

type Overlay

type Overlay struct {
	// contains filtered or unexported fields
}

Overlay allows you to overlay text on top of a background and achieve a popup.

func NewOverlay

func NewOverlay(bgRaw string, width, height int) Overlay

NewOverlay creates a new overlay and computes the necessary indices.

func (Overlay) Height

func (p Overlay) Height() int

Height returns the height of the popup window.

func (Overlay) Width

func (p Overlay) Width() int

Width returns the width of the popup window.

func (Overlay) WrapView

func (p Overlay) WrapView(view string) string

WrapView overlays the given text on top of the background. TODO: Maybe handle the box here. It's a bit weird to have to do it in the view.

type Popup struct {
	// contains filtered or unexported fields
}

Popup is the feed popup where a user can create/edit a feed.

func NewPopup

func NewPopup(bgRaw string, title string, width, height int) Popup

NewPopup returns a new feed popup.

func (Popup) Init

func (p Popup) Init() tea.Cmd

Init initializes the popup.

func (*Popup) SetFg

func (p *Popup) SetFg(fg string)

func (Popup) Update

func (p Popup) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update updates the popup.

func (Popup) View

func (p Popup) View() string

View renders the popup.

Jump to

Keyboard shortcuts

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