Commit 90409b1627c4d081bd157a4793107f2a3b3e359e

Authored by Lars Jørgen Fredheim
1 parent c38fb06d

Merged

Showing 4 changed files with 56 additions and 46 deletions   Show diff stats
css/style.css
... ... @@ -794,6 +794,7 @@ ul li {
794 794 height: 115px;
795 795 width: 500px;
796 796 position: fixed;
  797 + z-index: 15;
797 798 top: 5px;
798 799 left: calc(50% - 250px);
799 800 background-color: white;
... ... @@ -813,4 +814,41 @@ ul li {
813 814 #autoGenSuggestions {
814 815 font-size: 1em;
815 816 margin: 0;
816   -}
817 817 \ No newline at end of file
  818 +}
  819 +
  820 +/************************************************/
  821 +/***************** Overlay **********************/
  822 +
  823 +.info {
  824 + position: fixed;
  825 + z-index: 30;
  826 + width: 100%;
  827 + height: 100%;
  828 + left: 0;
  829 + top: 0;
  830 + background-color: rgba(0, 0, 0, 0.8);
  831 +}
  832 +
  833 +.infotext {
  834 + position: absolute;
  835 + top: 50%;
  836 + left: 35%;
  837 + font-size: 50px;
  838 + color: white;
  839 +}
  840 +
  841 +.close-info {
  842 + position: absolute;
  843 + top: 20px;
  844 + right: 40px;
  845 + font-size: 3em;
  846 + color: white;
  847 + cursor: pointer;
  848 +}
  849 +
  850 +.btNextTip {
  851 + position: absolute;
  852 + right: 50px;
  853 + top: 50%;
  854 + width: 100px;
  855 +}
... ...
index.html
... ... @@ -463,36 +463,12 @@
463 463 </div>
464 464 </div>
465 465  
466   - <!--<div id="autoGenPoleSelect">
467   - <div id="autoGenPoleSelectHeader">Velg stolpe</div>
468   - <div class="autoGenPoleRow">
469   - <input class="autoGenPoleButton" type="image" src="images/menu_pole_180.png" title="180&#176; Stolpe" onclick="onAutoGenPoleSelected('180')" ondragstart="return false;" />
470   - <input class="autoGenPoleButton" type="image" src="images/menu_pole_90.png" title="90&#176; Stolpe" onclick="onAutoGenPoleSelected('90')" ondragstart="return false;" />
471   - <input class="autoGenPoleButton" type="image" src="images/menu_pole_45.png" title="45&#176; Stolpe" onclick="onAutoGenPoleSelected('45')" ondragstart="return false;" />
472   - </div>
473   - <div class="autoGenPoleRow">
474   - <input class="autoGenPoleButton" type="image" src="images/menu_pole_end.png" title="Endestolpe" onclick="onAutoGenPoleSelected('end')" ondragstart="return false;" />
475   - <input class="autoGenPoleButton" type="image" src="images/menu_pole_wall.png" title="Veggfeste" onclick="onAutoGenPoleSelected('wall')" ondragstart="return false;" />
476   - </div>
477   - </div>-->
478   -
479   - <!--<div id="autoGenSuggestions" onclick="document.getElementById('autoGenSuggestions').style.display = 'none'">
480   - <div id="autoGenSuggestionsHeader">Forslag:</div>
481   - <div id="suggestionsTableDiv">
482   - <table id="suggestionsTable">
483   - <thead>
484   - <tr>
485   - <th>Moduler</th>
486   - <th>Pris</th>
487   - <th>Lengde</th>
488   - </tr>
489   - </thead>
490   - <tbody id="suggestionsTableBody">
491   -
492   - </tbody>
493   - </table>
494   - </div>
495   - </div>-->
  466 + <div class="info hide" id="info">
  467 + <p class="infotext" id="info1">This is an overlay</p>
  468 + <p class="infotext hide" id="info2">This is another overlay</p>
  469 + <span class="close-info" onclick="closeInfo()">&times;</span>
  470 + <input class="btNextTip" id="btNextTip" type="image" src="images/icons/next.png" onclick="nextTip()"/>
  471 + </div>
