Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui::Text is not displayed (v3.17.2) #19992

Closed
seventhrank opened this issue Jul 26, 2019 · 3 comments
Closed

ui::Text is not displayed (v3.17.2) #19992

seventhrank opened this issue Jul 26, 2019 · 3 comments

Comments

@seventhrank
Copy link

seventhrank commented Jul 26, 2019

  • cocos2d-x version: 3.17.2 (C++)
  • devices test on: Android Nexus5
  • developing environments
    • NDK version: r19c
    • sdkbox IAP 2.4.3.3

ui::Text is not displayed at the "onSuccess" event after purchase (sdkbox IAP).

void ShopLayer::onSuccess(const Product &p)
{
    ui::Text *text = ui::Text::create();
    text->setPosition(Vec2(300.f, 300.f));
    text->setString("aaaaa");
    text->setFontSize(33);
    addChild(text);
}

It is displayed in 3.17.1

can work this issue below

void ShopLayer::onSuccess(const Product &p)
{
    scheduleOnce( [this](float f){
        ui::Text *text = ui::Text::create();
        text->setPosition(Vec2(300.f, 300.f));
        text->setString("aaaaa");
        text->setFontSize(33);
        addChild(text);
    }, 0.1f, "aaa");
}
@minggo
Copy link
Contributor

minggo commented Jul 29, 2019

I think i may caused by #19256. You can un comment super.onPause();.

@seventhrank
Copy link
Author

seventhrank commented Jul 29, 2019

It worked when commenting out super.onPause(); of Cocos2dxGLSurfaceView.java

@minggo
Copy link
Contributor

minggo commented Jul 30, 2019

i sent #19996 to fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants