Closed theSlyest closed 1 year ago
Source snippet?
bool HelloWorld::init()
{
if (!Scene::init())
{
return false;
}
_groot = GRoot::create(this);
_groot->retain();
FileUtils::getInstance()->addSearchPath("fui");
UIPackage::addPackage("Futura_White_Black_128");
UIPackage::addPackage("HexGrid");
GObject *grid = UIPackage::createObject("HexGrid", "HexGrid");
grid->setPosition(_groot->getWidth() / 2.f, _groot->getHeight() / 2.f);
_groot->addChild(grid);
return true;
}
Futura_White_Black_128 is a bitmap font. There is a text field using this font in the HexGrid component. The component is displayed, but the text field appears with a wrong font and I get the following message:
axmol: fullPathForFilename: No file found at ui://6jswxvktmvpka. Possible missing file.
Where is this font (path correct, extension)? try this:
UIPackage::addPackage("fui/Futura_White_Black_128"); / / extension is missed?
UIPackage::addPackage("fui/HexGrid");
You don't need the extension when loading FairyGUI files. And this problem is also present in the FairyGUI test.
Wich FairyGUI test?
axmol/tests/fairyguitest-tests
Ok I have seen it: Cocos creator example: (https://www.fairygui.com/cocos-demo/)
Axmol example (FairyGUI extension):
I think the reason is: Not all is configuered on the "Basics.fui" Comparing both shows more differents (mostly axmol FairyGUI extension has a better demo example. "Basics.fui" is designed with the FairyGUI editor)
I have no time to check it with the FairyGUI editor. If there a missing part better write an issue on the FairyGUI extension page?
@halx99: maybe a label like: 'extension issue' or 'demo issue' is also helpfully?
It seems to be a FairyGUI bug (see preview)
I checked it on the FairyGUI Editor: Here the preview on the editor (Bitmap Font is not correct)
I just ran it with Cocos2d-x 4.0 and it works perfectly fine. After a small investigation, I think the glitches are caused by some of the changes in FontAtlasCache
or FileUtils
. Specifically, in the implementation of the method:
FontAtlas* FontAtlasCache::getFontAtlasFNT(...)
@theSlyest maybe the title is wrong?
@theSlyest Any chance you could try to re-add the code removed in this commit and see if it works correctly?
https://github.com/axmolengine/axmol/commit/6f4fe63208f768f1f297adb81dc23f8a0e1b72f7
@theSlyest Any chance you could try to re-add the code removed in this commit and see if it works correctly?
Ok, I'll try
It requires more changes to be reverted. I can not test it for now.
@theSlyest Any chance you could try to re-add the code removed in this commit and see if it works correctly?
Rebuild with the "latest" changes BEFORE [6f4fe63]
Edit: test it with axmol-1.0.0b7 too BitmapFont issue is same
Test it on axmol-adxe-1.0-b3
also. (VS2022 64bit)
got an exeption on runtuime (is not usefull for comparing)
I have no longer VS2019, I cannot build older versions of axmol.
adxe-1.0-a9
is the first one with the extension FairyGUI
adxe-1.0-a9
is the first one with the extension FairyGUI
I'll test out that version since I still have VS2019 installed.
No luck testing adxe-1.0-a9
, since I can't download the external libraries from anywhere:
==> Prepare to download external libraries!
==> version file doesn't exist
==> Ready to download 'v56.zip' from 'https://github.com/c4games/engine-x-3rd/archive/v56.zip'
==> Error: Could not find the file from url: 'https://github.com/c4games/engine-x-3rd/archive/v56.zip'
==> Http request failed, error code: 404, reason: Not Found
That link doesn't exist any longer, and I don't have copies of the external library zip files. @halx99 Would you by any chance have all the external zip files, and if possible, upload them somewhere, like the https://github.com/axmolengine/archive
repo?
I prefer to check this issue in current version
I prefer to check this issue in current version
Fair enough, then no point wasting time testing the older versions.
Steps to Reproduce:
The the text field does not display the selected font, and there is an error message in the console log: