mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-21 20:39:08 -06:00
Sort documentation sections, fix json parse error for keybindings and add detailed documentation to html output
This commit is contained in:
@@ -30,6 +30,18 @@
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.documentation-item.remote-scripting {
|
||||
border-left: 2px solid #4c1315;
|
||||
background-color: #fcdcdc;
|
||||
color: #4c1315;
|
||||
}
|
||||
|
||||
.documentation-item.local-scripting {
|
||||
border-left: 2px solid #2d4256;
|
||||
background-color: #dcf1f9;
|
||||
color: #2d4256;
|
||||
}
|
||||
|
||||
.documentation-type {
|
||||
color: #888;
|
||||
font-size: 0.8em;
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
{{/if}}
|
||||
</a>
|
||||
</p>
|
||||
<p class="documentation-description">{{description}}</p>
|
||||
<p class="documentation-type">{{description}}</p>
|
||||
<p class="documentation-description">{{documentation}}</p>
|
||||
{{#with restrictions}}
|
||||
{{>documentation}}
|
||||
{{/with}}
|
||||
|
||||
@@ -18,6 +18,10 @@ window.onload = function () {
|
||||
return identifier;
|
||||
});
|
||||
|
||||
documentation.sort(function (a, b) {
|
||||
return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);
|
||||
});
|
||||
|
||||
var data = {
|
||||
documentation: documentation,
|
||||
version: version
|
||||
|
||||
@@ -18,6 +18,10 @@ window.onload = function () {
|
||||
return identifier;
|
||||
});
|
||||
|
||||
factories.sort(function (a, b) {
|
||||
return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);
|
||||
});
|
||||
|
||||
var data = {
|
||||
factories: factories,
|
||||
version: version
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<div class="documentation-item">
|
||||
<div class="documentation-item {{#if remoteScripting}}remote-scripting{{else}}local-scripting{{/if}}">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<p>
|
||||
<a href="#{{urlify key}}" name="{{urlify key}}">
|
||||
<span class="documentation-key">{{key}}</span>
|
||||
<span class="documentation-key">{{key}}</span> <span class="documentation-type">{{#if remoteScripting}}Remote scripting{{else}}Local scripting{{/if}}</span>
|
||||
</a>
|
||||
<p>{{script}}</p>
|
||||
</p>
|
||||
|
||||
@@ -18,6 +18,10 @@ window.onload = function () {
|
||||
return identifier;
|
||||
});
|
||||
|
||||
keybindings.sort(function (a, b) {
|
||||
return a.key < b.key ? -1 : (a.key > b.key ? 1 : 0);
|
||||
});
|
||||
|
||||
var data = {
|
||||
keybindings: keybindings,
|
||||
version: version,
|
||||
|
||||
@@ -18,6 +18,10 @@ window.onload = function () {
|
||||
return identifier;
|
||||
});
|
||||
|
||||
scripting.sort(function (a, b) {
|
||||
return a.library < b.library ? -1 : (a.library > b.library ? 1 : 0);
|
||||
});
|
||||
|
||||
var data = {
|
||||
scripting: scripting,
|
||||
version: version
|
||||
|
||||
@@ -46,6 +46,10 @@ window.onload = function () {
|
||||
return identifier;
|
||||
});
|
||||
|
||||
propertyOwners.sort(function (a, b) {
|
||||
return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);
|
||||
});
|
||||
|
||||
var data = {
|
||||
propertyOwners: propertyOwners,
|
||||
version: version,
|
||||
|
||||
@@ -469,8 +469,8 @@ void InteractionHandler::writeKeyboardDocumentation(const std::string& type, con
|
||||
first = false;
|
||||
json << "{";
|
||||
json << "\"key\": \"" << std::to_string(p.first) << "\",";
|
||||
json << "\"script\": \"" << p.second.first << "\"";
|
||||
json << "\"remoteScripting\": \"" << (p.second.second ? "true" : "false") << "\"";
|
||||
json << "\"script\": \"" << p.second.first << "\",";
|
||||
json << "\"remoteScripting\": " << (p.second.second ? "true" : "false");
|
||||
json << "}";
|
||||
}
|
||||
json << "]";
|
||||
|
||||
Reference in New Issue
Block a user