set the textFont of member "textClipTestField" to gFontName
if not (the textFont of member "textClipTestField" = gFontName) then
openXLib("@:supportM:comicbook")
set the textFont of member "textClipTestField" to gFontName
if not (the textFont of member "textClipTestField" = gFontName) then
alert("CBA/2 internal error: could not open font! The font will be copied to the system volume and the application will quit." & RETURN & "Please drag the " & QUOTE & gFontName & QUOTE & "font to your System folder and relaunch this application.")
set fontDir to getNthOfPath(getOSDirectory())
set sourceFontDir to the moviePath & "supportM:comicbook"
set OSerror to OSFileCopy(sourceFontDir, fontDir)
if OSerror then
alert("CBA/2 internal error: OS error" && OSerror)
end if
quit()
end if
end if
else
set the textFont of member "textClipTestField" to gFontName
if not (the textFont of member "textClipTestField" = gFontName) then
set error to baInstallFont(the moviePath & "supportW\cmicbook.ttf", gFontName)
if error then
alert("CBA/2 internal error: Windows font install problem!" & RETURN & RETURN & error)
end if
set the textFont of member "textClipTestField" to gFontName
if not (the textFont of member "textClipTestField" = gFontName) and not error then
set the locH of sprite 2 to 9000
puppetPalette("runtimePaletteWin", 60)
updateStage()
tell window 1
displayDialog(16)
end tell
end if
end if
end if
repeat with c = 1 to 3
repeat with i = the number of castMembers of castLib c down to 2
if the type of member i of castLib c = #field then
if not (the textFont of member i of castLib c = gFontName) then
set the textFont of member i of castLib c to gFontName
end if
end if
end repeat
end repeat
tell window 1
repeat with i = 1 to the number of castMembers of castLib 1
if the type of member i = #field then
if not (the textFont of member i = gFontName) then
set the textFont of member i to gFontName
end if
end if
end repeat
end tell
end
on screenChecks x, fromDialog, mode
if not fromDialog then
if not (the colorDepth = 8) then
if gPlatForm then
set gOldColorDepth to the colorDepth
set the locH of sprite 2 to 9000
updateStage()
set the colorDepth to 8
Del(60)
if not (the colorDepth = 8) then
tell window 1
displayDialog(14)
end tell
end if
else
set currentWidth to baScreenInfo("width")
set currentHeight to baScreenInfo("height")
set canBeChanged to baSetDisplay(currentWidth, currentHeight, 8, "test", 0)
if canBeChanged = 0 then
tell window 1
displayDialog(12)
end tell
else
if canBeChanged = 1 then
tell window 1
displayDialog(13)
end tell
else
if canBeChanged < 0 then
tell window 1
displayDialog(14)
end tell
end if
end if
end if
end if
end if
else
if gPlatForm then
alert("Burp!")
end if
set currentWidth to baScreenInfo("width")
set currentHeight to baScreenInfo("height")
set oldDepth to the colorDepth
set isNotChanged to baSetDisplay(currentWidth, currentHeight, 8, mode, 0)