26
pkg/ui/ui.go
26
pkg/ui/ui.go
@@ -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)
|
||||
|
Reference in New Issue
Block a user