496 472 </div>
497 473  
498 474 <!-- jQuery -->
... ...
js/HTMLGUI.js
... ... @@ -223,6 +223,7 @@ function startAutoGeneration() {
223 223 isAutoGen = true;
224 224 document.getElementById("poleMenu").style.display = "none";
225 225 document.getElementById("moduleMenu").style.display = "none";
  226 + document.getElementById("moduleMenuToggleButton").style.display = "none";
226 227 document.getElementById("autoGenInfo").style.display = "block";
227 228 }
228 229 }
... ... @@ -235,6 +236,7 @@ function cancelAutoGen() {
235 236 meshControls.hide();
236 237 document.getElementById("poleMenu").style.display = "block";
237 238 document.getElementById("moduleMenu").style.display = "block";
  239 + document.getElementById("moduleMenuToggleButton").style.display = "inline";
238 240 document.getElementById("autoGenInfo").style.display = "none";
239 241 document.getElementById("autoGenInfo").style.height = "115px";
240 242 document.getElementById("autoGenInfo").style.width = "500px";
... ... @@ -304,7 +306,6 @@ function onAutoGenFinished() {
304 306 document.getElementById("autoGenInfo").style.height = "515px";
305 307 document.getElementById("autoGenInfo").style.left = "calc(50% - 325px)";
306 308 document.getElementById("autoGenFinishButton").style.display = "none";
307   - document.getElementById("autoGenCancelButton").style.display = "none";
308 309 var length = BABYLON.Vector3.Distance(autoGenStartHolder.absolutePosition, autoGenEndPole.absolutePosition);
309 310 console.log("----------------------");
310 311 console.log("autoGenLength: " + length);
... ... @@ -312,12 +313,6 @@ function onAutoGenFinished() {
312 313 displaySolutions(findSolutions(length));
313 314 }
314 315  
315   -function onAutoGenCancelled() {
316   - document.getElementById("autoGenFinishButton").style.display = "none";
317   - document.getElementById("autoGenCancelButton").style.display = "none";
318   -
319   -}
320   -
321 316 function displayInfo() {
322 317 document.getElementById("info").style.display = "inline";
323 318 }
... ...
js/app.js
... ... @@ -69,7 +69,13 @@ function main() {
69 69 camera = new CameraController();
70 70 camera.perspectiveMode();
71 71  
72   - initButtons();
  72 + materialProvider = new MaterialProvider();
  73 + poleProvider = new PoleProvider();
  74 + poleProvider.loadModels();
  75 + glassProvider = new GlassProvider();
  76 + meshControls = new MeshControls();
  77 +
  78 + //initButtons();
73 79  
74 80 window.addEventListener("resize", resize);
75 81  
... ... @@ -133,12 +139,7 @@ function main() {
133 139 }
134 140  
135 141 function initCanvas() {
136   - materialProvider = new MaterialProvider();
137   - poleProvider = new PoleProvider();
138   - poleProvider.loadModels();
139   - glassProvider = new GlassProvider();
140 142 terrace = new Terrace();
141   - meshControls = new MeshControls();
142 143 }
143 144  
144 145 function resize() {
... ... @@ -456,7 +457,7 @@ function addEverything() {
456 457 this.addToCart(glassTypes[i]);
457 458 }
458 459  
459   -function initButtons() {
  460 +/*function initButtons() {
460 461 layout = document.getElementById("layout");
461 462 measurements = document.getElementById("measurements");
462 463 var previewImg = document.getElementById("layoutPreview");
... ... @@ -500,7 +501,7 @@ function initButtons() {
500 501 previewImg.src = "images/terrace_triangle_labeled.png";
501 502 initLayoutMeasurements();
502 503 };
503   -}
  504 +}*/
504 505  
505 506 function initLayoutMeasurements() {
506 507 layout.style.display = "none";
... ...