1#include "../Header files/Precompile.h";
2#include "../Header files/Additional Functions.h";
3#include "../Header files/Menu.h";
39 fontBackstory.
loadFromFile(
"../Images and fonts/Fonts/Header font.ttf");
41 string Backstory =
"Hello friend!\nI'm a Kurabirov and I'm here to tell you my story.\nSome time ago I was a professional boxer and I was very successful in that.\nWhen cryptocurrencies came out, I really liked them and started studying them.\nAnyway, because I knew how the market works,\nit was time to test my knowledge and bought stoshevcoin and staichocoin.\nBut things went wrong and these two cryptocurrencies collapsed.\nA lot of people have become attached to the propaganda that this will be\nthe currency of the future and we have lost all our money. Anyway, I became homeless.\nOne day, three costumed men abducted me in a van and put on a mask so I couldn't see. After a while,\nthey stopped the van, removed my mask, and I was in front of a mansion.\nIt turned out that the boss of the turkish mafia lives here(he also has a telsa).\nHe wanted me to place an order for him. Without telling me much, I agreed and here I am now.";
42 Text textBackstory(
"", fontBackstory, 34);
50 bool isTouched =
false, isTouchedForBreak =
false;
65 if (
ev.
type == Event::Closed)
76 isTouchedForBreak =
true;
77 textBackstory.
setString(
String(Backstory.substr(0, Backstory.length())));
82 if (isTouched ==
false)
93 else if (isTouched ==
true) {
94 textBackstory.
setString(
String(Backstory.substr(0, Backstory.length())));
99 window.
draw(textBackstory);
104 isTouchedForBreak =
true;
107 if (isTouchedForBreak ==
true)
void addIcon(RenderWindow &window)
void backstory(RenderWindow &window, Texture backstoryTexture, Sprite backstoryImage)
void changeFPS(int FPS, RenderWindow &window)
Utility class that measures the elapsed time.
Time restart()
Restart the clock.
Time getElapsedTime() const
Get the elapsed time.
Utility class for manipulating RGBA colors.
Defines a system event and its parameters.
MouseButtonEvent mouseButton
Mouse button event parameters (Event::MouseButtonPressed, Event::MouseButtonReleased)
KeyEvent key
Key event parameters (Event::KeyPressed, Event::KeyReleased)
EventType type
Type of the event.
Class for loading and manipulating character fonts.
bool loadFromFile(const std::string &filename)
Load the font from a file.
Class for loading, manipulating and saving images.
const Uint8 * getPixelsPtr() const
Get a read-only pointer to the array of pixels.
Vector2u getSize() const
Return the size (width and height) of the image.
bool loadFromFile(const std::string &filename)
Load the image from a file on disk.
void draw(const Drawable &drawable, const RenderStates &states=RenderStates::Default)
Draw a drawable object to the render target.
void clear(const Color &color=Color(0, 0, 0, 255))
Clear the entire target with a single color.
Window that can serve as a target for 2D drawing.
Storage for audio samples defining a sound.
bool loadFromFile(const std::string &filename)
Load the sound buffer from a file.
Regular sound that can be played in the audio environment.
void play()
Start or resume playing the sound.
void setBuffer(const SoundBuffer &buffer)
Set the source buffer containing the audio data to play.
void stop()
stop playing the sound
void setVolume(float volume)
Set the volume of the sound.
Drawable representation of a texture, with its own transformations, color, etc.
void setTexture(const Texture &texture, bool resetRect=false)
Change the source texture of the sprite.
Utility string class that automatically handles conversions between types and encodings.
Graphical text that can be drawn to a render target.
void setString(const String &string)
Set the text's string.
void setFillColor(const Color &color)
Set the fill color of the text.
Image living on the graphics card that can be used for drawing.
bool loadFromFile(const std::string &filename, const IntRect &area=IntRect())
Load the texture from a file on disk.
float asSeconds() const
Return the time value as a number of seconds.
T x
X coordinate of the vector.
T y
Y coordinate of the vector.
bool pollEvent(Event &event)
Pop the event on top of the event queue, if any, and return it.
void setIcon(unsigned int width, unsigned int height, const Uint8 *pixels)
Change the window's icon.
void close()
Close the window and destroy all the attached resources.
void display()
Display on screen what has been rendered to the window so far.
bool isOpen() const
Tell whether or not the window is open.
void setFramerateLimit(unsigned int limit)
Limit the framerate to a maximum fixed frequency.
Keyboard::Key code
Code of the key that has been pressed.