Пример #1
0
void TItemList::SaveSelection(TFormStorage* storage)
{
    RStringVec items;
    if (GetSelected(items)){
	    storage->WriteInteger("sel_cnt",items.size());
        for (RStringVecIt l_it=items.begin(); l_it!=items.end(); l_it++)
	    	storage->WriteString(AnsiString().sprintf("sel%d",l_it-items.begin()),**l_it);
    }
//    for (AStringIt s_it=last_selected_items.begin(); s_it!=last_selected_items.end(); s_it++)
//    	storage->WriteString(AnsiString().sprintf("sel%d",s_it-last_selected_items.begin()),*s_it);
}
Пример #2
0
shared_str	_ListToSequence(const RStringVec& lst)
{
	xr_string		out;
	if (lst.size()){
    	out			= *lst.front();
		for (RStringVec::const_iterator s_it=lst.begin()+1; s_it!=lst.end(); s_it++){
        	out		+= ",";
            out		+= **s_it;
        }
	}
	return shared_str	(out.c_str());
}
Пример #3
0
void TfrmImageLib::OnCubeMapBtnClick(ButtonValue* value, bool& bModif, bool& )
{
	ButtonValue* B = dynamic_cast<ButtonValue*>(value); R_ASSERT(B);
    bModif = false;
	switch(B->btn_num){
    case 0:{
        RStringVec items;
        if (0!=m_ItemList->GetSelected(items)){
            for (RStringVecIt it=items.begin(); it!=items.end(); it++){
                AnsiString new_name = AnsiString(it->c_str())+"#small";
                ImageLib.CreateSmallerCubeMap(it->c_str(),new_name.c_str());	
            }
        }
    }break;
	}
}