rip out turtle specific options
Some checks failed
Build Go/Fyne App for macOS ARM64 / build (push) Has been cancelled

This commit is contained in:
2025-07-20 14:54:38 -07:00
parent 488d10cb8b
commit 9b04ad7fd0
18 changed files with 164 additions and 954 deletions

View File

@@ -13,8 +13,6 @@ import (
"howett.net/plist"
"turtlesilicon/pkg/debug"
"turtlesilicon/pkg/patching"
"turtlesilicon/pkg/paths"
"turtlesilicon/pkg/utils"
)
@@ -25,17 +23,6 @@ func showOptionsPopup() {
return
}
// Check graphics settings presence and update preferences before showing UI
patching.CheckGraphicsSettingsPresence()
// Load graphics settings from Config.wtf and update preferences
if err := patching.LoadGraphicsSettingsFromConfig(); err != nil {
debug.Printf("Warning: failed to load graphics settings from Config.wtf: %v", err)
}
// Refresh checkbox states to reflect current settings
refreshGraphicsSettingsCheckboxes()
// Create General tab content
generalTitle := widget.NewLabel("General Settings")
generalTitle.TextStyle = fyne.TextStyle{Bold: true}
@@ -51,57 +38,6 @@ func showOptionsPopup() {
container.NewBorder(nil, nil, nil, container.NewHBox(enableOptionAsAltButton, disableOptionAsAltButton), optionAsAltStatusLabel),
)
// Create Graphics tab content
graphicsTitle := widget.NewLabel("Graphics Settings")
graphicsTitle.TextStyle = fyne.TextStyle{Bold: true}
graphicsDescription := widget.NewLabel("Select graphics settings to apply to Config.wtf:")
graphicsDescription.TextStyle = fyne.TextStyle{Italic: true}
// Create bold text labels for each setting
terrainLabel := widget.NewLabel("Reduce Terrain Distance")
terrainLabel.TextStyle = fyne.TextStyle{Bold: true}
multisampleLabel := widget.NewLabel("Set Multisample to 2x")
multisampleLabel.TextStyle = fyne.TextStyle{Bold: true}
shadowLabel := widget.NewLabel("Set Shadow LOD to 0")
shadowLabel.TextStyle = fyne.TextStyle{Bold: true}
libSiliconPatchLabel := widget.NewLabel("Enable libSiliconPatch")
libSiliconPatchLabel.TextStyle = fyne.TextStyle{Bold: true}
// Create setting rows with help buttons between checkbox and label
terrainRow := container.NewHBox(
reduceTerrainDistanceCheckbox,
reduceTerrainDistanceHelpButton,
terrainLabel)
multisampleRow := container.NewHBox(
setMultisampleTo2xCheckbox,
setMultisampleTo2xHelpButton,
multisampleLabel)
shadowRow := container.NewHBox(
setShadowLOD0Checkbox,
setShadowLOD0HelpButton,
shadowLabel)
libSiliconPatchRow := container.NewHBox(
libSiliconPatchCheckbox,
libSiliconPatchHelpButton,
libSiliconPatchLabel)
graphicsContainer := container.NewVBox(
graphicsTitle,
widget.NewSeparator(),
graphicsDescription,
widget.NewSeparator(),
terrainRow,
multisampleRow,
shadowRow,
libSiliconPatchRow,
widget.NewSeparator(),
container.NewCenter(applyGraphicsSettingsButton),
)
// Create Environment Variables tab content
envVarsTitle := widget.NewLabel("Environment Variables")
envVarsTitle.TextStyle = fyne.TextStyle{Bold: true}
@@ -114,7 +50,6 @@ func showOptionsPopup() {
// Create tabs
tabs := container.NewAppTabs(
container.NewTabItem("General", container.NewScroll(generalContainer)),
container.NewTabItem("Graphics", container.NewScroll(graphicsContainer)),
container.NewTabItem("Environment", container.NewScroll(envVarsContainer)),
)
@@ -223,9 +158,9 @@ func showTroubleshootingPopup() {
// --- Delete WDB Directory ---
wdbDeleteButton = widget.NewButton("Delete", func() {
wdbPath := filepath.Join(paths.TurtlewowPath, "WDB")
wdbPath := filepath.Join(paths.EpochPath, "WDB")
if !utils.DirExists(wdbPath) {
dialog.ShowInformation("WDB Not Found", "No WDB directory found in your TurtleWoW folder.", currentWindow)
dialog.ShowInformation("WDB Not Found", "No WDB directory found in your Epoch folder.", currentWindow)
return
}
dialog.NewConfirm("Delete WDB Directory", "Are you sure you want to delete the WDB directory? This will remove all cached data. No important data will be lost.", func(confirm bool) {
@@ -244,7 +179,7 @@ func showTroubleshootingPopup() {
wineDeleteButton = widget.NewButton("Delete", func() {
homeDir, _ := os.UserHomeDir()
userWine := filepath.Join(homeDir, ".wine")
turtleWine := filepath.Join(paths.TurtlewowPath, ".wine")
turtleWine := filepath.Join(paths.EpochPath, ".wine")
msg := "Are you sure you want to delete the following Wine prefixes?\n\n- " + userWine + "\n- " + turtleWine + "\n\nThis cannot be undone."
dialog.NewConfirm("Delete Wine Prefixes", msg, func(confirm bool) {
if confirm {
@@ -255,7 +190,7 @@ func showTroubleshootingPopup() {
return
}
if err2 != nil && !os.IsNotExist(err2) {
dialog.ShowError(fmt.Errorf("Failed to delete TurtleWoW/.wine: %v", err2), currentWindow)
dialog.ShowError(fmt.Errorf("Failed to delete Epoch/.wine: %v", err2), currentWindow)
return
}
dialog.ShowInformation("Wine Prefixes Deleted", "Wine prefixes deleted successfully.", currentWindow)
@@ -288,11 +223,11 @@ func showTroubleshootingPopup() {
troubleshootingCloseButton = widget.NewButton("Close", func() {})
popupContent := container.NewBorder(
nil, // top
nil, // top
container.NewCenter(troubleshootingCloseButton), // bottom
nil, // left
nil, // right
container.NewPadded(scrollContainer), // center
nil, // left
nil, // right
container.NewPadded(scrollContainer), // center
)
windowSize := currentWindow.Content().Size()