-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pushing latest changes to prepare for Ex9
- Loading branch information
Showing
10 changed files
with
115 additions
and
68 deletions.
There are no files selected for viewing
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
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,37 @@ | ||
using ABI_RC.Core.InteractionSystem; | ||
using Kafe.CCK.Debugger.Components; | ||
using Kafe.CCK.Debugger.Properties; | ||
|
||
namespace Kafe.CCK.Debugger.Integrations; | ||
|
||
public static class BTKUILibIntegration { | ||
|
||
public static void InitializeBTKUI() { | ||
BTKUILib.QuickMenuAPI.OnMenuRegenerate += LoadBTKUILib; | ||
} | ||
|
||
private static void LoadBTKUILib(CVR_MenuManager manager) { | ||
BTKUILib.QuickMenuAPI.OnMenuRegenerate -= LoadBTKUILib; | ||
|
||
var miscPage = BTKUILib.QuickMenuAPI.MiscTabPage; | ||
var miscCategory = miscPage.AddCategory(AssemblyInfoParams.Name); | ||
|
||
var pinButtonBTKUI = miscCategory.AddButton("Pin To Quick Menu", "", | ||
"Pins the Menu back to quick menu. Useful if you lost your menu :)"); | ||
|
||
pinButtonBTKUI.OnPress += Core.PinToQuickMenu; | ||
|
||
var hideMenuToggle = miscCategory.AddToggle("Hide the Menu", | ||
"Whether to completely hide the CCK Debugger Menu or not.", | ||
Config.MeIsHidden.Value); | ||
|
||
hideMenuToggle.OnValueUpdated += b => { | ||
if (b != Config.MeIsHidden.Value) Config.MeIsHidden.Value = b; | ||
}; | ||
|
||
Config.MeIsHidden.OnEntryValueChanged.Subscribe((oldValue, newValue) => { | ||
if (newValue != hideMenuToggle.ToggleValue) hideMenuToggle.ToggleValue = newValue; | ||
}); | ||
} | ||
|
||
} |
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
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
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
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
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
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
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
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