Epochify (#1)

Make it work for Epoch!

Reviewed-on: #1
This commit is contained in:
2025-07-22 20:47:04 +00:00
parent 488d10cb8b
commit 0967834f6b
30 changed files with 412 additions and 1446 deletions

View File

@@ -1,10 +1,8 @@
package ui
import (
"turtlesilicon/pkg/debug"
"turtlesilicon/pkg/patching"
"turtlesilicon/pkg/paths"
"turtlesilicon/pkg/utils"
"epochsilicon/pkg/paths"
"epochsilicon/pkg/utils"
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
@@ -14,15 +12,15 @@ import (
func CreateUI(myWindow fyne.Window) fyne.CanvasObject {
// Initialize UI component variables
crossoverPathLabel = widget.NewRichText()
turtlewowPathLabel = widget.NewRichText()
turtlewowStatusLabel = widget.NewRichText()
epochPathLabel = widget.NewRichText()
epochStatusLabel = widget.NewRichText()
crossoverStatusLabel = widget.NewRichText()
serviceStatusLabel = widget.NewRichText()
// Load saved paths from prefs
prefs, _ := utils.LoadPrefs()
if prefs.TurtleWoWPath != "" {
paths.TurtlewowPath = prefs.TurtleWoWPath
if prefs.EpochPath != "" {
paths.EpochPath = prefs.EpochPath
}
if prefs.CrossOverPath != "" {
paths.CrossoverPath = prefs.CrossOverPath
@@ -37,18 +35,6 @@ func CreateUI(myWindow fyne.Window) fyne.CanvasObject {
// Check default CrossOver path
paths.CheckDefaultCrossOverPath()
// Check graphics settings presence and set default state
patching.CheckGraphicsSettingsPresence()
// Load graphics settings from Config.wtf and update UI
if err := patching.LoadGraphicsSettingsFromConfig(); err != nil {
// Log error but continue - this is not critical for app startup
debug.Printf("Warning: failed to load graphics settings from Config.wtf: %v", err)
} else {
// Refresh checkbox states to reflect loaded settings
refreshGraphicsSettingsCheckboxes()
}
// Create header, main content and bottom bar
headerContent := createHeaderContainer()
mainContent := createMainContent(myWindow)