0 Members and 1 Guest are viewing this topic.
textbutton okbutton(24, 24, 64, 32);okbutton.settext("OK", resmgr.fonts["tuffy"]);
struct textbutton : button{ sf::String text; void settext(std::string newtext, sf::Font newfont); void drawtext(sf::RenderWindow *app); textbutton() : button::button(){}; textbutton(int nx, int ny, int nw, int nh) : button::button(nx, ny, nw, nh){};};void textbutton::settext(std::string newtext, sf::Font newfont){ text.SetFont(newfont); text.SetSize(12);--->text.SetText(newtext);}