本文整理汇总了C#中ApplicationLauncherButton.SetTexture方法的典型用法代码示例。如果您正苦于以下问题:C# ApplicationLauncherButton.SetTexture方法的具体用法?C# ApplicationLauncherButton.SetTexture怎么用?C# ApplicationLauncherButton.SetTexture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ApplicationLauncherButton
的用法示例。
在下文中一共展示了ApplicationLauncherButton.SetTexture方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnGUIAppLauncherReady
// Stock Toolbar Startup and cleanup
private void OnGUIAppLauncherReady()
{
Utilities.LogMessage("SMAddon.OnGUIAppLauncherReady active...", "Info", SMSettings.VerboseLogging);
try
{
// Setup SM WIndow button
if (HighLogic.LoadedSceneIsFlight && SMButton_Stock == null && !SMSettings.EnableBlizzyToolbar)
{
string Iconfile = "IconOff_38";
SMButton_Stock = ApplicationLauncher.Instance.AddModApplication(
OnSMButtonToggle,
OnSMButtonToggle,
DummyHandler,
DummyHandler,
DummyHandler,
DummyHandler,
ApplicationLauncher.AppScenes.FLIGHT | ApplicationLauncher.AppScenes.MAPVIEW,
(Texture)GameDatabase.Instance.GetTexture(TextureFolder + Iconfile, false));
if (WindowManifest.ShowWindow)
SMButton_Stock.SetTexture((Texture)GameDatabase.Instance.GetTexture(WindowManifest.ShowWindow ? TextureFolder + "IconOn_38" : TextureFolder + "IconOff_38", false));
}
// Setup Settings Button
if (HighLogic.LoadedScene == GameScenes.SPACECENTER && SMSettings_Stock == null && !SMSettings.EnableBlizzyToolbar)
{
string Iconfile = "IconS_Off_38";
SMSettings_Stock = ApplicationLauncher.Instance.AddModApplication(
OnSMSettingsToggle,
OnSMSettingsToggle,
DummyHandler,
DummyHandler,
DummyHandler,
DummyHandler,
ApplicationLauncher.AppScenes.SPACECENTER,
(Texture)GameDatabase.Instance.GetTexture(TextureFolder + Iconfile, false));
if (WindowSettings.ShowWindow)
SMSettings_Stock.SetTexture((Texture)GameDatabase.Instance.GetTexture(WindowSettings.ShowWindow ? TextureFolder + "IconS_On_38" : TextureFolder + "IconS_Off_38", false));
}
// Setup Roster Button
if (HighLogic.LoadedScene == GameScenes.SPACECENTER && SMRoster_Stock == null && !SMSettings.EnableBlizzyToolbar)
{
string Iconfile = "IconR_Off_38";
SMRoster_Stock = ApplicationLauncher.Instance.AddModApplication(
OnSMRosterToggle,
OnSMRosterToggle,
DummyHandler,
DummyHandler,
DummyHandler,
DummyHandler,
ApplicationLauncher.AppScenes.SPACECENTER,
(Texture)GameDatabase.Instance.GetTexture(TextureFolder + Iconfile, false));
if (WindowRoster.ShowWindow)
SMRoster_Stock.SetTexture((Texture)GameDatabase.Instance.GetTexture(WindowRoster.ShowWindow ? TextureFolder + "IconR_On_38" : TextureFolder + "IconR_Off_38", false));
}
}
catch (Exception ex)
{
Utilities.LogMessage("Error in: ShipManifestAddon.OnGUIAppLauncherReady. " + ex.ToString(), "Error", true);
}
}
示例2: OnGUIAppLauncherReady
private void OnGUIAppLauncherReady()
{
// Setup PW Stock Toolbar button
bool hidden = false;
if(ApplicationLauncher.Ready && (partWizardStockButton == null || !ApplicationLauncher.Instance.Contains(partWizardStockButton, out hidden)))
{
partWizardStockButton = ApplicationLauncher.Instance.AddModApplication(
ToggleVisibility,
ToggleVisibility,
DummyHandler,
DummyHandler,
DummyHandler,
DummyHandler,
ApplicationLauncher.AppScenes.VAB | ApplicationLauncher.AppScenes.SPH,
(Texture)GameDatabase.Instance.GetTexture(StockToolbarIconActive, false));
if(this.partWizardWindow.Visible)
{
partWizardStockButton.SetTexture((Texture)GameDatabase.Instance.GetTexture(this.partWizardWindow.Visible ? this.toolbarIconActive : this.toolbarIconInactive, false));
}
}
}
示例3: OnGUIAppLauncherReady
// Stock Toolbar Startup and cleanup
private void OnGUIAppLauncherReady()
{
Utilities.LogMessage("RosterManagerAddon.OnGUIAppLauncherReady active...", "Info", RMSettings.VerboseLogging);
try
{
// Setup Roster Button
if (HighLogic.LoadedScene == GameScenes.SPACECENTER && RMRoster_Stock == null && !RMSettings.EnableBlizzyToolbar)
{
string Iconfile = "Icon_Off_38";
RMRoster_Stock = ApplicationLauncher.Instance.AddModApplication(
OnRMRosterToggle,
OnRMRosterToggle,
DummyVoid,
DummyVoid,
DummyVoid,
DummyVoid,
ApplicationLauncher.AppScenes.SPACECENTER,
(Texture)GameDatabase.Instance.GetTexture(TextureFolder + Iconfile, false));
if (WindowRoster.ShowWindow)
RMRoster_Stock.SetTexture((Texture)GameDatabase.Instance.GetTexture(WindowRoster.ShowWindow ? TextureFolder + "Icon_On_38" : TextureFolder + "Icon_Off_38", false));
}
}
catch (Exception ex)
{
Utilities.LogMessage("Error in: RosterManagerAddon.OnGUIAppLauncherReady. " + ex.ToString(), "Error", true);
}
}
示例4: OnGuiAppLauncherReady
// Stock Toolbar Startup and cleanup
private void OnGuiAppLauncherReady()
{
try
{
// Setup SM WIndow button
if (HighLogic.LoadedSceneIsFlight && _smButtonStock == null && !SMSettings.EnableBlizzyToolbar)
{
string iconfile = "IconOff_38";
_smButtonStock = ApplicationLauncher.Instance.AddModApplication(
OnSmButtonClicked,
OnSmButtonClicked,
DummyHandler,
DummyHandler,
DummyHandler,
DummyHandler,
ApplicationLauncher.AppScenes.FLIGHT | ApplicationLauncher.AppScenes.MAPVIEW,
GameDatabase.Instance.GetTexture(TextureFolder + iconfile, false));
if (WindowManifest.ShowWindow)
_smButtonStock.SetTexture(
GameDatabase.Instance.GetTexture(
WindowManifest.ShowWindow ? TextureFolder + "IconOn_38" : TextureFolder + "IconOff_38", false));
}
// Setup Settings Button
if (HighLogic.LoadedScene == GameScenes.SPACECENTER && _smSettingsStock == null &&
!SMSettings.EnableBlizzyToolbar)
{
string iconfile = "IconS_Off_38";
_smSettingsStock = ApplicationLauncher.Instance.AddModApplication(
OnSmSettingsClicked,
OnSmSettingsClicked,
DummyHandler,
DummyHandler,
DummyHandler,
DummyHandler,
ApplicationLauncher.AppScenes.SPACECENTER,
GameDatabase.Instance.GetTexture(TextureFolder + iconfile, false));
if (WindowSettings.ShowWindow)
_smSettingsStock.SetTexture(
GameDatabase.Instance.GetTexture(
WindowSettings.ShowWindow ? TextureFolder + "IconS_On_38" : TextureFolder + "IconS_Off_38", false));
}
// Setup Roster Button
if (HighLogic.LoadedScene != GameScenes.SPACECENTER || _smRosterStock != null || SMSettings.EnableBlizzyToolbar)
return;
{
string iconfile = "IconR_Off_38";
_smRosterStock = ApplicationLauncher.Instance.AddModApplication(
OnSmRosterClicked,
OnSmRosterClicked,
DummyHandler,
DummyHandler,
DummyHandler,
DummyHandler,
ApplicationLauncher.AppScenes.SPACECENTER,
GameDatabase.Instance.GetTexture(TextureFolder + iconfile, false));
if (WindowRoster.ShowWindow)
_smRosterStock.SetTexture(
GameDatabase.Instance.GetTexture(
WindowRoster.ShowWindow ? TextureFolder + "IconR_On_38" : TextureFolder + "IconR_Off_38", false));
}
}
catch (Exception ex)
{
Utilities.LogMessage("Error in: SMAddon.OnGUIAppLauncherReady. " + ex, Utilities.LogType.Error, true);
}
}