6MenuItemTextbox::MenuItemTextbox(std::string label,
int id,
int width, std::string initial):
22 if ((
int)(this->currentText.size()) > (this->width))
23 window->
print(this->currentText.substr(this->width), (posx - this->width), y, Globals::Theme::textbox);
25 window->
print(this->currentText, (posx - this->width), y, Globals::Theme::textbox);
27 int spacex = (posx - this->width) - this->currentText.size();
30 for (
unsigned int i = 0; i < (this->width - this->currentText.size()); i++)
31 window->
printChar(
' ', spacex + i, y, Globals::Theme::textbox);
void print(std::string str, int x, int y, ColorPair pair=0)
Shows text #str at x y on the window with color #pair.