@@ -74,20 +74,19 @@ public static void Show(Control con, IReadOnlyList<object?> list, GameEditModel
7474 }
7575
7676 new FlyoutsControl (
77- [
78- new FlyoutMenuModel ( LangUtils . Get ( "GameEditWindow.Flyouts.Text1" ) , true , ( ) =>
77+ [
78+ new FlyoutMenuModel ( LangUtils . Get ( "GameEditWindow.Flyouts.Text1" ) , true , ( ) =>
7979 {
8080 if ( single )
8181 {
82- model . DisEMod ( obj ) ;
82+ model . DisableEnableMod ( obj ) ;
8383 }
8484 else
8585 {
86- foreach ( var item in mods )
87- {
88- model . DisEMod ( item ) ;
89- }
86+ model . DisableEnableMod ( mods ) ;
9087 }
88+
89+ model . ModTreeUpdate ( ) ;
9190 } ) ,
9291 new FlyoutMenuModel ( LangUtils . Get ( "GameEditWindow.Flyouts.Text2" ) , true , ( ) =>
9392 {
@@ -109,11 +108,25 @@ public static void Show(Control con, IReadOnlyList<object?> list, GameEditModel
109108 var list = new List < IStorageFile > ( ) ;
110109 if ( TopLevel . GetTopLevel ( con ) is { } top )
111110 {
112- foreach ( var item in mods )
111+ if ( single )
112+ {
113+ var data = await top . StorageProvider . TryGetFileFromPathAsync ( obj . Local ) ;
114+ if ( data != null )
115+ {
116+ list . Add ( data ) ;
117+ }
118+ }
119+ foreach ( var item in mods )
113120 {
121+ if ( item . IsGroup )
122+ {
123+ continue ;
124+ }
114125 var data = await top . StorageProvider . TryGetFileFromPathAsync ( item . Local ) ;
115- if ( data == null )
126+ if ( data == null )
127+ {
116128 continue ;
129+ }
117130 list . Add ( data ) ;
118131 }
119132 await BaseBinding . CopyFileClipboardAsync ( top , list ) ;
@@ -123,13 +136,21 @@ public static void Show(Control con, IReadOnlyList<object?> list, GameEditModel
123136 {
124137 WebBinding . OpenMcmod ( obj ) ;
125138 } ) ,
139+ new FlyoutMenuModel ( LangUtils . Get ( "GameEditWindow.Flyouts.Text15" ) , true , ( ) =>
140+ {
141+ model . SetText ( mods ) ;
142+ } ) ,
143+ new FlyoutMenuModel ( LangUtils . Get ( "GameEditWindow.Flyouts.Text16" ) , single , ( ) =>
144+ {
145+ model . SetProjectId ( obj ) ;
146+ } ) ,
126147 new FlyoutMenuModel ( LangUtils . Get ( "GameEditWindow.Flyouts.Text4" ) , single
127- && ! string . IsNullOrWhiteSpace ( obj ? . Url ) , ( ) =>
148+ && ! string . IsNullOrWhiteSpace ( obj ? . Url ) , ( ) =>
128149 {
129150 BaseBinding . OpenUrl ( obj ! . Url ) ;
130151 } ) ,
131152 new FlyoutMenuModel ( LangUtils . Get ( "GameEditWindow.Flyouts.Text5" ) , single
132- && ! string . IsNullOrWhiteSpace ( obj ? . PID ) && ! string . IsNullOrWhiteSpace ( obj ? . FID ) , ( ) =>
153+ && ! string . IsNullOrWhiteSpace ( obj ? . PID ) && ! string . IsNullOrWhiteSpace ( obj ? . FID ) , ( ) =>
133154 {
134155 WindowManager . ShowAdd ( obj ! . Obj . Game , obj ) ;
135156 } ) ,
0 commit comments