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.

50 lines
1.5 KiB
Plaintext

-- VR4Life Startup Loader - Versão Dinâmica 2026
global LoadVR4LifeMNX
fn LoadVR4LifeMNX = (
-- Procura o arquivo MNX na pasta de UI do utilizador atual
local uiPath = (getDir #userMacros) + "\\..\\en-US\\UI\\vr4life.mnx"
if (doesFileExist uiPath) then (
try (
menuMan.loadMenuFile uiPath
menuMan.updateMenuBar()
format ">>> VR4LIFE: Menu carregado dinamicamente via CUI. <<<\n"
) catch (
format ">>> VR4LIFE: Erro ao injetar menu. <<<\n"
)
)
)
-- 1. DETETAR O CAMINHO DOS SCRIPTS PYTHON DINAMICAMENTE
-- O MaxScript procura na pasta de scripts do utilizador
local scriptsPath = (getDir #userScripts) + "\\VR4Life_Plugin\\"
-- 2. REGISTAR MACROS COM O CAMINHO DETETADO
macroScript VR4Life_Launcher
category:"Immerse Games"
tooltip:"Abrir VR4Life"
(
on execute do (
local sPath = (getDir #userScripts) + "\\VR4Life_Plugin\\run_vr4life.py"
python.executeFile sPath
)
)
macroScript VR4Life_Update
category:"Immerse Games"
tooltip:"Atualizar VR4Life"
(
on execute do (
local sPath = (getDir #userScripts) + "\\VR4Life_Plugin\\vr4life_updater.py"
python.executeFile sPath
)
)
-- 3. GATILHOS DE EXECUÇÃO (Lógica Babylon)
callbacks.removeScripts id:#vr4life_setup
callbacks.addScript #cuiRegisterMenus "LoadVR4LifeMNX()" id:#vr4life_setup
callbacks.addScript #filePostOpen "LoadVR4LifeMNX()" id:#vr4life_setup
-- Tenta carregar agora
LoadVR4LifeMNX()