frodo-wii/dialogue_box.hh

44 lines
780 B
C++
Raw Normal View History

2009-11-29 10:29:26 +01:00
#ifndef __DIALOGUE_BOX_HH__
#define __DIALOGUE_BOX_HH__
#include "menu.hh"
#include "listener.hh"
#include "gui_view.hh"
#include "gui.hh"
2009-11-29 10:29:26 +01:00
class DialogueBox;
class DialogueListener : public Listener
2009-11-29 10:29:26 +01:00
{
public:
virtual void selectCallback(DialogueBox *which, int selected);
virtual void escapeCallback(DialogueBox *which, int selected);
};
class DialogueBox : public Menu, public ListenerManager
{
public:
DialogueBox(const char *msgs[], int cancel = 1);
2009-11-29 10:29:26 +01:00
virtual void selectCallback(int which);
virtual void escapeCallback(int which);
virtual void hoverCallback(int which);
virtual int selectNext(event_t ev);
virtual void draw(SDL_Surface *where);
int cancelIndex()
2009-11-29 10:29:26 +01:00
{
return this->m_cancel;
2009-11-29 10:29:26 +01:00
}
protected:
2009-11-29 10:29:26 +01:00
int m_cancel;
};
#endif /* __DIALOGUE_BOX_HH__ */