@@ -9,13 +9,13 @@ import (
99 "github.com/smaTc/RemotePlayDetached/executor"
1010)
1111
12- //AppItem struct
12+ // AppItem struct
1313type AppItem struct {
1414 App executor.App
1515 widget.Box
1616}
1717
18- //NewAppItem func
18+ // NewAppItem func
1919func NewAppItem (app executor.App ) fyne.Widget {
2020 item := & AppItem {App : app }
2121 item .ExtendBaseWidget (item )
@@ -65,15 +65,27 @@ func editApp(oldApp executor.App) {
6565 nameEntry .SetText (oldApp .Name )
6666
6767 pathEntry := NewButtonEntry ()
68- pathEntry .SetText (oldApp .Path )
68+ pathEntry .SetText (oldApp .GamePath )
6969
7070 argsEntry := NewButtonEntry ()
7171 argsEntry .SetText (oldApp .Args )
7272
73+ protonEntry := NewButtonEntry ()
74+ protonEntry .SetText (oldApp .ProtonPath )
75+
76+ prefixEntry := NewButtonEntry ()
77+ prefixEntry .SetText (oldApp .WinePrefixPath )
78+
79+ compatEntry := NewButtonEntry ()
80+ compatEntry .SetText (oldApp .CompatDataPath )
81+
7382 name := widget .NewFormItem ("Name" , nameEntry )
74- path := widget .NewFormItem ("Path" , pathEntry )
83+ path := widget .NewFormItem ("Game Path" , pathEntry )
7584 args := widget .NewFormItem ("Args" , argsEntry )
76- form := widget .NewForm (name , path , args )
85+ proton := widget .NewFormItem ("Proton Path" , protonEntry )
86+ prefix := widget .NewFormItem ("Prefix Path" , prefixEntry )
87+ compat := widget .NewFormItem ("Compat Path" , compatEntry )
88+ form := widget .NewForm (name , path , args , proton , prefix , compat )
7789
7890 cancelButton := widget .NewButton ("Cancel" , func () {
7991 editWindow .Close ()
@@ -83,12 +95,15 @@ func editApp(oldApp executor.App) {
8395 appName := nameEntry .Text
8496 appPath := pathEntry .Text
8597 argsString := argsEntry .Text
98+ protonPath := protonEntry .Text
99+ prefixPath := prefixEntry .Text
100+ compatPath := compatEntry .Text
86101
87102 if appName == "" || appPath == "" {
88103 return
89104 }
90105
91- newApp := executor.App {Name : appName , Path : appPath , Args : argsString }
106+ newApp := executor.App {Name : appName , GamePath : appPath , Args : argsString , ProtonPath : protonPath , WinePrefixPath : prefixPath , CompatDataPath : compatPath }
92107 editWindow .Close ()
93108 executor .EditApp (oldApp , newApp )
94109 refreshMainWindow ()
@@ -101,6 +116,9 @@ func editApp(oldApp executor.App) {
101116 nameEntry .SetConfirmButton (okButton )
102117 pathEntry .SetConfirmButton (okButton )
103118 argsEntry .SetConfirmButton (okButton )
119+ protonEntry .SetConfirmButton (okButton )
120+ prefixEntry .SetConfirmButton (okButton )
121+ compatEntry .SetConfirmButton (okButton )
104122
105123 buttons := fyne .NewContainerWithLayout (layout .NewHBoxLayout (), okButton , layout .NewSpacer (), fileExlporerButton , layout .NewSpacer (), cancelButton )
106124
0 commit comments