Documentation
¶
Index ¶
- Constants
- Variables
- func AlertMeter(level int, width int) string
- func AnimatedCursor(frame int) string
- func BlinkText(text string, frame int) string
- func BootSequence(frame int, width int) (string, bool)
- func BoxWithTitle(content, title string, color lipgloss.Color, width int) string
- func CRTEffect(text string, frame int, intensity int) string
- func CircuitLine(width int, frame int) string
- func ConnectionStatus(connected bool, frame int) string
- func CyberCursor(frame int) string
- func CyberHeader(levelNum int, levelName string, alertLevel int, privilege string, frame int, ...) string
- func CyberProgressBar(current, maximum, width int, label string, color lipgloss.Color, frame int) string
- func CyberTerminalFrame(content string, title string, frame int, width, height int) string
- func DataRain(width, height, frame int) string
- func DirectoryTree(currentPath string, tree map[string][]string, maxDepth int) string
- func ExfiltrationAnimation(frame int, levelNum int, nextLevelName string) string
- func GetAlertStyle(level int) lipgloss.Style
- func GlitchEffect(text string, intensity int) string
- func HackingAnimation(frame int) string
- func HexDecor(frame int) string
- func InfiltrationAnimation(frame int, levelNum int, levelName string) string
- func IntrusionWarning(frame int) string
- func MatrixRain(width, height, frame int) string
- func NeonBorder(content string, color lipgloss.Color, title string) string
- func NeonBox(content, title string, frame int, color lipgloss.Color, width int) string
- func NeonText(text string, frame int, color lipgloss.Color) string
- func NetworkActivity(frame int, width int) string
- func ProcessTable(processes []ProcessInfo) string
- func ProgressBar(current, max, width int, color lipgloss.Color) string
- func RenderMenu(state *MenuState, width, height int, musicSettings *MusicSettings) string
- func RenderSettings(state *MenuState, width, height int, musicSettings *MusicSettings) string
- func ScanLineEffect(text string, frame int) string
- func SectionDivider(title string, width int, frame int) string
- func StaticNoise(width, height int, density float64) string
- func SystemMessage(msg string, msgType string) string
- func TeletypeEffect(text string, currentFrame int, charsPerFrame int) string
- func ThreatIndicator(count int, frame int) string
- func TypewriterEffect(text string, frame int, speed int) (string, bool)
- type AnimationState
- type ColorScheme
- type GameScreen
- type MenuOption
- type MenuState
- type Model
- type MusicSettings
- type ProcessInfo
- type SettingsOption
- type TickMsg
Constants ¶
const GameOverASCII = `` /* 1212-byte string literal not displayed */
Arte ASCII para Game Over
const GhostASCIILarge = `` /* 1391-byte string literal not displayed */
Arte ASCII del fantasma - versión grande
const GhostASCIISmall = `` /* 365-byte string literal not displayed */
Arte ASCII del fantasma - versión pequeña
const GhostSubtitleLarge = `` /* 673-byte string literal not displayed */
Subtítulo GHOST grande
const GhostSubtitleMedium = `` /* 133-byte string literal not displayed */
Subtítulo GHOST mediano
const GhostSubtitleSmall = `GHOST`
Subtítulo pequeño
const LogoASCII = `` /* 2075-byte string literal not displayed */
ASCII Art para el título del juego
const LogoSmall = `` /* 275-byte string literal not displayed */
Logo pequeño para el header
const TitleASCIILarge = `` /* 1248-byte string literal not displayed */
Título grande
const TitleASCIIMedium = `` /* 252-byte string literal not displayed */
Título mediano
const TitleASCIISmall = `FILESYSTEM`
Título pequeño
const VictoryASCII = `` /* 1426-byte string literal not displayed */
Arte ASCII para Victoria
Variables ¶
var ( // Retro-futuristic border characters BorderNeon = lipgloss.Border{ Top: "═", Bottom: "═", Left: "║", Right: "║", TopLeft: "╔", TopRight: "╗", BottomLeft: "╚", BottomRight: "╝", } BorderHacker = lipgloss.Border{ Top: "▀", Bottom: "▄", Left: "█", Right: "█", TopLeft: "█", TopRight: "█", BottomLeft: "█", BottomRight: "█", } BorderCyber = lipgloss.Border{ Top: "─", Bottom: "─", Left: "│", Right: "│", TopLeft: "┌", TopRight: "┐", BottomLeft: "└", BottomRight: "┘", } BorderGlitch = lipgloss.Border{ Top: "░", Bottom: "░", Left: "▒", Right: "▒", TopLeft: "▓", TopRight: "▓", BottomLeft: "▓", BottomRight: "▓", } )
CyberBorder characters for different styles
var ( // Colores principales - Gama de Rojos ColorRedBright = lipgloss.Color("#FF0000") // Rojo brillante ColorRedNeon = lipgloss.Color("#FF1744") // Rojo neón ColorRedHot = lipgloss.Color("#FF3333") // Rojo caliente ColorRedMedium = lipgloss.Color("#CC0000") // Rojo medio ColorRedDark = lipgloss.Color("#990000") // Rojo oscuro ColorRedDeep = lipgloss.Color("#660000") // Rojo profundo ColorRedBlood = lipgloss.Color("#8B0000") // Rojo sangre ColorRedMaroon = lipgloss.Color("#4A0000") // Marrón rojizo ColorRedDim = lipgloss.Color("#AA3333") // Rojo tenue ColorRedVeryDim = lipgloss.Color("#553333") // Rojo muy tenue ColorDarkBg = lipgloss.Color("#0A0000") // Fondo casi negro con tinte rojo ColorDarkGray = lipgloss.Color("#1A0A0A") // Gris oscuro rojizo ColorMidGray = lipgloss.Color("#2D1515") // Gris medio rojizo ColorLightGray = lipgloss.Color("#5A3030") // Gris claro rojizo ColorWhite = lipgloss.Color("#FFCCCC") // Blanco rosado // Aliases para compatibilidad ColorNeonGreen = ColorRedBright // Reemplaza verde por rojo brillante ColorNeonPink = ColorRedNeon // Reemplaza rosa por rojo neón ColorNeonCyan = ColorRedMedium // Reemplaza cyan por rojo medio ColorNeonPurple = ColorRedDark // Reemplaza púrpura por rojo oscuro ColorNeonYellow = ColorRedHot // Reemplaza amarillo por rojo caliente ColorNeonOrange = ColorRedDeep // Reemplaza naranja por rojo profundo // Estilos base StyleBase = lipgloss.NewStyle(). Background(ColorDarkBg) // Estilo del prompt (rojo brillante) StylePrompt = lipgloss.NewStyle(). Foreground(ColorRedBright). Bold(true) // Estilo para texto de sistema StyleSystem = lipgloss.NewStyle(). Foreground(ColorRedMedium) // Estilo para advertencias StyleWarning = lipgloss.NewStyle(). Foreground(ColorRedHot). Bold(true) // Estilo para errores/peligro StyleDanger = lipgloss.NewStyle(). Foreground(ColorRedNeon). Bold(true). Blink(true) // Estilo para éxito StyleSuccess = lipgloss.NewStyle(). Foreground(ColorRedBright). Bold(true) // Estilo para directorios StyleDirectory = lipgloss.NewStyle(). Foreground(ColorRedMedium). Bold(true) // Estilo para archivos ejecutables StyleExecutable = lipgloss.NewStyle(). Foreground(ColorRedBright) // Estilo para archivos ocultos StyleHidden = lipgloss.NewStyle(). Foreground(ColorLightGray). Italic(true) // Estilo para el título StyleTitle = lipgloss.NewStyle(). Foreground(ColorRedNeon). Bold(true). Padding(0, 1). Border(lipgloss.DoubleBorder()). BorderForeground(ColorRedMedium) // Estilo para paneles StylePanel = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(ColorRedBright). Padding(0, 1) // Estilo para panel de alerta StyleAlertPanel = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(ColorRedNeon). Padding(0, 1) // Estilo para panel de información StyleInfoPanel = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(ColorRedMedium). Padding(0, 1) // Estilo para el header StyleHeader = lipgloss.NewStyle(). Foreground(ColorRedMedium). Bold(true). Padding(0, 1) // Estilo para el footer/status bar StyleStatusBar = lipgloss.NewStyle(). Foreground(ColorWhite). Background(ColorMidGray). Padding(0, 1) // Estilo para texto resaltado StyleHighlight = lipgloss.NewStyle(). Foreground(ColorRedNeon). Bold(true) // Estilo para el output de comandos StyleOutput = lipgloss.NewStyle(). Foreground(ColorWhite) // Estilo para el cursor/input StyleInput = lipgloss.NewStyle(). Foreground(ColorRedBright) // Estilo para proceso hostil StyleHostile = lipgloss.NewStyle(). Foreground(ColorRedNeon). Bold(true) // Estilo para proceso neutral StyleNeutral = lipgloss.NewStyle(). Foreground(ColorLightGray) // Estilo para mensaje del sistema StyleMessage = lipgloss.NewStyle(). Foreground(ColorRedHot). Italic(true) // Estilo para sugerencias de autocompletado StyleSuggestion = lipgloss.NewStyle(). Foreground(ColorRedDark). Italic(true) // Estilo para sugerencia seleccionada StyleSuggestionSelected = lipgloss.NewStyle(). Foreground(ColorRedBright). Background(ColorMidGray). Bold(true) // Estilo para texto gris oscuro (datos encriptados, etc.) StyleDarkGray = lipgloss.NewStyle(). Foreground(ColorLightGray) )
Paleta de colores Roja Monocromática - Estilo Hacker
Functions ¶
func AlertMeter ¶
AlertMeter crea un medidor de alerta con colores dinámicos
func AnimatedCursor ¶ added in v1.4.0
AnimatedCursor devuelve un cursor animado estilo retro
func BootSequence ¶ added in v1.4.0
BootSequence genera la secuencia de arranque retro-futurista
func BoxWithTitle ¶
BoxWithTitle crea una caja con título
func CircuitLine ¶ added in v1.4.0
CircuitLine genera una línea decorativa estilo circuito
func ConnectionStatus ¶ added in v1.4.0
ConnectionStatus genera indicador de conexión animado
func CyberCursor ¶ added in v1.4.0
CyberCursor devuelve un cursor cyberpunk
func CyberHeader ¶ added in v1.4.0
func CyberHeader(levelNum int, levelName string, alertLevel int, privilege string, frame int, width int) string
CyberHeader genera un header estilo cyberpunk animado
func CyberProgressBar ¶ added in v1.4.0
func CyberProgressBar(current, maximum, width int, label string, color lipgloss.Color, frame int) string
CyberProgressBar crea una barra de progreso estilo cyberpunk
func CyberTerminalFrame ¶ added in v1.4.0
CyberTerminalFrame crea un marco de terminal estilo cyberpunk
func DirectoryTree ¶
DirectoryTree genera un árbol de directorios visual
func ExfiltrationAnimation ¶
ExfiltrationAnimation genera la animación de exfiltración al completar nivel
func GetAlertStyle ¶
Estilos para diferentes niveles de alerta (gama de rojos)
func GlitchEffect ¶
GlitchEffect aplica un efecto glitch al texto
func HackingAnimation ¶
HackingAnimation genera una animación de "hackeo"
func InfiltrationAnimation ¶
InfiltrationAnimation genera la animación de infiltración al inicio de nivel
func IntrusionWarning ¶
IntrusionWarning genera una advertencia de intrusión animada
func MatrixRain ¶
MatrixRain genera un efecto de lluvia estilo Matrix
func NeonBorder ¶
Crear borde con estilo neón
func NetworkActivity ¶ added in v1.4.0
NetworkActivity muestra actividad de red simulada
func ProcessTable ¶
func ProcessTable(processes []ProcessInfo) string
ProcessTable genera una tabla de procesos estilizada
func ProgressBar ¶
ProgressBar crea una barra de progreso estilizada
func RenderMenu ¶
func RenderMenu(state *MenuState, width, height int, musicSettings *MusicSettings) string
RenderMenu renderiza el menú principal con estética cyberpunk 2077
func RenderSettings ¶ added in v1.3.0
func RenderSettings(state *MenuState, width, height int, musicSettings *MusicSettings) string
RenderSettings renderiza el menú de configuración
func ScanLineEffect ¶
ScanLineEffect añade un efecto de líneas de escaneo
func SectionDivider ¶ added in v1.4.0
SectionDivider crea un divisor de sección estilizado
func StaticNoise ¶ added in v1.4.0
StaticNoise genera ruido estático para efecto de interferencia
func SystemMessage ¶
SystemMessage formatea un mensaje del sistema
func TeletypeEffect ¶
TeletypeEffect simula el efecto de máquina de escribir (devuelve el texto progresivo)
func ThreatIndicator ¶ added in v1.4.0
ThreatIndicator muestra el indicador de amenazas activas
Types ¶
type AnimationState ¶
type AnimationState int
AnimationState representa el estado de animación actual
const ( AnimationNone AnimationState = iota AnimationInfiltration AnimationExfiltration )
type ColorScheme ¶ added in v1.3.0
type ColorScheme struct {
Bright lipgloss.Color
Neon lipgloss.Color
Hot lipgloss.Color
Medium lipgloss.Color
Dark lipgloss.Color
Deep lipgloss.Color
Blood lipgloss.Color
Maroon lipgloss.Color
Dim lipgloss.Color
VeryDim lipgloss.Color
}
ColorScheme define una paleta de colores
type GameScreen ¶
type GameScreen int
GameScreen representa la pantalla actual del juego
const ( ScreenMenu GameScreen = iota ScreenGame ScreenGameOver ScreenVictory )
type MenuOption ¶
type MenuOption int
MenuOption representa una opción del menú
const ( MenuNewGame MenuOption = iota MenuContinue MenuSelectLevel MenuSettings MenuQuit )
type MenuState ¶
type MenuState struct {
// contains filtered or unexported fields
}
MenuState maneja el estado del menú
func NewMenuState ¶
NewMenuState crea un nuevo estado de menú
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model representa el estado de la interfaz del juego
func NewModel ¶
func NewModel(game *entity.Game, vfs *filesystem.VirtualFS, cmdHandler *commands.CommandHandler, levelManager *levels.LevelManager) Model
NewModel crea un nuevo modelo de la UI
type MusicSettings ¶ added in v1.5.0
type MusicSettings struct {
Mode int // 0=Off, 1=Random, 2=Sequential, 3=Single
Volume int // 0-100
SelectedTrack int // Índice de la canción seleccionada
Tracks []string // Lista de canciones disponibles
CurrentTrack string // Nombre de la canción actual
}
MusicSettings contiene la configuración de música para el renderizado
type ProcessInfo ¶
ProcessInfo representa información de un proceso para mostrar
type SettingsOption ¶ added in v1.3.0
type SettingsOption int
SettingsOption representa una opción de configuración
const ( SettingDifficulty SettingsOption = iota SettingAnimSpeed SettingShowHints SettingSoundFX SettingColorScheme SettingMusicMode SettingMusicTrack SettingMusicVolume SettingBack )