17 Textbox(
int size, Color color,
bool sel);
24 void drawTo(sf::RenderWindow& window);
28 std:: ostringstream text;
33 void inputLogic(
int charTyped) {
35 text << static_cast<char>(charTyped);
38 if (text.str().length() > 0) {
43 textbox.setString(text.str() +
"_");
47 void deleteLastChar() {
48 std::string t = text.str();
49 std::string newT =
"";
50 for (
int i = 0; i < t.length() - 1; i++) {
58 textbox.setString(text.str());
#define DELETE_KEY
sepcial case for the key to have a proper function when typed instead of displaying a unicode value
Definition Textbox.h:7
void setPosition(Vector2f pos)
set the font of the text
Definition Textbox.cpp:20
void setLimit(bool ToF)
set the position of the text box on the screen
Definition Textbox.cpp:24
void typedOn(sf::Event input)
draws the textbox to the window
Definition Textbox.cpp:51
std::string getText()
sets selected to true
Definition Textbox.cpp:43
void setFont(Font &font)
Definition Textbox.cpp:16
void setSelected(bool sel)
sets the text box with a specifiied limit
Definition Textbox.cpp:32
void drawTo(sf::RenderWindow &window)
grabs the text of the textbox
Definition Textbox.cpp:47