forked from Simnation/Main
ed
This commit is contained in:
parent
032ec698d8
commit
1010f8fc79
49 changed files with 5818 additions and 0 deletions
|
@ -0,0 +1,128 @@
|
|||
body {
|
||||
background-color: transparent;
|
||||
color: white;
|
||||
overflow: hidden;
|
||||
font-size: 1vw;
|
||||
user-select: none;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
#app-main {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: none;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
margin-bottom: 2.5vw;
|
||||
margin-right: 2.5vw;
|
||||
}
|
||||
|
||||
.container > div {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
margin-bottom: 1vw;
|
||||
}
|
||||
|
||||
.container > div {
|
||||
text-shadow: black 1px 1px;
|
||||
}
|
||||
|
||||
.key {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-self: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 2.25vw;
|
||||
height: 2.25vw;
|
||||
color: black;
|
||||
font-size: 0.8vw;
|
||||
font-weight: bold;
|
||||
margin-right: 0.5vw;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.secondary {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.secondary > div:nth-child(1) {
|
||||
font-size: 0.85vw;
|
||||
}
|
||||
|
||||
.secondary > div:nth-child(2) {
|
||||
font-size: 0.65vw;
|
||||
}
|
||||
|
||||
|
||||
.key .icon {
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
.key .circle {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(234, 0, 255, 0.1);
|
||||
border-radius: 100%;
|
||||
}
|
||||
.key .circle:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: calc(50% + 0.0vw);
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: calc(100% - 0.2vw);
|
||||
height: calc(100% - 0.2vw);
|
||||
border-radius: 100%;
|
||||
background: white;
|
||||
}
|
||||
.key .circle span {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.key .circle span:first-child {
|
||||
left: 0%;
|
||||
}
|
||||
.key .circle span:first-child em {
|
||||
left: 100%;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
transform-origin: 0% 50%;
|
||||
}
|
||||
.key .circle span:last-child {
|
||||
left: 50%;
|
||||
}
|
||||
.key .circle span em {
|
||||
position: absolute;
|
||||
border-radius: 999px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background:black;
|
||||
transition: transform 500ms linear;
|
||||
}
|
||||
.key .circle span:last-child em {
|
||||
left: -100%;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
transform-origin: 100% 50%;
|
||||
transition-delay: 500ms;
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
var holdTime;
|
||||
|
||||
function DisplayApp(data) {
|
||||
$("#interact > .secondary").html(`
|
||||
<div>Use Item (${data.quantity})</div>
|
||||
<div>Options (Tap)</div>
|
||||
`)
|
||||
$("#app-main").fadeIn(500);
|
||||
holdTime = data.time;
|
||||
$(".key .circle span em").css("transition", "transform "+Math.ceil(holdTime/2)+"ms linear;");
|
||||
$(".key .circle span:last-child em").css("transition-delay", Math.ceil(holdTime/2)+"ms;");
|
||||
}
|
||||
|
||||
function HideApp() {
|
||||
$("#app-main").fadeOut(500);
|
||||
}
|
||||
|
||||
function HoldInteract(bool) {
|
||||
if (bool) {
|
||||
$("#interact > .key").addClass("holding");
|
||||
$("#interact > .key .circle span:first-child em").css({
|
||||
"transform": "rotate(-180deg)",
|
||||
"transition": "transform "+Math.ceil(holdTime)+"ms ease-out",
|
||||
"transitionDelay": Math.ceil(holdTime/2)+"ms",
|
||||
});
|
||||
$("#interact > .key .circle span:last-child em").css({
|
||||
"transform": "rotate(-180deg)",
|
||||
"transition": "transform "+ Math.ceil(holdTime/2) +"ms linear",
|
||||
"transitionDelay": "0ms",
|
||||
});
|
||||
}
|
||||
else {
|
||||
$("#interact > .key").removeClass("holding");
|
||||
$("#interact > .key .circle span:first-child em").css({
|
||||
"transform": "rotate(0deg)",
|
||||
"transition": "transform 0ms",
|
||||
"transitionDelay": "0ms",
|
||||
});
|
||||
$("#interact > .key .circle span:last-child em").css({
|
||||
"transform": "rotate(0deg)",
|
||||
"transition": "transform 0ms linear",
|
||||
"transitionDelay": "0ms",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener('message', function(ev) {
|
||||
if (ev.data.type == "displayApp") {
|
||||
DisplayApp(ev.data.data);
|
||||
}
|
||||
else if (ev.data.type == "hideApp") {
|
||||
HideApp();
|
||||
}
|
||||
else if (ev.data.type == "holdInteract") {
|
||||
HoldInteract(ev.data.bool)
|
||||
}
|
||||
})
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.key').each(function () {
|
||||
$(this).html('<span class="icon">' + $(this).html() + '</span><span class="circle"><span><em></em></span><span><em></em></span></span>');
|
||||
});
|
||||
})
|
24
resources/[inventory]/pickle_consumables/nui/index.html
Normal file
24
resources/[inventory]/pickle_consumables/nui/index.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Pickle's Consumables</title>
|
||||
<script src="https://code.jquery.com/jquery-3.6.3.min.js" integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
|
||||
<script src="assets/js/main.js"></script>
|
||||
<link rel="stylesheet" href="assets/css/style.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app-main">
|
||||
<div class="container">
|
||||
<div id="exit"><div class="key">R</div>Store Item</div>
|
||||
<div id="interact">
|
||||
<div class="key">E</div>
|
||||
<div class="secondary">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue