12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include "MenuMain.h"
- #include "DiPoint.h"
- void MenuMain::initialize()
- {
- //Trees
- tree0.setFrame(5);
- tree0.setCenterX(640 /4);
- tree0.setBottom(480); //ground.getGroundLevel()
- tree1.setFrame(5);
- tree1.setCenterX(640 *5/6);
- tree1.setBottom (480);//ground.getGroundLevel());
- //Title
- title.setFrame(7);
- title.setCenterX(640/2);
- title.setCenterY(480/4);
- //Buttons
- buttonStart.setFrame(8);
- buttonStart.setCenterX(640 /3);
- buttonStart.setCenterY(480 *2/3);
- buttonExtra.setFrame(8);
- buttonExtra.setCenterX(640 *2/3);
- buttonExtra.setCenterY(480 *2/3);
- }
- int MenuMain::update()
- {
- return 0;
- }
- void MenuMain::draw(SDL_Surface *screen)
- {
- //Trees
- tree0.draw(screen);
- tree1.draw(screen);
- //UI
- title.draw(screen);
- buttonStart.draw(screen);
- buttonExtra.draw(screen);
- }
|