mirror of https://github.com/axmolengine/axmol.git
38 lines
561 B
C
38 lines
561 B
C
|
#pragma once
|
||
|
|
||
|
#include "axmol.h"
|
||
|
#include "ExtensionMacros.h"
|
||
|
|
||
|
NS_AX_EXT_BEGIN
|
||
|
|
||
|
struct FontAtlasGenParams;
|
||
|
|
||
|
namespace xasset
|
||
|
{
|
||
|
class FontAtlas;
|
||
|
}
|
||
|
class SDFGen
|
||
|
{
|
||
|
public:
|
||
|
static SDFGen* getInstance();
|
||
|
static void destroyInstance();
|
||
|
|
||
|
void open(ax::Scene* = nullptr);
|
||
|
void close();
|
||
|
|
||
|
protected:
|
||
|
void refreshFontList();
|
||
|
|
||
|
void onImGuiDraw();
|
||
|
|
||
|
protected:
|
||
|
FontAtlasGenParams* _atlasParams{nullptr};
|
||
|
|
||
|
ax::Sprite* _atlasViewer{nullptr};
|
||
|
xasset::FontAtlas* _fontAtlas{nullptr};
|
||
|
|
||
|
std::vector<std::string> _fontList;
|
||
|
};
|
||
|
|
||
|
NS_AX_EXT_END
|