39 lines
1.7 KiB
Text
39 lines
1.7 KiB
Text
_window = 1
|
|
begin enum 1
|
|
_asciiField
|
|
end enum
|
|
|
|
void local fn BuildWindow
|
|
CGRect r = fn CGRectMake( 0, 0, 610, 140 )
|
|
window _window, @"Rosetta Code — FutureBasic in 3D ASCII", r, NSWindowStyleMaskTitled + NSWindowStyleMaskClosable
|
|
WindowSetBackgroundColor( _window, fn ColorBlack )
|
|
|
|
CFStringRef asciiFB = @" ¬
|
|
/$$$$$$$$ / $$ /$$$$$$$ /$$ \n¬
|
|
| $$_____/ | $$ | $$__ $$ |__/ \n¬
|
|
| $$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$ | $$ \\ $$ /$$$$$$ /$$$$$$$ /$$ /$$$$$$$\n¬
|
|
| $$$$$ | $$ | $$|_ $$_/ | $$ | $$ /$$__ $$ /$$__ $$| $$$$$$$ |____ $$ /$$_____/| $$ /$$_____/\n¬
|
|
| $$__/ | $$ | $$ | $$ | $$ | $$| $$ \\__/| $$$$$$$$| $$__ $$ /$$$$$$$| $$$$$$ | $$| $$ \n¬
|
|
| $$ | $$ | $$ | $$ /$$| $$ | $$| $$ | $$_____/| $$ \\ $$ /$$__ $$ \\____ $$| $$| $$ \n¬
|
|
| $$ | $$$$$$/ | $$$$/| $$$$$$/| $$ | $$$$$$$| $$$$$$$/| $$$$$$$ /$$$$$$$/| $$| $$$$$$$\n¬
|
|
|__/ \\______/ \\___/ \\______/ |__/ \\_______/|_______/ \\_______/|_______/ |__/ \\_______/\n"
|
|
|
|
r = fn CGRectMake( 22, 20, 582, 100 )
|
|
textfield _asciiField, YES, asciiFB, r, _window
|
|
TextFieldSetTextColor( _asciiField, fn ColorYellow )
|
|
TextFieldSetBordered( _asciiField, NO )
|
|
TextFieldSetBackgroundColor( _asciiField, fn ColorBlack )
|
|
ControlSetFontWithName( _asciiField, @"Menlo", 9.0 )
|
|
end fn
|
|
|
|
void local fn DoDialog( ev as long, tag as long, wnd as long )
|
|
select ( ev )
|
|
case _windowWillClose : end
|
|
end select
|
|
end fn
|
|
|
|
on dialog fn DoDialog
|
|
|
|
fn BuildWindow
|
|
|
|
HandleEvents
|