Beispiel #1
0
static void Param(
	CONFIG & config,
	bool write,
	CONFIG::iterator & section,
	const std::string & name,
	T & value)
{
	if (write)
	{
		config.SetParam(section, name, value);
	}
	else
	{
		config.GetParam(section, name, value);
	}
}
Beispiel #2
0
void GUICONTROL::RegisterActions(
	const std::map<std::string, Slot1<const std::string &>*> & vactionmap,
	const std::map<std::string, Slot0*> & actionmap,
	const std::string & name,
	const CONFIG & cfg)
{
	CONFIG::const_iterator section;
	cfg.GetSection(name, section);
	std::string actionstr;

	if (cfg.GetParam(section, "onselectx", actionstr))
		SetActions(vactionmap, actionstr, onselectx);

	if (cfg.GetParam(section, "onselecty", actionstr))
		SetActions(vactionmap, actionstr, onselecty);

	if (cfg.GetParam(section, "onselect", actionstr))
		SetActions(actionmap, actionstr, onselect);

	if (cfg.GetParam(section, "onfocus", actionstr))
		SetActions(actionmap, actionstr, onfocus);

	if (cfg.GetParam(section, "onblur", actionstr))
		SetActions(actionmap, actionstr, onblur);

	if (cfg.GetParam(section, "onmoveup", actionstr))
		SetActions(actionmap, actionstr, onmoveup);

	if (cfg.GetParam(section, "onmovedown", actionstr))
		SetActions(actionmap, actionstr, onmovedown);

	if (cfg.GetParam(section, "onmoveleft", actionstr))
		SetActions(actionmap, actionstr, onmoveleft);

	if (cfg.GetParam(section, "onmoveright", actionstr))
		SetActions(actionmap, actionstr, onmoveright);
}