internal chatterer()
{
//integration with blizzy78's Toolbar plugin
if (ToolbarButtonWrapper.ToolbarManagerPresent) //&& useBlizzy78Toolbar)
{
if (debugging) Debug.Log("[CHATR] blizzy78's Toolbar plugin found ! Set toolbar button.");
chatterer_toolbar_button = ToolbarButtonWrapper.TryWrapToolbarButton("Chatterer", "UI");
chatterer_toolbar_button.TexturePath = "Chatterer/Textures/chatterer_icon_toolbar";
chatterer_toolbar_button.ToolTip = "Open/Close Chatterer UI";
chatterer_toolbar_button.SetButtonVisibility(GameScenes.FLIGHT);
chatterer_toolbar_button.AddButtonClickHandler((e) =>
{
if (debugging) Debug.Log("[CHATR] Toolbar UI button clicked, hide_all_windows = " + hide_all_windows);
if (launcherButton == null && ToolbarButtonWrapper.ToolbarManagerPresent)
{
hide_all_windows = !hide_all_windows;
}
else if (launcherButton != null)
{
if (hide_all_windows)
{
launcherButton.SetTrue();
if (debugging) Debug.Log("[CHATR] Toolbar UI button clicked, launcherButton.State = " + launcherButton.State);
}
else if (!hide_all_windows)
{
launcherButton.SetFalse();
if (debugging) Debug.Log("[CHATR] Toolbar UI button clicked, launcherButton.State = " + launcherButton.State);
}
}
});
}
}