diff --git a/yg/skin.cpp b/yg/skin.cpp index 04f2b6ac26..837766a863 100644 --- a/yg/skin.cpp +++ b/yg/skin.cpp @@ -46,7 +46,7 @@ namespace yg { uint8_t pageID = (uint8_t)m_pages.size(); m_pages.push_back(make_shared_ptr(new SkinPage(m_resourceManager, pageID))); - m_pages.back()->addOverflowFn(bind(&Skin::changeCurrentTextPage, this), 0); + m_pages.back()->addOverflowFn(bind(&Skin::onTextOverflow, this, pageID), 0); } } @@ -60,7 +60,7 @@ namespace yg { uint8_t pageID = (uint8_t)m_pages.size(); m_pages.push_back(make_shared_ptr(new SkinPage(m_resourceManager, pageID))); - m_pages.back()->addOverflowFn(bind(&Skin::changeCurrentDynamicPage, this), 0); + m_pages.back()->addOverflowFn(bind(&Skin::onDynamicOverflow, this, pageID), 0); } } @@ -194,12 +194,17 @@ namespace yg /// Called from the skin page on handles overflow. /// Never called on texture overflow, as this situation /// are explicitly checked in the mapXXX() functions. -/* void Skin::onOverflow(uint8_t pageID) + void Skin::onDynamicOverflow(uint8_t pageID) { - LOG(LINFO, ("Called from SkinPage as a reaction on handles overflow for pageID=", (uint32_t)pageID)); + LOG(LINFO, ("DynamicPage switching, pageID=", (uint32_t)pageID)); changeCurrentDynamicPage(); } - */ + + void Skin::onTextOverflow(uint8_t pageID) + { + LOG(LINFO, ("TextPage switching, pageID=", (uint32_t)pageID)); + changeCurrentTextPage(); + } void Skin::changeCurrentDynamicPage() { diff --git a/yg/skin.hpp b/yg/skin.hpp index 2b5a70ac8b..5ced589bab 100644 --- a/yg/skin.hpp +++ b/yg/skin.hpp @@ -93,7 +93,8 @@ namespace yg void callOverflowFns(uint8_t pageID); void clearPageHandles(uint8_t pageID); -// void onOverflow(uint8_t pageID); + void onDynamicOverflow(uint8_t pageID); + void onTextOverflow(uint8_t pageID); void changeCurrentDynamicPage(); void changeCurrentTextPage();