-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: refactor ScreenListener out into its own class
Previously, the MCM Settings page extended `UIScreenListener` itself. While the settings page was picked up by ModConfigMenu, it crashed the game when opening the mod settings in the Shell and then loading a saved game.
- Loading branch information
1 parent
993b577
commit a0f1b45
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...erStats/Src/BlackMarketSoldierStats/Classes/BlackMarketSoldierStats_MCM_ScreenListener.uc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class BlackMarketSoldierStats_MCM_ScreenListener extends UIScreenListener; | ||
|
||
event OnInit (UIScreen Screen) | ||
{ | ||
local BlackMarketSoldierStats_Settings MCMScreen; | ||
|
||
if (ScreenClass == none) | ||
{ | ||
if (MCM_API(Screen) != none) | ||
{ | ||
ScreenClass = Screen.Class; | ||
} | ||
else | ||
{ | ||
return; | ||
} | ||
} | ||
|
||
MCMScreen = new class'BlackMarketSoldierStats_Settings'; | ||
MCMScreen.OnInit(Screen); | ||
} | ||
|
||
defaultproperties | ||
{ | ||
ScreenClass = none; | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
...arketSoldierStats/Src/BlackMarketSoldierStats/Classes/BlackMarketSoldierStats_Settings.uc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters