Documentation
¶
Overview ¶
Package types provides shared interfaces used across UI packages. This package exists to avoid import cycles between screens and sub-packages.
Index ¶
Constants ¶
View Source
const ( DirNone = 0 DirUp = 1 DirDown = 2 DirLeft = 3 DirRight = 4 )
Direction constants for navigation
View Source
const ( )
Navigation zone types
View Source
const ( )
Navigation index constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FocusManager ¶
type FocusManager interface {
RegisterFocusButton(key string, btn *widget.Button)
SetPendingFocus(key string)
SetScrollWidgets(sc *widget.ScrollContainer, slider *widget.Slider)
SaveScrollPosition()
RestoreScrollPosition()
// Zone-based navigation
}
FocusManager interface for focus restoration and scroll management. Implemented by BaseScreen, used by sub-sections that need to register focusable buttons and manage scroll position.
type FocusRestorer ¶
type FocusRestorer interface {
// GetPendingFocusButton returns the button that should receive focus after rebuild
GetPendingFocusButton() *widget.Button
// ClearPendingFocus clears the pending focus state
ClearPendingFocus()
}
FocusRestorer is implemented by screens that support focus restoration after rebuilds
type ScreenCallback ¶
type ScreenCallback interface {
SwitchToLibrary()
SwitchToDetail(gameCRC string)
SwitchToSettings()
SwitchToScanProgress(rescanAll bool)
LaunchGame(gameCRC string, resume bool)
Exit()
GetWindowWidth() int // For responsive layout calculations
RequestRebuild() // Request UI rebuild after state changes
GetPlaceholderImageData() []byte // Get raw placeholder image data (loading indicator)
GetMissingArtImageData() []byte // Get raw missing-art image data (no artwork found)
GetMD5ByCRC32(crc32 uint32) string // Get MD5 hash from RDB by CRC32
GetExtensions() []string // Get supported ROM file extensions
ShowNotification(msg string) // Show a brief notification message
}
ScreenCallback provides callbacks for screen navigation
Click to show internal directories.
Click to hide internal directories.