fix issue: all slide page would response user touch action

This commit is contained in:
idea4good 2019-05-17 13:19:46 +08:00
parent 433a31ecee
commit 7fbb81bcfc
2 changed files with 20 additions and 0 deletions

View File

@ -152,3 +152,21 @@ void c_slide_group::disabel_all_slide()
}
}
}
bool c_slide_group::on_touch(int x, int y, TOUCH_ACTION action)
{
if (m_slides[m_active_slide_index])
{
m_slides[m_active_slide_index]->on_touch(x, y, action);
}
return true;
}
bool c_slide_group::on_key(KEY_TYPE key)
{
if (m_slides[m_active_slide_index])
{
m_slides[m_active_slide_index]->on_key(key);
}
return true;
}

View File

@ -17,6 +17,8 @@ public:
short width, short height, WND_TREE* p_child_tree = NULL,
Z_ORDER_LEVEL max_zorder = Z_ORDER_LEVEL_0);
void disabel_all_slide();
virtual bool c_slide_group::on_touch(int x, int y, TOUCH_ACTION action);
virtual bool on_key(KEY_TYPE key);
protected:
virtual c_wnd* clone(){return new c_slide_group();}
c_wnd* m_slides[MAX_PAGES];