Skip to content

Commit adc34f9

Browse files
author
Alex Marko
committed
0.10.3
API hotspots loading fix near 0 lat/long minor stability fixes added tail bar connection point for towing by AI or player vehicle
1 parent 3d7d5b1 commit adc34f9

25 files changed

+499
-63
lines changed

KA-panel/README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# msfs2020-toolbar-window-template
2+
Microsoft FlightSimulator 2020 Toolbar Extra Window Template, this example loads UI window with ipify.org website SINCE SKYVECTOR is now blocking their website being loaded from iframe “X-Frame-Options“ = “SAMEORIGIN“.
3+
4+
5+
To build the SPB if you have changed UI panel template definition run `build.bat` or manually
6+
7+
`SDK\Tools\bin\fspackagetool.exe kinetic-ingamepanel\Build\kinetic-ingamepanel.xml -nomirroring`
8+
9+
It will generate the SPB at `kinetic-ingamepanel\Build\Packages\kinetic-ingamepanel\Build` copy the SPB to `kinetic-ingamepanel\InGamePanels`.
10+
11+
Copy the package to community folder BUT DO NOT COPY the `kinetic-ingamepanel\Build` directory.
12+
13+
## Screenshots
14+
15+
![example](example.png)
16+
![example2](example2.png)
17+
![example3](example3.png)
18+
19+
#
20+
## Please, if you like the source/my addons, consider making a donation to support me/keep development of this and new addons, any amount is welcome. I will buy MSFS2020 from steam since my current version is from a limited game pass access which will be ended. Thank you.
21+
<br/>
22+
<br/>
23+
<div align="center">
24+
25+
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LZH27QQ2ST64N)
26+
27+
</div>
28+
<br/>
29+
<br/>
30+
<br/>

KA-panel/build.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
"%MSFS_SDK%\Tools\bin\fspackagetool.exe" "kinetic-ingamepanel\Build\kinetic-ingamepanel.xml" -nomirroring
3+
copy /Y "kinetic-ingamepanel\Build\Packages\kinetic-ingamepanel\Build\kinetic-ingamepanel.spb" "kinetic-ingamepanel\InGamePanels"

KA-panel/example.png

176 KB
Loading

KA-panel/example2.png

924 KB
Loading

KA-panel/example3.png

