| 228 | } |
| 229 | |
| 230 | bool Engine::LoadThemeFromFile( const std::string& filename ) { |
| 231 | std::ifstream in( filename.c_str() ); |
| 232 | |
| 233 | if( !in.good() ) { |
| 234 | return false; |
| 235 | } |
| 236 | |
| 237 | std::string data( |
| 238 | (std::istreambuf_iterator<char>( in )), |
| 239 | (std::istreambuf_iterator<char>()) |
| 240 | ); |
| 241 | |
| 242 | return LoadThemeFromString( data ); |
| 243 | } |
| 244 | |
| 245 | void Engine::ShiftBorderColors( sf::Color& light_color, sf::Color& dark_color, int offset ) const { |
| 246 | // TODO: Replace by += and -=. Currently not possible with SFML (see SFML issue #114). |
no outgoing calls