widgets

package
v0.6.13 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: BSD-3-Clause, BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigEditor

func ConfigEditor(cfg *appconfig.Config, showAdvanced *bool, queryBuf *string) (changed bool)

func Downloader added in v0.5.2

func Downloader(title, description string, ds *DownloaderState)

func FilterListButton added in v0.5.10

func FilterListButton[T comparable](title string, windowOpen *bool, sel map[T]struct{}) bool

func FilterListWindow added in v0.5.10

func FilterListWindow[T comparable](title string, windowOpen *bool, searchHint string, queryBuf *string, sections []FilterListSection[T], sel *map[T]struct{}, searchText func(x T) string, drawItem func(x T, selected *bool)) bool

FilterListWindow shows a searchable list of items with checkboxes and a "deselect all" button. You may use NextWindowXXX before this function. Returns true if a selection was changed. Searches through searchText for each item. drawItem should draw an item using selected as selection state and modifying selected if the selection state was changed.

func GLView

func GLView(name string, fb *GLViewState, size imgui.Vec2, processViewAreaInputIG func(), drawGL func(pos, size imgui.Vec2), drawOverlayIG func(pos, size imgui.Vec2))

func GamefileLinkText added in v0.6.9

func GamefileLinkText(file stingray.FileID)

GamefileLinkText is like GamefileLinkTextF, but displays the file name (format name.type) as text.

func GamefileLinkTextF added in v0.6.9

func GamefileLinkTextF(file stingray.FileID, format string, args ...any)

GamefileLinkTextF draws text that can be right-clicked to copy the given game file hash to clipboard, or left-clicked to jump to that file in the browser.

func PopGamefileLinkFile added in v0.6.9

func PopGamefileLinkFile() (_ stingray.FileID, ok bool)

PopGamefileLinkFile gets the last clicked gamefile link and resets it. ok is returned true if and only if there is a game file to be opened.

Types

type DownloaderState added in v0.5.2

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

func NewDownloader added in v0.5.2

func NewDownloader(parentDir string, info getter.Info) *DownloaderState

func (*DownloaderState) Dir added in v0.5.2

func (ds *DownloaderState) Dir() string

Returns the output directory.

func (*DownloaderState) HaveRequestedVersion added in v0.5.16

func (ds *DownloaderState) HaveRequestedVersion() bool

Returns true if requested version is already downloaded.

type FilterListSection added in v0.5.18

type FilterListSection[T comparable] struct {
	Title string // empty string for no title
	Items []T
}

type GLViewState

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

func NewGLView

func NewGLView() (*GLViewState, error)

func (*GLViewState) Delete

func (fb *GLViewState) Delete()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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