mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-29 15:52:48 +02:00
MessageBox: header cleanups.
This commit is contained in:
parent
3252c777c3
commit
9e876a6f90
@ -18,10 +18,10 @@
|
|||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
#include <SDL_gfxPrimitives.h>
|
|
||||||
|
|
||||||
#include "messagebox.h"
|
#include "messagebox.h"
|
||||||
|
#include "gmenu2x.h"
|
||||||
|
|
||||||
|
#include <SDL_gfxPrimitives.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -18,31 +18,29 @@
|
|||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#ifndef MESSAGEBOX_H_
|
#ifndef MESSAGEBOX_H
|
||||||
#define MESSAGEBOX_H_
|
#define MESSAGEBOX_H
|
||||||
|
|
||||||
#define MB_BTN_B 0
|
#include "inputmanager.h"
|
||||||
#define MB_BTN_X 1
|
|
||||||
#define MB_BTN_START 2
|
|
||||||
#define MB_BTN_SELECT 3
|
|
||||||
|
|
||||||
|
#include <SDL.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "gmenu2x.h"
|
|
||||||
|
|
||||||
using std::string;
|
class GMenu2X;
|
||||||
|
|
||||||
class MessageBox {
|
class MessageBox {
|
||||||
private:
|
|
||||||
string text, icon;
|
|
||||||
GMenu2X *gmenu2x;
|
|
||||||
string buttons[BUTTON_TYPE_SIZE];
|
|
||||||
string buttonLabels[BUTTON_TYPE_SIZE];
|
|
||||||
SDL_Rect buttonPositions[BUTTON_TYPE_SIZE];
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MessageBox(GMenu2X *gmenu2x, const string &text, const string &icon="");
|
MessageBox(GMenu2X *gmenu2x, const std::string &text,
|
||||||
void setButton(InputManager::Button button, const string &label);
|
const std::string &icon="");
|
||||||
|
void setButton(InputManager::Button button, const std::string &label);
|
||||||
int exec();
|
int exec();
|
||||||
|
|
||||||
|
private:
|
||||||
|
GMenu2X *gmenu2x;
|
||||||
|
std::string text, icon;
|
||||||
|
std::string buttons[BUTTON_TYPE_SIZE];
|
||||||
|
std::string buttonLabels[BUTTON_TYPE_SIZE];
|
||||||
|
SDL_Rect buttonPositions[BUTTON_TYPE_SIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*MESSAGEBOX_H_*/
|
#endif // MESSAGEBOX_H
|
||||||
|
Loading…
Reference in New Issue
Block a user