Compare commits

...

4 commits

Author SHA1 Message Date
Justin
aadf146625
Merge 4bd137d97e into d95a43be0b 2024-09-02 16:25:53 -04:00
altalk23
d95a43be0b fix scroll layer when anchor point is not ignored 2024-09-02 23:23:13 +03: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 5 additions and 4 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

@ -29,11 +29,11 @@ void ScrollLayer::visit() {
glEnable(GL_SCISSOR_TEST);
if (this->getParent()) {
CCPoint const offset = this->isIgnoreAnchorPointForPosition()
? ccp(0, 0) : CCPoint(this->getContentSize() * -this->getAnchorPoint());
// CCPoint const offset = this->isIgnoreAnchorPointForPosition()
// ? ccp(0, 0) : CCPoint(this->getContentSize() * -this->getAnchorPoint());
auto const bottomLeft = this->convertToWorldSpace(ccp(0, 0) - offset);
auto const topRight = this->convertToWorldSpace(this->getContentSize() - offset);
auto const bottomLeft = this->convertToWorldSpace(ccp(0, 0));
auto const topRight = this->convertToWorldSpace(this->getContentSize());
CCSize const size = topRight - bottomLeft;
CCEGLView::get()->setScissorInPoints(bottomLeft.x, bottomLeft.y, size.width, size.height);