예제 #1
0
void CUIMapList::LoadMapList()
{
    const auto& weathers = gMapListHelper.GetGameWeathers();
    u32 cnt = 0;
    for (const MPWeatherDesc& weather : weathers)
        AddWeather(weather.Name, weather.StartTime, cnt++);
    if (weathers.size() > 0)
        m_pWeatherSelector->SetItemIDX(0);
}
예제 #2
0
void CUIChangeWeather::ParseWeather()
{
	weather_counter = 0;

	GAME_WEATHERS game_weathers = gMapListHelper.GetGameWeathers();
	GAME_WEATHERS_CIT it		= game_weathers.begin();
	GAME_WEATHERS_CIT it_e		= game_weathers.end();
	
	for( ;it!=it_e; ++it)
	{
		AddWeather			( (*it).m_weather_name, (*it).m_start_time);
	}
};
예제 #3
0
void CUIMapList::LoadMapList()
{

	GAME_WEATHERS game_weathers = gMapListHelper.GetGameWeathers();
	GAME_WEATHERS_CIT it		= game_weathers.begin();
	GAME_WEATHERS_CIT it_e		= game_weathers.end();
	
	u32 cnt=0;
	for( ;it!=it_e; ++it, ++cnt)
	{
		AddWeather			( (*it).m_weather_name, (*it).m_start_time, cnt);
	}
	if( game_weathers.size() )
		m_pWeatherSelector->SetItem(0);
}
예제 #4
0
void CUIMapList::LoadMapList()
{
	string_path				fn;
	FS.update_path			(fn, "$game_config$", MAP_LIST);
	CInifile map_list_cfg	(fn);

	// maps
	for (int k=0; game_types[k].name; ++k)
	{
		EGameTypes _id			= (EGameTypes)game_types[k].id;
		LPCSTR _name			= game_types[k].name;

		if( !map_list_cfg.section_exist(_name) ) continue;

		CInifile::Sect& S		= map_list_cfg.r_section(_name);
		CInifile::SectIt it		= S.begin(), end = S.end();
		
		for (;it!=end; ++it){
			shared_str _map_name = it->first;
			m_maps[_id].push_back	(_map_name);
		}
	}

	//weather
	shared_str				weather_sect = "weather";
	CInifile::Sect& S		= map_list_cfg.r_section(weather_sect);
	CInifile::SectIt it		= S.begin(), end = S.end();
	
	shared_str				WeatherType;
	shared_str				WeatherTime;

		
	for (u32 cnt=0; it!=end; ++it, ++cnt)
	{
		WeatherType			= it->first;
		WeatherTime			= map_list_cfg.r_string(weather_sect, *WeatherType);

		AddWeather			(WeatherType, WeatherTime, cnt);
	}

	if(S.size())
		m_pWeatherSelector->SetItem(0);
}