Removed confirm escape

This commit is contained in:
ElPumpo
2018-11-04 12:32:28 +01:00
parent 321c11c3dd
commit 2bad03e88a
8 changed files with 7 additions and 41 deletions
+7 -20
View File
@@ -65,7 +65,7 @@ function OpenMenu(submitCb, cancelCb, restrict)
local componentId = _components[i].componentId local componentId = _components[i].componentId
if componentId == 0 then if componentId == 0 then
value = GetPedPropIndex(playerPed, _components[i].componentId) value = GetPedPropIndex(playerPed, _components[i].componentId)
end end
local data = { local data = {
@@ -94,11 +94,10 @@ function OpenMenu(submitCb, cancelCb, restrict)
camOffset = _components[1].camOffset camOffset = _components[1].camOffset
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'skin', { ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'skin', {
title = _U('skin_menu'), title = _U('skin_menu'),
align = 'top-left', align = 'top-left',
elements = elements elements = elements
}, function(data, menu) }, function(data, menu)
TriggerEvent('skinchanger:getSkin', function(skin) TriggerEvent('skinchanger:getSkin', function(skin)
LastSkin = skin LastSkin = skin
end) end)
@@ -106,22 +105,9 @@ function OpenMenu(submitCb, cancelCb, restrict)
submitCb(data, menu) submitCb(data, menu)
DeleteSkinCam() DeleteSkinCam()
end, function(data, menu) end, function(data, menu)
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'confirm_escape', { menu.close()
title = _U('confirm_escape'), DeleteSkinCam()
align = 'top-left', TriggerEvent('skinchanger:loadSkin', LastSkin)
elements = {
{label = _U('no'), value = 'no'},
{label = _U('yes'), value = 'yes'}
}
}, function(data2, menu2)
if data2.current.value == 'yes' then
menu.close()
DeleteSkinCam()
TriggerEvent('skinchanger:loadSkin', LastSkin)
end
menu2.close()
end)
if cancelCb ~= nil then if cancelCb ~= nil then
cancelCb(data, menu) cancelCb(data, menu)
@@ -272,6 +258,7 @@ function OpenSaveableMenu(submitCb, cancelCb, restrict)
TriggerEvent('skinchanger:getSkin', function(skin) TriggerEvent('skinchanger:getSkin', function(skin)
TriggerServerEvent('esx_skin:save', skin) TriggerServerEvent('esx_skin:save', skin)
if submitCb ~= nil then if submitCb ~= nil then
submitCb(data, menu) submitCb(data, menu)
end end
-3
View File
@@ -3,7 +3,4 @@ Locales['br'] = {
['use_rotate_view'] = 'Use ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ e ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ para girar a visão.', ['use_rotate_view'] = 'Use ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ e ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ para girar a visão.',
['skin'] = 'Trocar', ['skin'] = 'Trocar',
['saveskin'] = 'Salvar', ['saveskin'] = 'Salvar',
['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.',
['no'] = 'no',
['yes'] = 'yes',
} }
-3
View File
@@ -3,7 +3,4 @@ Locales['de'] = {
['use_rotate_view'] = 'benutze ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ und ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ um die Sicht zu drehen.', ['use_rotate_view'] = 'benutze ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ und ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ um die Sicht zu drehen.',
['skin'] = 'Skin ändern', ['skin'] = 'Skin ändern',
['saveskin'] = 'Skin speichern', ['saveskin'] = 'Skin speichern',
['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.',
['no'] = 'no',
['yes'] = 'yes',
} }
-3
View File
@@ -3,7 +3,4 @@ Locales['en'] = {
['use_rotate_view'] = 'use ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ and ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ to rotate the view.', ['use_rotate_view'] = 'use ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ and ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ to rotate the view.',
['skin'] = 'change skin', ['skin'] = 'change skin',
['saveskin'] = 'save skin to a file', ['saveskin'] = 'save skin to a file',
['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.',
['no'] = 'no',
['yes'] = 'yes',
} }
-3
View File
@@ -3,7 +3,4 @@ Locales['fi'] = {
['use_rotate_view'] = 'paina ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ tai ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ liikutaaksesi kameraa.', ['use_rotate_view'] = 'paina ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ tai ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ liikutaaksesi kameraa.',
['skin'] = 'vaihda ulkonäköä', ['skin'] = 'vaihda ulkonäköä',
['saveskin'] = 'talleta ulkonäkö tiedostoon', ['saveskin'] = 'talleta ulkonäkö tiedostoon',
['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.',
['no'] = 'no',
['yes'] = 'yes',
} }
-3
View File
@@ -3,7 +3,4 @@ Locales['fr'] = {
['use_rotate_view'] = 'utilisez ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ et ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ pour tourner la vue.', ['use_rotate_view'] = 'utilisez ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ et ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ pour tourner la vue.',
['skin'] = 'changer de skin', ['skin'] = 'changer de skin',
['saveskin'] = 'sauvegarder skin dans un fichier', ['saveskin'] = 'sauvegarder skin dans un fichier',
['confirm_escape'] = 'do you want to cancel the skin changer? All changes go unsaved.',
['no'] = 'no',
['yes'] = 'yes',
} }
-3
View File
@@ -3,7 +3,4 @@ Locales['pl'] = {
['use_rotate_view'] = 'użyj ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ i ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ aby obrócić ekran.', ['use_rotate_view'] = 'użyj ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ i ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ aby obrócić ekran.',
['skin'] = 'zmien wygląd', ['skin'] = 'zmien wygląd',
['saveskin'] = 'zapisz wygląd do pliku', ['saveskin'] = 'zapisz wygląd do pliku',
['confirm_escape'] = 'czy chcesz anulować zmianę wyglądu? Wszystkie zmiany zostaną utracone.',
['no'] = 'nie',
['yes'] = 'tak',
} }
-3
View File
@@ -3,7 +3,4 @@ Locales['sv'] = {
['use_rotate_view'] = 'använd ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ och ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ för att rotera.', ['use_rotate_view'] = 'använd ~INPUT_VEH_FLY_ROLL_LEFT_ONLY~ och ~INPUT_VEH_FLY_ROLL_RIGHT_ONLY~ för att rotera.',
['skin'] = 'ändra skin', ['skin'] = 'ändra skin',
['saveskin'] = 'spara skin till fil', ['saveskin'] = 'spara skin till fil',
['confirm_escape'] = 'vill du avbryta menyn? Alla ändringar går osparade.',
['no'] = 'nej',
['yes'] = 'ja',
} }