- Comencem a implementar els menus
This commit is contained in:
32
source/m_menu.cpp
Normal file
32
source/m_menu.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "m_menu.h"
|
||||
#include "jgame.h"
|
||||
#include "jinput.h"
|
||||
#include "jdraw.h"
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
namespace modules
|
||||
{
|
||||
namespace menu
|
||||
{
|
||||
void init()
|
||||
{
|
||||
::game::setUpdateTicks(64);
|
||||
|
||||
}
|
||||
|
||||
bool loop()
|
||||
{
|
||||
if (input::keyDown(SDL_SCANCODE_ESCAPE)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
draw::cls(2);
|
||||
draw::color(1);
|
||||
|
||||
draw::print2("THE POOL", 16, 3, YELLOW, FONT_ZOOM_VERTICAL);
|
||||
|
||||
draw::render();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user