Getters and Setters
| 76 | |
| 77 | // Getters and Setters |
| 78 | void TextButton::setText(std::string_view text) { |
| 79 | this->m_pText->setString(text); |
| 80 | |
| 81 | this->m_pBG->setContentSize({ |
| 82 | (this->m_fWidth == 0) ? this->m_pText->getContentSize().width + 32 : this->m_fWidth, |
| 83 | (this->m_fHeight == 0) ? this->m_pText->getContentSize().height + 32 : this->m_fHeight |
| 84 | }); |
| 85 | |
| 86 | this->m_pText->setPosition(this->m_pBG->getContentSize() / 2); |
| 87 | } |
| 88 | |
| 89 | Label* TextButton::getLabel() |
| 90 | { |
nothing calls this directly
no test coverage detected