Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ModPanelComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void Update () {

// try any non-null callback in order
var func = new Callback[] { button.onTrue, button.onHover, button.onLeftClick, button.onEnable, button.onFalse, button.onHoverOut, button.onDisable }
.Select(cb => cb.GetInvocationList().Skip(1).FirstOrDefault()).Where(m => m != null).FirstOrDefault(); var method = func.Method.Name;
.Select(cb => cb.GetInvocationList().Skip(1).FirstOrDefault()).Where(m => m != null).FirstOrDefault();

// button with no callbacks. Ignore.
if (func == null)
Expand All @@ -152,6 +152,7 @@ public void Update () {
if (module.EndsWith (".dll"))
module = module.Substring (0, module.Length - 4);

var method = func.Method.Name;
if (AdjustableModPanel.Instance.IsButtonToolbarController (button, out string name, out string id)) {
// button created by ToolbarControl needs special treatment
module = name;
Expand Down