EchoesOfFate
A game for our COMP315 Project
 
Loading...
Searching...
No Matches
Textbox Class Reference

#include <Textbox.h>

Public Member Functions

 Textbox ()
 
 Textbox (int size, Color color, bool sel)
 
void setFont (Font &font)
 
void setPosition (Vector2f pos)
 set the font of the text
 
void setLimit (bool ToF)
 set the position of the text box on the screen
 
void setLimit (bool ToF, int lim)
 method to set a text box with a limit or not
 
void setSelected (bool sel)
 sets the text box with a specifiied limit
 
std::string getText ()
 sets selected to true
 
void drawTo (sf::RenderWindow &window)
 grabs the text of the textbox
 
void typedOn (sf::Event input)
 draws the textbox to the window
 

Constructor & Destructor Documentation

◆ Textbox() [1/2]

Textbox::Textbox ( )
inline

◆ Textbox() [2/2]

Textbox::Textbox ( int size,
Color color,
bool sel )

draws the textbox with the text color and character size

Member Function Documentation

◆ drawTo()

void Textbox::drawTo ( sf::RenderWindow & window)

grabs the text of the textbox

draws the textbox to the window

◆ getText()

std::string Textbox::getText ( )

sets selected to true

returns the text of the textbox

◆ setFont()

void Textbox::setFont ( Font & font)

sets the font of the text

◆ setLimit() [1/2]

void Textbox::setLimit ( bool ToF)

set the position of the text box on the screen

sets the has limit bool value

◆ setLimit() [2/2]

void Textbox::setLimit ( bool ToF,
int lim )

method to set a text box with a limit or not

sets the limit

◆ setPosition()

void Textbox::setPosition ( Vector2f pos)

set the font of the text

sets the position of the text

◆ setSelected()

void Textbox::setSelected ( bool sel)

sets the text box with a specifiied limit

removes the last character of the string

◆ typedOn()

void Textbox::typedOn ( sf::Event input)

draws the textbox to the window

if the textbox is being selected

grabs the unicode of the character

allows all characters, uses unicodes

only writes to textbox if the text is actually within the limit


The documentation for this class was generated from the following files: