mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Zrobione przyciski menu głównego, ich podświetlanie i naciskanie.
Aby zamknąć menu naciśnij 'q'.
This commit is contained in:
28
CPreGame.h
28
CPreGame.h
@@ -1,18 +1,18 @@
|
||||
#include "SDL.h"
|
||||
#include "CSemiDefHandler.h"
|
||||
#include "CSemiLodHandler.h"
|
||||
struct AnimatedPic
|
||||
{
|
||||
std::vector<SDL_Surface*> frames;
|
||||
~AnimatedPic()
|
||||
{
|
||||
for (int i=0;i<frames.size();i++)
|
||||
{
|
||||
SDL_FreeSurface(frames[i]);
|
||||
delete frames[i];
|
||||
}
|
||||
}
|
||||
};
|
||||
//struct AnimatedPic
|
||||
//{
|
||||
// std::vector<SDL_Surface*> frames;
|
||||
// ~AnimatedPic()
|
||||
// {
|
||||
// for (int i=0;i<frames.size();i++)
|
||||
// {
|
||||
// SDL_FreeSurface(frames[i]);
|
||||
// delete frames[i];
|
||||
// }
|
||||
// }
|
||||
//};
|
||||
class CPreGame
|
||||
{
|
||||
public:
|
||||
@@ -23,11 +23,13 @@ public:
|
||||
SDL_Surface * background;
|
||||
CSemiDefHandler *newGame, *loadGame, *highScores,*credits, *quit;
|
||||
SDL_Rect lNewGame, lLoadGame, lHighScores, lCredits, lQuit;
|
||||
} * ourMainMenu;
|
||||
int highlighted;//0=none; 1=new game; 2=load game; 3=high score; 4=credits; 5=quit
|
||||
} * ourMainMenu, * newGameManu;
|
||||
std::string map; //selected map
|
||||
std::vector<CSemiLodHandler *> handledLods;
|
||||
CPreGame(); //c-tor
|
||||
void showMainMenu();
|
||||
void runLoop(); // runs mainloop of PreGame
|
||||
void initMainMenu(); //loads components for main menu
|
||||
void highlightButton(int which, int on);
|
||||
};
|
||||
Reference in New Issue
Block a user