-
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
public void SetFalse()
{
if (stockButton != null)
{
stockButton.SetFalse();
}
else
{
ToggleButtonActive();
}
UpdateToolbarIcon();
}
I have an event handler on level loaded:
Void TUFX.TexturesUnlimitedFXLoader:configGuiEnable ()+0x0 at C:\Users\Jon\source\repos\TUFX\Plugin\TUFX\Addon\TexturesUnlimitedFXLoader.cs:[600:13-600:35] C#
> Void ToolbarControl_NS.ToolbarControl:SetButtonActive ()+0x18 at /var/lib/jenkins/workspace/T-Z/ToolbarControl/ToolbarControl/ToolbarControl.cs:845 C#
Void ToolbarControl_NS.ToolbarControl:ToggleButtonActive ()+0x1b at /var/lib/jenkins/workspace/T-Z/ToolbarControl/ToolbarControl/ToolbarControl.cs:863 C#
Void ToolbarControl_NS.ToolbarControl:SetFalse ()+0x23 at /var/lib/jenkins/workspace/T-Z/ToolbarControl/ToolbarControl/ToolbarControl.cs:429 C#
Void TUFX.TexturesUnlimitedFXLoader:CloseConfigGui ()+0x6 at C:\Users\Jon\source\repos\TUFX\Plugin\TUFX\Addon\TexturesUnlimitedFXLoader.cs:[620:13-620:43] C#
Void TUFX.TexturesUnlimitedFXLoader:onLevelLoaded (GameScenes)+0x22 at C:\Users\Jon\source\repos\TUFX\Plugin\TUFX\Addon\TexturesUnlimitedFXLoader.cs:[418:13-418:30] C#
Void EventData`1:Fire (GameScenes)+0xb8 at :-1 C#
Boolean <FireLoadedEvent>d__46:MoveNext ()+0x9d at :-1 C#
Void UnityEngine.SetupCoroutine:InvokeMoveNext (IEnumerator, IntPtr)+0x27 at :-1 C#
My code:
internal void CloseConfigGui()
{
mainToolbarControl.SetFalse();
}
In Start():
mainToolbarControl = gameObject.AddComponent<ToolbarControl>();
mainToolbarControl.AddToAllToolbars(
configGuiEnable,
configGuiDisable,
ApplicationLauncher.AppScenes.ALWAYS,
toolbarMainName,
toolbarMainName,
"TUFX/Assets/TUFX-Icon1",
"TUFX/Assets/TUFX-Icon1",
toolbarMainName);
I would expect this to either always call the onFalse callback, or at least do nothing if the button state is already "false." But it calls the onTrue callback instead via ToggleButtonActive because SetFalse doesn't check the current state of the button.
Metadata
Metadata
Assignees
Labels
No labels