Lib.print( key );
}
}
}
When running this example, be sure to include the file Arial.ttf in the same directory as the
compiled script, as failure to do so may result in the application crashing.
Probably, the most important thing here to notice is the use of the Manager class. This class handles
the primary functions that you usually will not be able to do without. This includes creating the window
to handle your graphics, clearing or flipping your display buffer, and closing the visible window. If
you ??™ re new to games development or multimedia programming outside of Flash, then don ??™ t worry too
much if you don ??™ t understand the term flipping your display buffer . You ??™ ll get to that in a moment.
The Manager Class
You ??™ re probably used to working with Neko extensions that provide initialize and cleanup functions.
If you compare NME to the various GUI libraries already discussed in this book, then you will be able
to note a similar pattern. Like the GUI libraries, NME needs to be setup, then it should enter a loop,
and finally, it should be closed down and cleaned up after.
Pages:
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995