REM > BootEditCode:Open

DEF FNOpen_BootPane
LOCAL High%, ScrX%, ScrY%

SYS"WimpExt_MiscOp", 1 TO ,, High%
PROCWimp_ScreenSize(ScrX%, ScrY%)

IF B%!04 < 148 THEN B%!04 = 148
B%!12 = B%!04 + BootPane_Wide%
BootPane_High% = B%!16 - B%!08
 IF B%!16 > ScrY% - (High% + 216) THEN
  B%!16 = ScrY% - (High% + 216) - 2
  B%!08 = B%!16 - BootPane_High%
REM  IF B%!08 < 0 THEN B%!08 = 0
 ENDIF
 IF (B%!16 - B%!08) > ScrY% - (High% + 216) THEN
  B%!16 = ScrY% - (High% + 216) - 2
  B%!08 = 0
 ENDIF

SYS"Wimp_OpenWindow",, B%

B%!400 = FNObject_Hand(0, "Boot", 0)
SYS"Wimp_GetWindowState",, B% + 400
B%!404 = B%!04 - 148
B%!412 = B%!404 + 956
B%!416 = B%!16 + 216
B%!408 = B%!416 - 216 - (B%!16 - B%!08)
B%!428 = B%!00
SYS"Wimp_OpenWindow",, B% + 400

SYS"WimpExt_UnLinkWindows",,, B%!400, B%!00
SYS"WimpExt_LinkWindows",,, B%!400, B%!00

=1
