Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@
How to Copy <img class="imgInSelectionExplanation" src="img/selectionBright.png"></img> Selection: <b>hold down</b> <span>alt</span> and <b>drag</b> the selected area.
</label>
<div id="cursor-coords-display"></div>
<div id="keyboard-shortcut-hover" onmouseover="Display_Keyboard_Shortcuts()" onmouseleave="Hide_Keyboard_Shortcuts()">Shortcuts</div>
</div>
<div id="info-section">
<table id="keyboard-shortcuts">
<tr><td>Copy Selection</td><td>Alt + Click Drag</td></tr>
<tr><td>Delete Selection</td><td>Del or Backspace</td></tr>
<tr><td>Remove Selection</td><td>Esc</td></tr>
</table>
</div>
</body>
<script type="text/javascript" src="js/tools.js"></script>
Expand Down
12 changes: 12 additions & 0 deletions js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,15 @@ function Get_Canvas_Pixels()
})
return canvasPixels;
}

function Display_Keyboard_Shortcuts()
{
document.getElementById("info-section").style.opacity = "1";
document.getElementById("info-section").style.backgroundColor = "#2a2a2a";
}

function Hide_Keyboard_Shortcuts()
{
document.getElementById("info-section").style.opacity = "0";
document.getElementById("info-section").style.backgroundColor = "none";
}
29 changes: 29 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,32 @@ body {
input[type="radio"] {
margin: 0;
}

#info-section {
position: fixed;
top: 80%;
right: 1%;
z-index: 1000;
opacity: 0;
background-color: none;
transition: background-color .2s ease;
}

#keyboard-shortcut-hover {
position: fixed;
right: 0%;
top: 99%;

background-color: #e9e9a2;
padding: 0 4px;
border-radius: 2px 0 0 0;
color: #0d0c09;
user-select: none;
}

#keyboard-shortcuts {
border: 1px solid;
width: 350px;
transition: opacity .2s ease;
}