-
-
Save anonymous/2ad603d3417fc1aaaf14 to your computer and use it in GitHub Desktop.
Planetary Annihilation UI mod: Toggle settings panel in Planet Editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ruN PA/media/ui/alpha/system_editor/system_editor.html PA_MODDED/media/ui/alpha/system_editor/system_editor.html | |
--- PA/media/ui/alpha/system_editor/system_editor.html 2013-07-15 20:14:23.000000000 +0400 | |
+++ PA_MODDED/media/ui/alpha/system_editor/system_editor.html 2013-07-21 07:10:19.000000000 +0400 | |
@@ -10,12 +10,12 @@ | |
<body> | |
<div id="version_info"> | |
- <div class="div_version_info_cont"> | |
+ <div class="div_version_info_cont" data-bind="click: hideSettings"> | |
<span>ALPHA v.<span data-bind="text: buildVersion"></span></span> | |
</div> | |
</div> | |
-<div class="div_body_cont" style="width:400px; border-radius:4px; border-width:1px; margin-left:20px;"> | |
+<div id="settings_panel" class="div_body_cont" style="width:400px; border-radius:4px; border-width:1px; margin-left:20px;"> | |
<div class="div_back_btn" data-bind="click: navBack"> | |
<a href="#">BACK</a> | |
</div> | |
diff -ruN PA/media/ui/alpha/system_editor/system_editor.js PA_MODDED/media/ui/alpha/system_editor/system_editor.js | |
--- PA/media/ui/alpha/system_editor/system_editor.js 2013-07-15 20:14:39.000000000 +0400 | |
+++ PA_MODDED/media/ui/alpha/system_editor/system_editor.js 2013-07-21 08:16:34.767995439 +0400 | |
@@ -30,6 +30,14 @@ | |
console.log('lastSceneUrl invalid'); | |
} | |
}; | |
+ | |
+ self.hideSettings = function() { | |
+ var div = document.getElementById('settings_panel'); | |
+ if (div.style.display === 'block' || div.style.display === '') | |
+ div.style.display = 'none'; | |
+ else | |
+ div.style.display = 'block' | |
+ } | |
self.blueprint = function () { | |
var bp = {}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment