@@ -98,7 +98,7 @@ [MOD Hotkeys]
98
98
F3 : Effect Level (Not Used)
99
99
F5 : QuickSave
100
100
F7 : QuickLoad
101
- F10 : Setting Monitor
101
+ F10 : Mod Menu
102
102
M : Increase Voice Volume
103
103
N : Decrease Voice Volume
104
104
7 : Lip-Sync
@@ -283,7 +283,30 @@ public void OnGUIFragment()
283
283
}
284
284
}
285
285
286
- if ( visible && ! lastMenuVisibleStatus )
286
+ // Button to open the Mod Menu on the Config Screen
287
+ if ( gameSystem . GameState == GameState . ConfigScreen )
288
+ {
289
+ if ( gameSystem . ConfigManager ( ) != null )
290
+ {
291
+ // Temporarily override the global tint color to get a fade in effect which matches the config screen fade-in
292
+ // This value is not saved by Unity (it resets to the default value each frame)
293
+ GUI . color = new Color ( 1.0f , 1.0f , 1.0f , gameSystem . ConfigManager ( ) . PanelAlpha ( ) ) ;
294
+ }
295
+ string text = "Mod Menu\n (Hotkey: F10)" ;
296
+ float areaWidth = Screen . width / 8 ;
297
+ float areaHeight = Mathf . Round ( styleManager . Group . button . CalcHeight ( new GUIContent ( text , "" ) , areaWidth ) ) + 10 ;
298
+ float xOffset = 0 ;
299
+ float yOffset = Screen . height - areaHeight ;
300
+ GUILayout . BeginArea ( new Rect ( xOffset , yOffset , areaWidth , areaHeight ) , styleManager . modMenuAreaStyle ) ;
301
+ if ( GUILayout . Button ( text , styleManager . Group . button ) )
302
+ {
303
+ this . Show ( ) ;
304
+ }
305
+
306
+ GUILayout . EndArea ( ) ;
307
+ }
308
+
309
+ if ( visible && ! lastMenuVisibleStatus )
287
310
{
288
311
// Executes just before menu becomes visible
289
312
// Update the artset radio buttons/descriptions, as these are set by ModAddArtset() calls in init.txt at runtime
@@ -516,9 +539,29 @@ public void OnGUIFragment()
516
539
517
540
private void Show ( )
518
541
{
519
- gameSystem . MODIgnoreInputs = true ;
520
- gameSystem . HideUIControls ( ) ;
521
- this . visible = true ;
542
+ void ForceShow ( )
543
+ {
544
+ gameSystem . MODIgnoreInputs = true ;
545
+ gameSystem . HideUIControls ( ) ;
546
+ this . visible = true ;
547
+ }
548
+
549
+ if ( gameSystem . GameState == GameState . SaveLoadScreen )
550
+ {
551
+ MODToaster . Show ( "Please close the current menu and try again" ) ;
552
+ }
553
+ else if ( gameSystem . GameState == GameState . ConfigScreen )
554
+ {
555
+ gameSystem . LeaveConfigScreen ( delegate
556
+ {
557
+ ForceShow ( ) ;
558
+ } ) ;
559
+ }
560
+ else
561
+ {
562
+ ForceShow ( ) ;
563
+ }
564
+
522
565
}
523
566
524
567
public void Hide ( )
@@ -536,21 +579,7 @@ public void ToggleVisibility()
536
579
}
537
580
else
538
581
{
539
- if ( gameSystem . GameState == GameState . SaveLoadScreen )
540
- {
541
- MODToaster . Show ( "Please close the current menu and try again" ) ;
542
- }
543
- else if ( gameSystem . GameState == GameState . ConfigScreen )
544
- {
545
- gameSystem . LeaveConfigScreen ( delegate
546
- {
547
- Show ( ) ;
548
- } ) ;
549
- }
550
- else
551
- {
552
- Show ( ) ;
553
- }
582
+ this . Show ( ) ;
554
583
}
555
584
}
556
585
0 commit comments