-
Notifications
You must be signed in to change notification settings - Fork 9
/
GCAppToolbar.cs
39 lines (32 loc) · 1.37 KB
/
GCAppToolbar.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// ToolbarManager.cs
//
// Author:
// Allis Tauri <[email protected]>
//
// Copyright (c) 2016 Allis Tauri
using KSP.UI.Screens;
using AT_Utils;
namespace GroundConstruction
{
[KSPAddon(KSPAddon.Startup.EveryScene, true)]
public class GCAppToolbar : AppToolbar<GCAppToolbar>
{
protected override string TB_ICON => "GroundConstruction/Icons/toolbar-icon";
protected override string AL_ICON => "GroundConstruction/Icons/applauncher-icon";
protected override ApplicationLauncher.AppScenes AL_SCENES =>
ApplicationLauncher.AppScenes.FLIGHT | ApplicationLauncher.AppScenes.MAPVIEW |
ApplicationLauncher.AppScenes.TRACKSTATION | ApplicationLauncher.AppScenes.SPACECENTER |
ApplicationLauncher.AppScenes.SPH | ApplicationLauncher.AppScenes.VAB;
protected override GameScenes[] TB_SCENES =>
new[] { GameScenes.FLIGHT, GameScenes.TRACKSTATION, GameScenes.SPACECENTER, GameScenes.CREDITS };
protected override string button_tooltip => "Global Construction";
protected override bool ForceAppLauncher => Globals.Instance.UseStockAppLauncher;
protected override void onLeftClick()
{
if(HighLogic.LoadedSceneIsEditor)
GCEditorGUI.ToggleWithButton(ALButton);
else
GroundConstructionScenario.ToggleWindow();
}
}
}