1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00
planetblupi/menu.h

52 lines
1020 B
C
Raw Normal View History

2017-01-21 17:27:46 +01:00
// Menu.h
2017-01-21 23:44:30 +01:00
#pragma once
2017-01-21 17:27:46 +01:00
#include "def.h"
2017-01-21 17:27:46 +01:00
/////////////////////////////////////////////////////////////////////////////
class CMenu
{
public:
CMenu();
~CMenu();
bool Create(HWND hWnd, CPixmap *pPixmap, CSound *pSound,
2017-01-21 17:27:46 +01:00
POINT pos, int nb, int *pButtons, int *pErrors,
int perso);
void Update(int nb, int *pButtons, int *pErrors);
void Delete();
void Draw();
int GetSel();
int GetRank();
bool IsError();
bool IsExist();
2017-01-21 17:27:46 +01:00
void Message();
2017-01-28 23:34:02 +01:00
bool TreatEvent(const SDL_Event &event);
2017-01-21 17:27:46 +01:00
protected:
int Detect(POINT pos);
bool MouseDown(POINT pos);
bool MouseMove(POINT pos);
bool MouseUp(POINT pos);
2017-01-21 17:27:46 +01:00
protected:
HWND m_hWnd;
CPixmap* m_pPixmap;
CDecor* m_pDecor;
CSound* m_pSound;
POINT m_pos; // coin sup/gauche
POINT m_dim; // dimensions
int m_nbButtons;
POINT m_nbCel;
int m_perso;
int m_buttons[MAXBUTTON];
int m_errors[MAXBUTTON];
UINT m_messages[MAXBUTTON];
int m_selRank;
};
/////////////////////////////////////////////////////////////////////////////