⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainmenu.h

📁 S.C.O.U.R.G.E.是一款类似Rogue的游戏
💻 H
字号:
/***************************************************************************                          mainmenu.h  -  description                             -------------------    begin                : Tue Aug 12 2003    copyright            : (C) 2003 by Gabor Torok    email                : cctorok@yahoo.com ***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU General Public License as published by  * *   the Free Software Foundation; either version 2 of the License, or     * *   (at your option) any later version.                                   * *                                                                         * ***************************************************************************/#ifndef MAINMENU_H#define MAINMENU_H#include "constants.h"#include "sdlhandler.h"#include "sdleventhandler.h"#include "sdlscreenview.h"#include "scourge.h"#include "text.h"#include "gui/window.h"#include "gui/label.h"#include "gui/button.h"/**  *@author Gabor Torok  */class Scourge;class MainMenu : public SDLEventHandler,SDLScreenView {private:  Scourge *scourge;  int value;  float logoRot, logoRotDelta;  GLint logoTicks;  GLint logoTicksDelta;#define MAX_LOGOS 100  typedef struct _LogoSprite {	float x, y, angle, rot;	int quadrant, steps;  } LogoSprite;  int logoSpriteCount;  LogoSprite logoSprite[MAX_LOGOS];  typedef struct _Cloud {	int x, y, w, h, speed;  } Cloud;  Cloud cloud[100];  int cloudCount;  Window *mainWin;  Button *newGameButton;  Button *continueButton;  Button *optionsButton;  Button *aboutButton;  Button *quitButton;  public:#define NEW_GAME 1#define CONTINUE_GAME 2#define OPTIONS 3#define ABOUT 4#define QUIT 5  MainMenu(Scourge *scourge);  ~MainMenu();  void drawView();  void drawAfter();  bool handleEvent(SDL_Event *event);  bool handleEvent(Widget *widget, SDL_Event *event);  int getValue();  inline void show() { mainWin->setVisible(true); }  inline void hide() { mainWin->setVisible(false); }  inline bool isVisible() { return mainWin->isVisible(); } protected:  void drawClouds(bool moveClouds, bool flipped);  void drawWater();  void drawLogo();  void addLogoSprite();  void drawLogoSprites();  void drawParticles();};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -