2017-04-18 12:39:29 +02:00
|
|
|
# About loadTextFileExample
|
2016-02-18 19:55:38 -07:00
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
2017-04-18 12:39:29 +02:00
|
|
|
### Learning Objectives
|
2016-02-18 19:55:38 -07:00
|
|
|
|
|
|
|
|
This example demonstrates how to load in a text file and then read it line by line easily utilizing a typewriter effect.
|
|
|
|
|
|
|
|
|
|
In the code, pay attention to:
|
|
|
|
|
|
|
|
|
|
* Use of ````ofBufferFromFile()```` to read in a text file into a ````ofBuffer````
|
|
|
|
|
* Use of ```` ofBuffer.getLines().begin()```` and ````ofBuffer.getLines().end()```` to determine the beginning and the total number of lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Expected Behavior
|
|
|
|
|
|
|
|
|
|
When launching this application you will see:
|
|
|
|
|
* A window with a background of bright pink and a black bar in the middle
|
|
|
|
|
* Text that has been loaded in and is revealed on an interval using a typewriter effect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Instructions for use:
|
|
|
|
|
|
|
|
|
|
* Running the application will start the animation of the text being revealed
|
|
|
|
|
|
|
|
|
|
|
2017-04-18 12:39:29 +02:00
|
|
|
### Other classes used in this file
|
2016-02-18 19:55:38 -07:00
|
|
|
|
|
|
|
|
This Example uses no other classes.
|