Compare commits

...

4 commits

Author SHA1 Message Date
Justin
dc54560b82
Merge 4bd137d97e into d0eb881ebc 2024-08-31 03:44:34 -07:00
SMJS
d0eb881ebc
Fixed a bug where only 1 word wrap variant can exist (#1058)
* Fixed a bug where only 1 word wrap variant can exist

* Made the delimiters a string view
2024-08-31 12:27:38 +02:00
Justin
4bd137d97e
remove space 2024-07-31 17:17:16 -04:00
Justin
2d316da361
Update FiltersPopup.cpp 2024-07-31 17:14:21 -04:00
2 changed files with 2 additions and 1 deletions

View file

@ -103,6 +103,7 @@ bool FiltersPopup::setup(ModListSource* src) {
m_developerNameInput = TextInput::create(inputContainer->getContentWidth(), "Developer Name");
m_developerNameInput->setTextAlign(TextInputAlign::Left);
m_developerNameInput->setFilter("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-");
m_developerNameInput->setString(src->getQuery().developer.value_or(""));
inputContainer->addChildAtPosition(m_developerNameInput, Anchor::Center);

View file

@ -209,7 +209,7 @@ void SimpleTextArea::updateLinesNoWrap() {
void SimpleTextArea::updateLinesWordWrap(bool spaceWrap) {
this->charIteration([this, spaceWrap](CCLabelBMFont* line, const char c, const float top) {
static const std::string delimiters(spaceWrap ? " " : " `~!@#$%^&*()-_=+[{}];:'\",<.>/?\\|");
const std::string_view delimiters(spaceWrap ? " " : " `~!@#$%^&*()-_=+[{}];:'\",<.>/?\\|");
if (delimiters.find(c) == std::string_view::npos) {
const std::string& text = line->getString();