here
- class Page {
- String bodyText; //string used for displaying the text
- PImage backImg;
- int[] options;
- String nameMovie;
- Page( String nameMovie_, String nameImage) {
- // bodyText = theString;
- nameMovie = nameMovie_;
- backImg = loadImage(nameImage);
- }
- void setBodyText(String theString) {// sets a string for the bodytext object
- bodyText = theString;
- }
- void setOptions(int[] theOptions) {
- options = new int[theOptions.length];
- arrayCopy(theOptions, options);
- }
- void display() { //sets display option for text to be centered and have a buffer zone of 20 pixels.
- image(backImg, 0, 0);
- textAlign(CENTER);
- fill(#03FF00);
- text(bodyText, 20, 20, width-20, height-20);
- }
- void chooseOption(int theNum, int name) {
- if (theNum < options.length) {
- currentPage = options[theNum];
- }
- }
- }