예제 #1
0
int playable_location::compare(const playable_location * src) const
{
	int ret = uStringCompare(get_path(),src->get_path());
	if (ret!=0) return ret;
	else
	{
		int n1 = get_number(), n2 = src->get_number();
		if (n1<n2) return -1;
		else if (n1>n2) return 1;
		else return 0;
	}
}
예제 #2
0
void g_append_menu_panels(HMENU menu, const uie::window_info_list_simple & panels, UINT base)
{
	HMENU popup = 0;
	unsigned n, count=panels.get_count();
	for(n=0;n<count;n++)
	{
		if (!n || uStringCompare(panels[n-1].category, panels[n].category))
		{
			if (n) uAppendMenu(menu,MF_STRING|MF_POPUP,(UINT)popup,panels[n-1].category);
			popup = CreatePopupMenu();
		}
		uAppendMenu(popup,(MF_STRING),base+n,panels[n].name);
		if (n == count-1) uAppendMenu(menu,MF_STRING|MF_POPUP,(UINT)popup,panels[n].category);
	}
}