int CSoundManager::GetSoundEnvs(AStringVec& items) { SoundEnvironment_LIB* Lib = Sound->get_env_library(); if (Lib){ for (SoundEnvironment_LIB::SE_IT it=Lib->Library().begin(); it!=Lib->Library().end(); it++) items.push_back(*(*it)->name); } return items.size(); }
AnsiString _ListToSequence(const AStringVec& lst) { AnsiString out; out = ""; if (lst.size()){ out = lst.front(); for (AStringVec::const_iterator s_it=lst.begin()+1; s_it!=lst.end(); s_it++) out += AnsiString(",")+(*s_it); } return out; }
bool TUI::ShowHint(const AStringVec& SS) { VERIFY(m_bReady); if (SS.size()){ AnsiString S=_ListToSequence2(SS); if (m_bHintShowing&&(S==m_LastHint)) return true; m_LastHint = S; m_bHintShowing = true; if (!m_pHintWindow){ m_pHintWindow = xr_new<THintWindow>((TComponent*)0); m_pHintWindow->Brush->Color = (TColor)0x0d9F2FF; } TRect rect = m_pHintWindow->CalcHintRect(320,S,0); rect.Left+=m_HintPoint.x; rect.Top+=m_HintPoint.y; rect.Right+=m_HintPoint.x; rect.Bottom+=m_HintPoint.y; m_pHintWindow->ActivateHint(rect,S); }else{ m_bHintShowing = false; m_LastHint = ""; } return m_bHintShowing; }