diff --git a/README.md b/README.md index 1a02255..483c6a4 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ To be decided, but at this moment this code is open source and free to use for n ## Changelog +### 0.2.7 +* Added welcome screen window + ### 0.2.6 * Added background grid * Logic elements now have proper logic shapes diff --git a/css/main.css b/css/main.css index 0ab2016..14e8242 100644 --- a/css/main.css +++ b/css/main.css @@ -283,6 +283,56 @@ textarea { font-size: 2em; } +#darkout-overlay { + position: absolute; + left: 0px; + top: 0px; + right: 0px; + bottom: 0px; + background-color: rgba(0,0,0,0.5); +} + +#WelcomeWindow { + padding: 0px; + position: absolute; + top: 100px; + left: 100px; + right: 100px; + background-color: rgba(120,120,120,1); + text-align: center; + z-index: 999; + border: 3px solid black; + font-size: 1.5em; +} + +#WelcomeWindow h2 { + background-color: rgba(40,40,40,1); + margin-top: 0px; + padding: 10px; +} + +#WelcomeWindow p { + padding: 10px; + text-align: justify; +} + +#WelcomeWindow a:link { + color: #0000ff; + text-decoration: none; +} +#WelcomeWindow a:visited { + color: #00cccc; + text-decoration: none; +} + +#WelcomeWindow a:hover, #WelcomeWindow a:active { + color: #00ffff; + text-decoration: underline; +} + +#WelcomeWindow label { + font-size: 0.5em; +} #PropertiesBox { display: none; position: absolute; diff --git a/index.html b/index.html index 5266376..65001e0 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,12 @@ - +
+

MatCat BrowserLogic Engine

+

Welcome to logic.parts, a free to use logic simulator for anyone to use. This is opensource software, you can find the project at https://www.mygit.space/MatCat.OpenSource/BrowserLogic. This is an early development project, so expect bugs and some things to not work :) If you would like to contribute please feel free to find me on IRC on Freenode in channel #LogicParts.

+
+ +
MatCat BrowserLogic @@ -52,6 +57,7 @@ Content
+
diff --git a/js/logicengine.js b/js/logicengine.js index 0db661c..3a3f687 100644 --- a/js/logicengine.js +++ b/js/logicengine.js @@ -1,6 +1,32 @@ /* First a few needed global functions */ + +function setCookie(cname, cvalue, exdays) { + let d = new Date(); + d.setTime(d.getTime() + (exdays*24*60*60*1000)); + let expires = "expires="+ d.toUTCString(); + document.cookie = cname + '="' + cvalue + '";' + expires; + localStorage.setItem(cname,cvalue); +} + +function getCookie(cname) { + let name = cname + "="; + let decodedCookie = decodeURIComponent(document.cookie); + let ca = decodedCookie.split(';'); + for(var i = 0; i