Documentation
¶
Overview ¶
Package ui provides interactive CLI menus, progress checklists, visual detection summaries, and actionable error guidance for gamux.
Index ¶
- func CleanBBCode(input string) string
- func ClearProgress()
- func FormatBytes(b int64) string
- func NotifyIssue(ctx context.Context, title, message string) error
- func PromptSelectPlatform(gameTitle string, availablePlatforms []string) (string, error)
- func PromptString(promptText string, defaultValue string) string
- func PromptYesNoWithExplanation(question string, explanation string, defaultYes bool) bool
- func RenderAppHelp(app *cli.App, version string)
- func RenderCommandHelp(cmd *cli.Command, version string)
- func RenderConfigSummary(cfg *config.Config, configPath string)
- func RenderDetectionSummary(info DetectionInfoSummary)
- func RenderErrorHelp(err error, suggestedActions []string)
- func RenderHeader(version string)
- func RenderNewsItem(gameTitle string, index int, title, feedLabel, contents, url string, ...)
- func RenderProgress(current, total int, item string)
- func RenderStep(stepNum, totalSteps int, title string)
- func RenderSubStep(symbol, message string)
- func RenderSuccess(title, details string, nextSteps []string)
- func RenderTerseHeader(parentDir string, totalGames int)
- func RenderTerseStatus(info DetectionInfoSummary)
- func RenderTerseSummary(total, loaderCount, cleanCount, updatesAvail, lutrisCount int)
- func RunConfigWizard(cfg *config.Config, configPath string) error
- type CandidateItem
- type DetectionInfoSummary
- type LaunchCandidateSummary
- type NewsItemSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanBBCode ¶ added in v1.0.108
CleanBBCode strips Steam community BBCode tags for clean terminal rendering.
func ClearProgress ¶ added in v1.0.108
func ClearProgress()
ClearProgress clears the current progress bar line in the terminal.
func FormatBytes ¶ added in v1.0.107
FormatBytes formats byte counts into human-readable strings (e.g. 1.29 GiB).
func NotifyIssue ¶ added in v1.0.109
NotifyIssue presents an alert on the console (stderr) and sends a non-intrusive desktop notification via notify-send if available.
func PromptSelectPlatform ¶ added in v1.0.107
PromptSelectPlatform presents an interactive choice for target platform/depot selection.
func PromptString ¶
PromptString asks for text input with a default value.
func PromptYesNoWithExplanation ¶
PromptYesNoWithExplanation asks a yes/no question with an explanatory hint.
func RenderAppHelp ¶ added in v1.0.105
RenderAppHelp displays a clean, concise, single-source workflow guide from cli.App.
func RenderCommandHelp ¶ added in v1.0.109
RenderCommandHelp displays clean formatted help for a specific subcommand.
func RenderConfigSummary ¶ added in v1.0.109
RenderConfigSummary displays a formatted dashboard of all configuration fields.
func RenderDetectionSummary ¶
func RenderDetectionSummary(info DetectionInfoSummary)
RenderDetectionSummary prints a visual preview of detected game metadata.
func RenderErrorHelp ¶
RenderErrorHelp displays a formatted error diagnostic box with suggested actions.
func RenderHeader ¶
func RenderHeader(version string)
RenderHeader displays the application banner and version.
func RenderNewsItem ¶ added in v1.0.107
func RenderNewsItem(gameTitle string, index int, title, feedLabel, contents, url string, date int64)
RenderNewsItem prints a full, clean formatted patch note item.
func RenderProgress ¶ added in v1.0.108
RenderProgress renders a clean single-line progress bar with current/total count and item label.
func RenderStep ¶
RenderStep prints a progress step indicator.
func RenderSubStep ¶
func RenderSubStep(symbol, message string)
RenderSubStep prints a detail item under the current step.
func RenderSuccess ¶
RenderSuccess prints a final success summary box.
func RenderTerseHeader ¶ added in v1.0.108
RenderTerseHeader outputs a clean section header for batch/terse inspection.
func RenderTerseStatus ¶ added in v1.0.108
func RenderTerseStatus(info DetectionInfoSummary)
RenderTerseStatus prints a crisp 2-line card for a game directory.
func RenderTerseSummary ¶ added in v1.0.108
func RenderTerseSummary(total, loaderCount, cleanCount, updatesAvail, lutrisCount int)
RenderTerseSummary prints summary stats after batch inspection.
Types ¶
type CandidateItem ¶ added in v1.0.107
CandidateItem holds metadata for presenting an AppID selection prompt.
func PromptSelectCandidate ¶ added in v1.0.107
func PromptSelectCandidate(query string, candidates []CandidateItem) (CandidateItem, error)
PromptSelectCandidate presents an interactive menu to disambiguate game title search matches.
type DetectionInfoSummary ¶
type DetectionInfoSummary struct {
Name string
AppID string
Store string
Platform string
GameDir string
ExePath string
LaunchCandidates []LaunchCandidateSummary
State string
OriginalBackups int
ManifestID string
BuildID string
DiskSizeBytes int64
FileCount int
OfficialFileCount int
ModifiedFiles []string
MissingFiles []string
UntrackedFiles []string
HasUpdate bool
RemoteManifestID string
DLCCount int
AchievementCount int
LutrisRegistered bool
RecentPatchNote string
NewsItems []NewsItemSummary
}
DetectionInfoSummary holds metadata for displaying a rich game status dashboard.
type LaunchCandidateSummary ¶ added in v1.0.112
type LaunchCandidateSummary struct {
Name string
Executable string
Arguments string
Description string
}
LaunchCandidateSummary holds information about an executable launch option.
func PromptSelectLaunchOption ¶ added in v1.0.107
func PromptSelectLaunchOption(gameTitle string, candidates []LaunchCandidateSummary) (LaunchCandidateSummary, error)
PromptSelectLaunchOption presents an interactive choice for executable / launch option selection.