2009-11-29 10:29:26 +01:00
|
|
|
#ifndef __DIALOGUE_BOX_HH__
|
|
|
|
#define __DIALOGUE_BOX_HH__
|
|
|
|
|
|
|
|
#include "menu.hh"
|
2009-12-31 14:25:46 +01:00
|
|
|
#include "listener.hh"
|
|
|
|
#include "gui_view.hh"
|
|
|
|
#include "gui.hh"
|
2009-11-29 10:29:26 +01:00
|
|
|
|
2009-12-31 14:25:46 +01:00
|
|
|
class DialogueBox;
|
|
|
|
|
|
|
|
class DialogueListener : public Listener
|
2009-11-29 10:29:26 +01:00
|
|
|
{
|
2009-12-05 13:04:00 +01:00
|
|
|
public:
|
2009-12-31 14:25:46 +01:00
|
|
|
virtual void selectCallback(DialogueBox *which, int selected);
|
|
|
|
|
|
|
|
virtual void escapeCallback(DialogueBox *which, int selected);
|
|
|
|
};
|
|
|
|
|
|
|
|
class DialogueBox : public Menu, public ListenerManager
|
|
|
|
{
|
|
|
|
public:
|
2010-01-02 13:07:35 +01:00
|
|
|
DialogueBox(const char *msgs[], bool delete_on_action = true);
|
2009-11-29 10:29:26 +01:00
|
|
|
|
|
|
|
virtual void selectCallback(int which);
|
|
|
|
|
|
|
|
virtual void escapeCallback(int which);
|
|
|
|
|
2009-12-05 13:04:00 +01:00
|
|
|
virtual void hoverCallback(int which);
|
|
|
|
|
|
|
|
virtual int selectNext(event_t ev);
|
|
|
|
|
2009-12-31 14:25:46 +01:00
|
|
|
virtual void draw(SDL_Surface *where);
|
|
|
|
|
2009-12-05 13:04:00 +01:00
|
|
|
protected:
|
2010-01-02 13:07:35 +01:00
|
|
|
bool delete_on_action;
|
2009-11-29 10:29:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __DIALOGUE_BOX_HH__ */
|