807 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<AssetPackage Name="kinetic-ingamepanel" Version="2.0.0">
2+
<ItemSettings>
3+
<ContentType>SPB</ContentType>
4+
<Title>kinetic-ingamepanel</Title>
5+
<Manufacturer>Maximus</Manufacturer>
6+
<Creator>Maximus</Creator>
7+
</ItemSettings>
8+
<Flags>
9+
<VisibleInStore>false</VisibleInStore>
10+
<CanBeReferenced>false</CanBeReferenced>
11+
</Flags>
12+
<AssetGroups>
13+
<AssetGroup Name="kinetic-ingamepanel">
14+
<Type>SPB</Type>
15+
<Flags>
16+
<FSXCompatibility>false</FSXCompatibility>
17+
</Flags>
18+
<AssetDir>PackageSources\</AssetDir>
19+
<OutputDir>Build\</OutputDir>
20+
</AssetGroup>
21+
</AssetGroups>
22+
</AssetPackage>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="Windows-1252"?>
2+
<SimBase.Document Type="InGamePanels" version="1,0">
3+
<Filename>InGamePanel_KineticPanel.spb</Filename>
4+
<InGamePanels.InGamePanelDefinition id="PANEL_KINETIC_PANEL" Name="KineticPanel" url="html_UI/ingamePanels/KineticPanel/KineticPanel.html" resizeDirections="Both" minWidth="33" minHeight="35" defaultWidth="36" defaultHeight="36" defaultTop="33" defaultRight="2" icon="ICON_TOOLBAR_MAXIMUS_CUSTOM_PANEL" buttonVisible="true">
5+
</InGamePanels.InGamePanelDefinition>
6+
</SimBase.Document>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<TimestampID>
2+
<OutputID Path="J:\MSFS2020\SimConnect\Toolbars\msfs2020-toolbar-window-template\kinetic-ingamepanel\Build\Packages" ID="Output_0"/>
3+
</TimestampID>
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Metadata Version="1">
2+
<NamedEntry Name="_CommandVersions">
3+
<![CDATA[0100000080B4AA3272F39530010000001800000000000000]]>
4+
</NamedEntry>
5+
</Metadata>
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Timestamps>
2+
<Entry Path="kinetic-ingamepanel.xml" Timestamp="13263681567"/>
3+
</Timestamps>
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<Timestamps>
2+
<Entry Path="J:\MSFS2020\SimConnect\Toolbars\msfs2020-toolbar-window-template\kinetic-ingamepanel\Build\Packages\kinetic-ingamepanel\Build\kinetic-ingamepanel.spb" Timestamp="13263682035" NbSourceFile="1"/>
3+
</Timestamps>
4+
12.7 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Project Version="2" Name="kinetic-ingamepanel" FolderName="Packages">
2+
<OutputDirectory>.</OutputDirectory>
3+
<TemporaryOutputDirectory>_Temp</TemporaryOutputDirectory>
4+
<Packages>
5+
<Package>PackageDefinitions\kinetic-ingamepanel.xml</Package>
6+
</Packages>
7+
</Project>
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/** This mixin makes a single line element fit exactly on the Roboto font for easier integration. */
2+
ingame-ui#KineticPanel {
3+
display:flex;
4+
flex-direction:column;
5+
align-items:center;
6+
justify-content: center;
7+
height:100% !important;
8+
width: 100% !important;
9+
/*border: 2px solid blue !important;*/
10+
}
11+
ingame-ui#KineticPanel #KineticPanelWrap {
12+
display: flex;
13+
flex-direction: column;
14+
width: 100% !important;
15+
height: 100% !important;
16+
/*border: 2px solid red !important;*/
17+
min-height: 0;
18+
min-width: 0;
19+
overflow:hidden;
20+
align-items: stretch !important;
21+
flex: 1 1 auto !important;
22+
}
23+
ingame-ui#KineticPanel #KineticPanelWrap #KineticPanelIframe {
24+
flex: 1 1 auto !important;
25+
border: 0;
26+
}
27+
ingame-ui#KineticPanel #MainDisplay.hidden {
28+
display: none;
29+
}
30+
ingame-ui#KineticPanel #Footer.hidden {
31+
display: none;
32+
}
33+
ingame-ui#KineticPanel .ingameUiContent {
34+
/*border: 2px solid green !important;*/
35+
display: flex !important;
36+
flex-direction: column !important;
37+
width: 100% !important;
38+
height: 100% !important;
39+
min-height: 0 !important;
40+
min-width: 0 !important;
41+
overflow:hidden !important;
42+
align-items: stretch !important;
43+
flex: 1 1 auto !important;
44+
}
45+
ingame-ui#KineticPanel .ingameUiWrapper {
46+
/*border: 2px solid yellow !important;*/
47+
display: flex !important;
48+
flex-direction: column !important;
49+
width: 100% !important;
50+
height: 100% !important;
51+
min-height: 0 !important;
52+
min-width: 0 !important;
53+
overflow:hidden !important;
54+
align-items: stretch !important;
55+
flex: 1 1 auto !important;
56+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="stylesheet" href="/SCSS/common.css" />
6+
<link rel="stylesheet" href="KineticPanel.css" />
7+
8+
<script type="text/javascript" src="/JS/coherent.js"></script>
9+
<script type="text/javascript" src="/JS/common.js"></script>
10+
<script type="text/javascript" src="/JS/dataStorage.js"></script>
11+
<script type="text/javascript" src="/JS/buttons.js"></script>
12+
<script type="text/javascript" src="/JS/Services/ToolBarPanels.js"></script>
13+
<script type="text/javascript" src="/Pages/VCockpit/Instruments/Shared/BaseInstrument.js"></script>
14+
15+
<link rel="import" href="/templates/NewPushButton/NewPushButton.html" />
16+
<link rel="import" href="/templates/ToggleButton/toggleButton.html" />
17+
<link rel="import" href="/templates/tabMenu/tabMenu.html" />
18+
<link rel="import" href="/templates/ingameUi/ingameUi.html" />
19+
<link rel="import" href="/templates/ingameUiHeader/ingameUiHeader.html" />
20+
<link rel="import" href="/templates/NewListButton/NewListButton.html" />
21+
22+
<script type="text/javascript" src="/JS/debug.js"></script>
23+
<script type="text/javascript" src="KineticPanel.js"></script>
24+
</head>
25+
26+
<body class="border-box">
27+
<ingamepanel-kinetic>
28+
<ingame-ui id="KineticPanel" panel-id="PANEL_KINETIC_PANEL" title="" class="ingameUiFrame panelInvisible" content-fit="true" min-width="160" min-height="90">
29+
<div id="KineticPanelWrap">
30+
<iframe id="KineticPanelIframe" src=""></iframe>
31+
</div>
32+
<section id="MainDisplay">
33+
header
34+
</section>
35+
<section id="Footer">
36+
footer
37+
</section>
38+
</ingame-ui>
39+
</ingamepanel-kinetic>
40+
</body>
41+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
class IngamePanelKineticPanel extends TemplateElement {
2+
constructor() {
3+
super(...arguments);
4+
5+
this.panelActive = false;
6+
this.started = false;
7+
this.ingameUi = null;
8+
this.busy = false;
9+
this.debugEnabled = false;
10+
11+
if (this.debugEnabled) {
12+
var self = this;
13+
setTimeout(() => {
14+
self.isDebugEnabled();
15+
}, 1000);
16+
} else {
17+
this.initialize();
18+
}
19+
}
20+
isDebugEnabled() {
21+
var self = this;
22+
if (typeof g_modDebugMgr != "undefined") {
23+
g_modDebugMgr.AddConsole(null);
24+
g_modDebugMgr.AddDebugButton("Identifier", function() {
25+
console.log('Identifier');
26+
console.log(self.instrumentIdentifier);
27+
});
28+
g_modDebugMgr.AddDebugButton("TemplateID", function() {
29+
console.log('TemplateID');
30+
console.log(self.templateID);
31+
});
32+
g_modDebugMgr.AddDebugButton("Source", function() {
33+
console.log('Source');
34+
console.log(window.document.documentElement.outerHTML);
35+
});
36+
g_modDebugMgr.AddDebugButton("close", function() {
37+
console.log('close');
38+
if (self.ingameUi) {
39+
console.log('ingameUi');
40+
self.ingameUi.closePanel();
41+
}
42+
});
43+
this.initialize();
44+
} else {
45+
Include.addScript("/JS/debug.js", function () {
46+
if (typeof g_modDebugMgr != "undefined") {
47+
g_modDebugMgr.AddConsole(null);
48+
g_modDebugMgr.AddDebugButton("Identifier", function() {
49+
console.log('Identifier');
50+
console.log(self.instrumentIdentifier);
51+
});
52+
g_modDebugMgr.AddDebugButton("TemplateID", function() {
53+
console.log('TemplateID');
54+
console.log(self.templateID);
55+
});
56+
g_modDebugMgr.AddDebugButton("Source", function() {
57+
console.log('Source');
58+
console.log(window.document.documentElement.outerHTML);
59+
});
60+
g_modDebugMgr.AddDebugButton("close", function() {
61+
console.log('close');
62+
if (self.ingameUi) {
63+
console.log('ingameUi');
64+
self.ingameUi.closePanel();
65+
}
66+
});
67+
self.initialize();
68+
} else {
69+
setTimeout(() => {
70+
self.isDebugEnabled();
71+
}, 2000);
72+
}
73+
});
74+
}
75+
}
76+
connectedCallback() {
77+
super.connectedCallback();
78+
79+
var self = this;
80+
this.ingameUi = this.querySelector('ingame-ui');
81+
82+
this.iframeElement = document.getElementById("KineticPanelIframe");
83+
84+
this.m_MainDisplay = document.querySelector("#MainDisplay");
85+
this.m_MainDisplay.classList.add("hidden");
86+
87+
this.m_Footer = document.querySelector("#Footer");
88+
this.m_Footer.classList.add("hidden");
89+
90+
if (this.ingameUi) {
91+
this.ingameUi.addEventListener("panelActive", (e) => {
92+
console.log('panelActive');
93+
self.panelActive = true;
94+
if (self.iframeElement) {
95+
self.iframeElement.src = 'https://www.ipify.org/';
96+
}
97+
});
98+
this.ingameUi.addEventListener("panelInactive", (e) => {
99+
console.log('panelInactive');
100+
self.panelActive = false;
101+
if (self.iframeElement) {
102+
self.iframeElement.src = '';
103+
}
104+
});
105+
this.ingameUi.addEventListener("onResizeElement", () => {
106+
//self.updateImage();
107+
});
108+
this.ingameUi.addEventListener("dblclick", () => {
109+
if (self.m_Footer) {
110+
self.m_Footer.classList.remove("hidden");
111+
}
112+
});
113+
}
114+
}
115+
initialize() {
116+
if (this.started) {
117+
return;
118+
}
119+
120+
//var self = this;
121+
//this.m_MainDisplay = document.querySelector("#MainDisplay");
122+
//this.m_MainDisplay.classList.add("hidden");
123+
124+
//this.m_Footer = document.querySelector("#Footer");
125+
//this.m_Footer.classList.add("hidden");
126+
127+
//this.iframeElement = document.getElementById("KineticPanelIframe");
128+
//this.ingameUi = this.querySelector('ingame-ui');
129+
130+
/*if (this.ingameUi) {
131+
this.ingameUi.addEventListener("panelActive", (e) => {
132+
console.log('panelActive');
133+
self.updateImage();
134+
});
135+
this.ingameUi.addEventListener("panelInactive", (e) => {
136+
console.log('panelInactive');
137+
self.iframeElement.src = '';
138+
});
139+
this.ingameUi.addEventListener("onResizeElement", () => {
140+
//self.updateImage();
141+
});
142+
this.ingameUi.addEventListener("dblclick", () => {
143+
if (self.m_Footer) {
144+
self.m_Footer.classList.remove("hidden");
145+
}
146+
});
147+
}*/
148+
this.started = true;
149+
}
150+
disconnectedCallback() {
151+
super.disconnectedCallback();
152+
}
153+
updateImage() {
154+
155+
}
156+
}
157+
window.kineticElements.define("ingamepanel-kinetic", IngamePanelKineticPanel);
158+
checkAutoload();

0 commit comments

Comments
 (0)