Fix save_png definition / New UISprite function
This commit is contained in:
parent
a2684cce7c
commit
455000c02d
|
@ -621,6 +621,7 @@ void Client::registerLuaFunctions()
|
|||
g_lua.bindClassMemberFunction<UISprite>("clearSprite", &UISprite::clearSprite);
|
||||
g_lua.bindClassMemberFunction<UISprite>("getSpriteId", &UISprite::getSpriteId);
|
||||
g_lua.bindClassMemberFunction<UISprite>("setSpriteColor", &UISprite::setSpriteColor);
|
||||
g_lua.bindClassMemberFunction<UISprite>("hasSprite", &UISprite::hasSprite);
|
||||
|
||||
g_lua.registerClass<UICreature, UIWidget>();
|
||||
g_lua.bindClassStaticFunction<UICreature>("create", []{ return UICreaturePtr(new UICreature); } );
|
||||
|
|
|
@ -41,6 +41,8 @@ public:
|
|||
bool isSpriteVisible() { return m_spriteVisible; }
|
||||
void setSpriteVisible(bool visible) { m_spriteVisible = visible; }
|
||||
|
||||
bool hasSprite() { return m_sprite != nullptr; }
|
||||
|
||||
protected:
|
||||
void onStyleApply(const std::string& styleName, const OTMLNodePtr& styleNode);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ struct apng_data {
|
|||
|
||||
// returns -1 on error, 0 on success
|
||||
int load_apng(std::stringstream& file, struct apng_data *apng);
|
||||
void save_png(std::stringstream& file, int width, int height, int channels, unsigned char *pixels);
|
||||
void save_png(std::stringstream& file, unsigned int width, unsigned int height, int channels, unsigned char *pixels);
|
||||
void free_apng(struct apng_data *apng);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue