@echo off
cd "%~dp0.."
set bb=%cd%
cd "%bb%\addons"
set OUTPUT="%bb%\plugins\bbinterfaceMOD\main.bbi"
if "%STDOUT_REDIRECTED%" == "" (
		set STDOUT_REDIRECTED=yes
		cmd.exe /c %0 %* >%OUTPUT%
		exit /b %ERRORLEVEL%
)
for /f "Tokens=1,3" %%x in ('scrnres') do (
		set resX=%%x
		echo [onload]
		echo @BBInterface Set Static Xres %%x
		echo @BBInterface Set Static Yres %%y
)
echo @BBInterface Control SetWindowProperty toolbar X 0
echo @BBInterface Control SetWindowProperty toolbar Y $Yres$-$ToolbarHeight$
echo @BBInterface Control SetWindowProperty toolbar Height $ToolbarHeight$
echo @BBInterface Control SetWindowProperty toolbar Width $Xres$
echo @BBInterface Control SetWindowProperty readme X $Xres$/2-343
echo @BBInterface Control SetWindowProperty readme Y 50
echo @BBInterface Control SetWindowProperty Power X $Xres$/2-211
echo @BBInterface Control SetWindowProperty Power Y 50
goto %resX%
:1920
echo @sbx.IntMenu.2 99
goto e
:1600
echo @sbx.IntMenu.2 97
goto e
:1440
echo @sbx.IntMenu.2 97
goto e
:1280
echo @sbx.IntMenu.2 91
goto e
:1024
echo @sbx.IntMenu.2 96
goto e
:800
echo @sbx.IntMenu.2 95
goto e
:e
exit