You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.4 KiB
Plaintext

-- VR4Life Startup - Nomes de Arquivo Originais
global LoadVR4LifeMNX
fn LoadVR4LifeMNX = (
-- Busca o MNX na pasta de UI do usuario (en-US\UI)
local uiPath = (getDir #ui_ln) + "vr4life.mnx"
if (doesFileExist uiPath) then (
try (
menuMan.loadMenuFile uiPath
menuMan.updateMenuBar()
format ">>> VR4LIFE: Menu carregado com sucesso! <<<\n"
) catch (
format ">>> VR4LIFE: Erro ao injetar o menu via MNX.\n"
)
)
)
-- Registro das Macros apontando para a pasta VR4Life_Plugin nos scripts do usuario
macroScript VR4Life_Launcher category:"Immerse Games" tooltip:"Abrir VR4Life"
(
on execute do (
local pythonFile = (getDir #userScripts) + "\\VR4Life_Plugin\\run_vr4life.py"
python.executeFile pythonFile
)
)
macroScript VR4Life_Update category:"Immerse Games" tooltip:"Atualizar VR4Life"
(
on execute do (
local pythonFile = (getDir #userScripts) + "\\VR4Life_Plugin\\vr4life_updater.py"
python.executeFile pythonFile
)
)
-- Callbacks para garantir que o menu apareça após a UI carregar
callbacks.removeScripts id:#vr4life_setup
callbacks.addScript #cuiRegisterMenus "LoadVR4LifeMNX()" id:#vr4life_setup
callbacks.addScript #filePostOpen "LoadVR4LifeMNX()" id:#vr4life_setup
-- Tenta carregar imediatamente
LoadVR4LifeMNX()