#include "menu.h"

cPerlMenuText::cPerlMenuText(FILE *Pipe, const char *Title):
		cPerlOsdMenuBase<cMenuText>(Pipe, "MenuText", Title, NULL)
{
}

void cPerlMenuText::Method(const char *Opts)
{
	BEGIN_METHOD_MAP1(cPerlOsdMenuBase<cMenuText>, Opts,
		MAP_METHOD(SetText)
	);
	char **params = SplitParameters(Opts, 1);

	if (strcmp(params[0], "SetText") == 0)
		SetText(params[1]);
	else
		cPerlOsdMenuBase<cMenuText>::Method(Opts);

	FreeParameters(params, 1);
}

void cPerlMenuText::SetText(const char *Opts)
{
	char **params = SplitParameters(Opts, 1);

	fprintf(stderr, "SETTEXT\n");

	cMenuText::SetText(params[0]);

	FreeParameters(params, 1);
}
