2009-12-28 10:47:12 +01:00
|
|
|
#ifndef __HELP_BOX_HH__
|
|
|
|
#define __HELP_BOX_HH__
|
|
|
|
|
2009-12-06 10:03:09 +01:00
|
|
|
#include "menu.hh"
|
|
|
|
|
|
|
|
class HelpBox : public Menu
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
HelpBox(Font *font, const char ***all_messages) : Menu(font)
|
2010-01-06 17:42:55 +01:00
|
|
|
{
|
|
|
|
this->setHelpMessages(all_messages);
|
2010-01-16 08:11:17 +01:00
|
|
|
this->setSelectedBackground(NULL, NULL, NULL, NULL, NULL, NULL);
|
2010-01-06 17:42:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void setHelpMessages(const char ***all_messages)
|
2009-12-06 10:03:09 +01:00
|
|
|
{
|
|
|
|
this->all_messages = all_messages;
|
|
|
|
}
|
|
|
|
|
|
|
|
void updateHelpMessage(int which)
|
|
|
|
{
|
2010-01-06 17:42:55 +01:00
|
|
|
if (!this->all_messages)
|
|
|
|
return;
|
2009-12-06 10:03:09 +01:00
|
|
|
this->setText(this->all_messages[which]);
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void selectCallback(int which)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
virtual void hoverCallback(int which)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
virtual void escapeCallback(int which)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
const char ***all_messages;
|
|
|
|
};
|
2009-12-28 10:47:12 +01:00
|
|
|
|
|
|
|
#endif /* __HELP_BOX_HH__ */
|