axmol: FairyGUI: Problems with nine patch image when call "setContentScaleFactor"

  • axmol version: 4c59349ac7fa8c89c42cba0f1fb22e96ea029aeb
  • devices test on: ios/macos/android
  • developing environments
    • NDK version: r23c
    • Xcode version: 14.2+
    • Visual Studio:
      • VS version: 2022 (17.9+)
      • MSVC version: 19.39+
      • Windows SDK version: 10.0.22621.0+
    • cmake version: 3.28.1 Steps to Reproduce:
  1. Set setContentScaleFactor in AppDelegate.cpp
  2. Load a FairyGUI with nine patch image

All devices show button wrong. If i keep only the below line in AppDelegate.cpp, it works:

glView->setDesignResolutionSize(frameSize.width, frameSize.height, ResolutionPolicy::SHOW_ALL);

But when i set setContentScaleFactor nine patch images break.

I made an open source sample with code and images:

https://github.com/paulocoutinhox/axmol-ninepatch

Screenshot about the problem:

image

About this issue

  • Original URL
  • State: closed
  • Created 2 months ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

My sample is here: https://github.com/paulocoutinhox/axmol-ninepatch

You can run normally and you will see the problem. It has all sample assets, the same of screenshot.

The FairyGUI project file is missing. It’s the file you open up in the FairyGUI editor, from which you export the dialog.fui file.