Skip to content

Commit

Permalink
UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Byson94 committed Sep 19, 2024
1 parent 4eab071 commit a21b965
Show file tree
Hide file tree
Showing 10 changed files with 243 additions and 386 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build_files/JavaScript/Engine/engineFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,4 +290,4 @@ document.addEventListener('DOMContentLoaded', () => {
}
});
}
});
});
68 changes: 1 addition & 67 deletions build_files/html/Engine/BlockyEditor.html
Original file line number Diff line number Diff line change
@@ -1,67 +1 @@
<!--
This file uses the library "Blockly" developed by Google
More detials can be found on "LiteForge-Evo/Third-party libraries/Blocky LICENSE"
-->

<!--
This file is made to test blocky out (not used in the engine)
-->

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blockly Visual Editor</title>
<script src="../../../libraries/blockly/blockly.min.js"></script>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #f4f4f4;
overflow: hidden;
box-sizing: border-box;
}

#blocklyDiv {
height: 100vh; /* Full viewport height */
width: 100vw; /* Full viewport width */
border: 2px solid #ddd;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
background-color: #fff;
position: absolute; /* Ensure it takes full space */
top: 0;
left: 0;
box-sizing: border-box;
line-height: 1.2;
}
</style>
</head>
<body>
<div id="blocklyDiv"></div>
<script>
window.onload = function() {
var workspace = Blockly.inject('blocklyDiv', {
toolbox: '<xml id="toolbox" style="display: none">' +
' <block type="controls_if"></block>' +
' <block type="logic_compare"></block>' +
' <block type="logic_operation"></block>' +
' <block type="logic_negate"></block>' +
' <block type="math_number"></block>' +
' <block type="math_arithmetic"></block>' +
'</xml>',
grid: {
spacing: 20,
length: 3,
colour: '#ccc',
snap: true
},
scrollbars: true,
trashcan: false
});
};
</script>
</body>
</html>
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Blockly Visual Editor</title><link rel="icon" href="../../../icon/LFE_logo.png" type="image/png"><script src="../../../libraries/blockly/blockly.min.js"></script><style>body,html{height:100%;margin:0;padding:0;font-family:Arial,sans-serif;background-color:#f4f4f4;overflow:hidden;box-sizing:border-box}#blocklyDiv{height:100vh;width:100vw;border:2px solid #ddd;box-shadow:0 4px 8px rgba(0,0,0,.1);background-color:#fff;position:absolute;top:0;left:0;box-sizing:border-box;line-height:1.2}</style></head><body><div id="blocklyDiv"></div><script>window.onload=function(){Blockly.inject("blocklyDiv",{toolbox:'<xml id="toolbox" style="display: none"> <block type="controls_if"></block> <block type="logic_compare"></block> <block type="logic_operation"></block> <block type="logic_negate"></block> <block type="math_number"></block> <block type="math_arithmetic"></block></xml>',grid:{spacing:20,length:3,colour:"#ccc",snap:!0},scrollbars:!0,trashcan:!1})}</script></body></html>
4 changes: 4 additions & 0 deletions build_files/html/Engine/Engine.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LiteForge Evo</title>
<link rel="icon" href="../../../icon/LFE_logo.png" type="image/png">
<link rel="stylesheet" href="../../css/styles.css">
<link rel="stylesheet" href="../../css/EngineUI.css">

Expand All @@ -20,6 +21,9 @@

// For storing selected sprites
let selectedId = null;

// For storing sprite frames
let engineState;
</script>

<!-- CodeMirror CSS -->
Expand Down
Loading

0 comments on commit a21b965

Please sign in to comment.