Skip to content

Commit

Permalink
chore: (esx-radialmenu) 🎨 Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Apr 10, 2024
1 parent cd0f821 commit bcbe7ed
Show file tree
Hide file tree
Showing 13 changed files with 2,287 additions and 1,942 deletions.
257 changes: 166 additions & 91 deletions server-data/resources/[esx_addons]/esx-radialmenu/client/clothing.lua

Large diffs are not rendered by default.

634 changes: 327 additions & 307 deletions server-data/resources/[esx_addons]/esx-radialmenu/client/main.lua

Large diffs are not rendered by default.

699 changes: 403 additions & 296 deletions server-data/resources/[esx_addons]/esx-radialmenu/client/stretcher.lua

Large diffs are not rendered by default.

519 changes: 276 additions & 243 deletions server-data/resources/[esx_addons]/esx-radialmenu/client/trunk.lua

Large diffs are not rendered by default.

1,820 changes: 961 additions & 859 deletions server-data/resources/[esx_addons]/esx-radialmenu/config.lua

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions server-data/resources/[esx_addons]/esx-radialmenu/fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
fx_version 'cerulean'
game 'gta5'
lua54 'yes'
description 'esx-radialmenu'
version '1.0.0'
fx_version("cerulean")
game("gta5")
lua54("yes")
description("esx-radialmenu")
version("1.0.0")

ui_page 'html/index.html'
ui_page("html/index.html")

shared_scripts {
'@es_extended/imports.lua',
'config.lua',
}
shared_scripts({
"@es_extended/imports.lua",
"config.lua",
})

client_scripts {
'locales/*.lua',
'client/*.lua',
}
client_scripts({
"locales/*.lua",
"client/*.lua",
})

server_scripts {
'locales/*.lua',
'server/*.lua',
}
server_scripts({
"locales/*.lua",
"server/*.lua",
})

files {
'html/index.html',
'html/css/main.css',
'html/js/main.js',
'html/js/RadialMenu.js',
}
files({
"html/index.html",
"html/css/main.css",
"html/js/main.js",
"html/js/RadialMenu.js",
})
22 changes: 11 additions & 11 deletions server-data/resources/[esx_addons]/esx-radialmenu/html/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ div.info * {

#icons {
display: none;
filter:url(#drop-shadow);
filter: url(#drop-shadow);
}

.container {
Expand Down Expand Up @@ -61,16 +61,16 @@ svg.menu.outer {
visibility: hidden;
}

svg.menu > g > path {
svg.menu>g>path {
fill: rgb(23 23 23 / 80%);
}

svg.menu > g.sector > path {
svg.menu>g.sector>path {
cursor: pointer;
}

svg.menu > g.sector > text,
svg.menu > g.sector > use {
svg.menu>g.sector>text,
svg.menu>g.sector>use {
font-family: 'Poppins', sans-serif;
margin-top: 5px;
font-size: 2.8px;
Expand All @@ -80,22 +80,22 @@ svg.menu > g.sector > use {
fill: white;
}

svg.menu > g.sector:hover > path {
svg.menu>g.sector:hover>path {
fill: #0091ff;

}

svg.menu > g.center:hover > circle {
fill:#0091ff;
svg.menu>g.center:hover>circle {
fill: #0091ff;
}

svg.menu > g.center > circle {
svg.menu>g.center>circle {
cursor: pointer;
fill: rgb(23 23 23 / 80%);
}

svg.menu > g.center > text,
svg.menu > g.center > use {
svg.menu>g.center>text,
svg.menu>g.center>use {
margin-top: 5px;
font-size: 2.5px;
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<title>Radial Menu</title>
<link rel="stylesheet" href="css/main.css">
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.13.0/jquery-ui.min.js" integrity="sha256-hlKLmzaRlE8SCJC1Kw8zoUbU8BxA+8kR3gseuKfMjxA=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.13.0/jquery-ui.min.js"
integrity="sha256-hlKLmzaRlE8SCJC1Kw8zoUbU8BxA+8kR3gseuKfMjxA=" crossorigin="anonymous"></script>
</head>

<body>
<script src="js/RadialMenu.js"></script>
<script src="js/main.js"></script>
</body>

</html>

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

38 changes: 19 additions & 19 deletions server-data/resources/[esx_addons]/esx-radialmenu/html/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
var ESXRadialMenu = null;
var toggleConfig = false;
var keybindConfig = false;
$(document).ready(function(){
window.addEventListener('message', function(event){
$(document).ready(function () {
window.addEventListener('message', function (event) {
switch (event.data.action) {
case "ui":
toggleConfig = event.data.toggle;
Expand All @@ -15,34 +15,34 @@ $(document).ready(function(){
} else {
ESXRadialMenu.close(true);
}
if (toggleConfig === false){
$(document).on('keyup', function(e) {
if(e.key == keybindConfig | e.key === keybindConfig.toLowerCase()){
ESXRadialMenu.close();
}
});
} else {
$(document).on('keydown', function(e) {
switch(e.key) {
if (toggleConfig === false) {
$(document).on('keyup', function (e) {
if (e.key == keybindConfig | e.key === keybindConfig.toLowerCase()) {
ESXRadialMenu.close();
}
});
} else {
$(document).on('keydown', function (e) {
switch (e.key) {
case keybindConfig:
ESXRadialMenu.close();
break;
}
});
}
}
}
});
});
function createMenu(items) {
ESXRadialMenu = new RadialMenu({
parent : document.body,
size : 375,
menuItems : items,
onClick : function(item) {
parent: document.body,
size: 375,
menuItems: items,
onClick: function (item) {
if (item.shouldClose) {
ESXRadialMenu.close(true);
}

if (item.items == null && item.shouldClose != null) {
$.post('https://esx-radialmenu/selectItem', JSON.stringify({
itemData: item
Expand All @@ -53,8 +53,8 @@ function createMenu(items) {
}

// Close on escape pressed
$(document).on('keydown', function(e) {
switch(e.key) {
$(document).on('keydown', function (e) {
switch (e.key) {
case "Escape":
ESXRadialMenu.close();
break;
Expand Down
Loading

0 comments on commit bcbe7ed

Please sign in to comment.