Skip to content

Commit

Permalink
chore: esx_menu_list update to version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Jan 17, 2024
1 parent 464c21c commit e1937d2
Show file tree
Hide file tree
Showing 8 changed files with 593 additions and 258 deletions.
4 changes: 2 additions & 2 deletions server-data/resources/[esx]/esx_menu_list/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

esx_menu_list
Copyright (C) 2015-2022 Jérémie N'gadi
Copyright (C) 2015-2024 Jérémie N'gadi

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

esx_menu_list Copyright (C) 2015-2022 Jérémie N'gadi
esx_menu_list Copyright (C) 2015-2024 Jérémie N'gadi
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand Down
2 changes: 1 addition & 1 deletion server-data/resources/[esx]/esx_menu_list/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ start esx_menu_list
### License
esx_menu_list - advanced menu inputs for ESX

Copyright (C) 2015-2022 Jérémie N'gadi
Copyright (C) 2015-2024 Jérémie N'gadi

This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.

Expand Down
14 changes: 6 additions & 8 deletions server-data/resources/[esx]/esx_menu_list/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ CreateThread(function()
local OpenedMenus = {}

local function openMenu(namespace, name, data)

OpenedMenus[namespace .. '_' .. name] = true

SendNUIMessage({
Expand All @@ -12,11 +11,12 @@ CreateThread(function()
name = name,
data = data
})
SetNuiFocus(true, true)
SetTimeout(200, function()
SetNuiFocus(true, true)
end)
end

local function closeMenu(namespace, name)

OpenedMenus[namespace .. '_' .. name] = nil
local OpenedMenuCount = 0

Expand All @@ -26,16 +26,15 @@ CreateThread(function()
name = name,
})

for _,v in pairs(OpenedMenus) do
if v == true then
for _, v in pairs(OpenedMenus) do
if v then
OpenedMenuCount = OpenedMenuCount + 1
end
end

if OpenedMenuCount == 0 then
SetNuiFocus(false)
end

end

ESX.UI.Menu.RegisterType(MenuType, openMenu, closeMenu)
Expand All @@ -57,5 +56,4 @@ CreateThread(function()

cb('OK')
end)

end)
end)
9 changes: 3 additions & 6 deletions server-data/resources/[esx]/esx_menu_list/fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
fx_version 'adamant'

game 'gta5'

description 'ESX Menu List'
lua54 'yes'
version '1.7.5'
version '1.0.0'


client_scripts {
'@es_extended/imports.lua',
Expand All @@ -16,14 +16,11 @@ ui_page 'html/ui.html'

files {
'html/ui.html',

'html/css/app.css',

'html/js/mustache.min.js',
'html/js/app.js',

'html/fonts/pdown.ttf',
'html/fonts/bankgothic.ttf'
}

dependency 'es_extended'
dependency 'es_extended'
65 changes: 32 additions & 33 deletions server-data/resources/[esx]/esx_menu_list/html/css/app.css
Original file line number Diff line number Diff line change
@@ -1,56 +1,55 @@
@font-face {
font-family: bankgothic;
src: url('../fonts/bankgothic.ttf');
font-family: bankgothic;
src: url("../fonts/bankgothic.ttf");
}

@font-face {
font-family: pcdown;
src: url('../fonts/pdown.ttf');
font-family: pcdown;
src: url("../fonts/pdown.ttf");
}

.menu {
font-family: bankgothic;
position: absolute;
left: 50%;
top: 40%;
transform: translate(-50%, -50%);
overflow-y: auto;
max-height: 90%;
font-family: bankgothic;
position: absolute;
left: 50%;
top: 40%;
transform: translate(-50%, -50%);
overflow-y: auto;
max-height: 90%;
}

.menu button {
font-family: bankgothic;
font-family: bankgothic;
}

.menu>table {
border-collapse: separate;
border-spacing: 0 5px;
min-width: 400px;
background: rgba(33, 33, 33, 0.0);
.menu > table {
border-collapse: separate;
border-spacing: 0 5px;
min-width: 400px;
background: rgba(33, 33, 33, 0);
}

.menu>table>thead {
background: rgba(10, 10, 10, 0.9);
text-align: center;
height: 20px;
line-height: 20px;
margin-bottom: 20px;
color: #fff;
.menu > table > thead {
background: rgba(10, 10, 10, 0.9);
text-align: center;
height: 20px;
line-height: 20px;
margin-bottom: 20px;
color: #fff;
}

.menu td {

text-align: center;
padding: 8px;
margin: 20px;
text-align: center;
padding: 8px;
margin: 20px;
}

.menu tbody tr:nth-child(even) {
color: #fff;
background: rgba(40, 40, 40, 0.8);
color: #fff;
background: rgba(40, 40, 40, 0.8);
}

.menu tbody tr:nth-child(odd) {
color: #fff;
background: rgba(40, 40, 40, 0.8);
}
color: #fff;
background: rgba(40, 40, 40, 0.8);
}
Loading

0 comments on commit e1937d2

Please sign in to comment.