Tic-Tac-Toe/Tic Tac Toe/InputField.hpp

29 lines
344 B
C++
Raw Permalink Normal View History

2019-03-06 21:43:26 +00:00
#pragma once
#include <SFML/Graphics.hpp>
class InputField
{
public:
InputField();
~InputField();
void Type(char letter);
std::string Enter();
void Backspace();
void Render(sf::RenderWindow& target);
private:
void updateText();
std::string value;
sf::Text info;
sf::Text input;
sf::Font* font;
sf::RectangleShape field;
};