Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. Funktion.hpp
  2.  
  3. #ifndef FUNKTION
  4. #define FUNKTION
  5.  
  6. namespace moritz
  7. {
  8. int Error(char Name);
  9. };
  10. #endif
  11.  
  12. funktion.cpp
  13.  
  14. #include <iostream>
  15. #include <SFML\Graphics.hpp>
  16. #include "Funktion.hpp"
  17.  
  18. int moritz::Error(char name)
  19. {
  20. sf::RenderWindow Error(sf::VideoMode(250,150,32),"Error 104!");
  21.  
  22. while(Error.IsOpened())
  23. {
  24.  
  25. sf::Event Error1;
  26. while(Error.GetEvent(Error1))
  27. {
  28. if(Error1.Type == sf::Event::Closed)
  29. Error.Close();
  30. }
  31.  
  32. sf::Font Fail;
  33. if(!Fail.LoadFromFile("arial.ttf"))
  34. {
  35.  
  36. }
  37.  
  38. sf::String Fehlermeldung("Bild wurde nicht gefunden",Fail,16);
  39. Fehlermeldung.SetColor(sf::Color(0,0,0));
  40. Fehlermeldung.SetX(30);
  41. Fehlermeldung.SetY(60);
  42.  
  43. Error.Clear(sf::Color(255,255,255));
  44. Error.Draw(Fehlermeldung);
  45. Error.Display();
  46. }
  47.  
  48. return EXIT_FAILURE;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement