//-------------------------------------------------------- /// Get Java Interface //-------------------------------------------------------- IJavaInterfaceSPtr JavaInterfaceManager::GetJavaInterface(CSCore::InterfaceIDType inInterfaceID) { for (std::vector<IJavaInterfaceSPtr>::const_iterator it = mJavaInterfaces.begin(); it != mJavaInterfaces.end(); ++it) { if ((*it)->IsA(inInterfaceID)) { return (*it); } } CS_LOG_WARNING("JavaInterfaceManager cannot find a JavaInterface with the requested interface."); return IJavaInterfaceSPtr(); }
FileStreamSPtr StringToFile(StorageLocation ineStorageLocation, const std::string & instrPath, const std::string& instrFileOut) { FileStreamSPtr pFile = Application::Get()->GetFileSystem()->CreateFileStream(ineStorageLocation, instrPath, FileMode::k_write); if(!pFile || pFile->IsOpen() == false) { CS_LOG_WARNING("Utils::StringToFile: Could not open file: " + instrPath); return FileStreamSPtr(); } pFile->Write(instrFileOut); return pFile; }
bool FileToString(StorageLocation ineStorageLocation, const std::string & instrPath, std::string & outstrFileContent) { FileStreamSPtr pFile = Application::Get()->GetFileSystem()->CreateFileStream(ineStorageLocation, instrPath, FileMode::k_read); if(!pFile || pFile->IsOpen() == false) { CS_LOG_WARNING("Utils::FileToString: Could not open file: " + instrPath); return false; } pFile->GetAll(outstrFileContent); return true; }
//------------------------------------------------ //------------------------------------------------ void ScoringSystem::IncrementScore(u32 in_playerIndex) { CS_ASSERT(in_playerIndex < k_numPlayers, "Index out of range"); m_scores[in_playerIndex]++; if(m_scores[in_playerIndex] <= 99) { u32 tens = m_scores[in_playerIndex]/10; m_scoreViews[in_playerIndex].first->SetTextureAtlasId(CSCore::ToString(tens)); u32 singles = m_scores[in_playerIndex]%10; m_scoreViews[in_playerIndex].second->SetTextureAtlasId(CSCore::ToString(singles)); } else { CS_LOG_WARNING("We can only currently display scores up to 99"); } m_scoreChangedEvent.NotifyConnections(m_scores); }
//----------------------------------------------------- //----------------------------------------------------- void DialogueBoxSystem::MakeToast(const std::string& in_text) { CS_LOG_WARNING("Toast not available on Windows"); }