widgets

package
v0.5.21 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: BSD-3-Clause, BSD-3-Clause Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigEditor

func ConfigEditor(template app.ConfigTemplate, config *app.Config)

func DDSPreview

func DDSPreview(name string, pv *DDSPreviewState)

func Downloader added in v0.5.2

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

func FileAutoPreview

func FileAutoPreview(name string, pv *FileAutoPreviewState) bool

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{}, label func(x T) string, tooltip func(x T) string) bool

Returns true if a checkbox was changed. Searches through label and tooltip.

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 StringsPreview added in v0.5.12

func StringsPreview(pv *StringsPreviewState)

func UnitPreview

func UnitPreview(name string, pv *UnitPreviewState)

func WwisePreview

func WwisePreview(name string, pv *WwisePreviewState)

Types

type DDSPreviewState

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

func NewDDSPreview

func NewDDSPreview() *DDSPreviewState

func (*DDSPreviewState) Delete

func (pv *DDSPreviewState) Delete()

func (*DDSPreviewState) LoadImage

func (pv *DDSPreviewState) LoadImage(img *dds.DDS)

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 FileAutoPreviewState

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

func NewFileAutoPreview

func NewFileAutoPreview(otoCtx *oto.Context, audioSampleRate int, hashes map[stingray.Hash]string, getResource GetResourceFunc) (*FileAutoPreviewState, error)

func (*FileAutoPreviewState) ActiveID

func (pv *FileAutoPreviewState) ActiveID() stingray.FileID

func (*FileAutoPreviewState) Delete

func (pv *FileAutoPreviewState) Delete()

func (*FileAutoPreviewState) LoadFile

func (pv *FileAutoPreviewState) LoadFile(ctx context.Context, file *stingray.File)

func (*FileAutoPreviewState) NeedCJKFont added in v0.5.12

func (pv *FileAutoPreviewState) NeedCJKFont() bool

type FileAutoPreviewType

type FileAutoPreviewType int
const (
	FileAutoPreviewEmpty FileAutoPreviewType = iota
	FileAutoPreviewUnit
	FileAutoPreviewAudio
	FileAutoPreviewTexture
	FileAutoPreviewStrings
)

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()

type GetResourceFunc

type GetResourceFunc func(id stingray.FileID, typ stingray.DataType) (data []byte, exists bool, err error)

type StringsPreviewState added in v0.5.12

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

func NewStringsPreview added in v0.5.12

func NewStringsPreview() *StringsPreviewState

func (*StringsPreviewState) Load added in v0.5.12

func (*StringsPreviewState) NeedCJKFont added in v0.5.12

func (pv *StringsPreviewState) NeedCJKFont() bool

type UnitPreviewState

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

func NewUnitPreview

func NewUnitPreview() (*UnitPreviewState, error)

func (*UnitPreviewState) Delete

func (pv *UnitPreviewState) Delete()

func (*UnitPreviewState) LoadUnit

func (pv *UnitPreviewState) LoadUnit(mainData, gpuData []byte, getResource GetResourceFunc) error

type WwisePreviewState

type WwisePreviewState struct {
	Title string
	// contains filtered or unexported fields
}

func NewWwisePreview

func NewWwisePreview(otoCtx *oto.Context, sampleRate int) *WwisePreviewState

func (*WwisePreviewState) ClearStreams

func (pv *WwisePreviewState) ClearStreams()

func (*WwisePreviewState) Delete

func (pv *WwisePreviewState) Delete()

func (*WwisePreviewState) LoadStream

func (pv *WwisePreviewState) LoadStream(title string, wemData []byte, playWhenDoneLoading bool)

Jump to

Keyboard shortcuts

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