refactor wnd.cpp

This commit is contained in:
idea4good
2019-09-12 17:05:37 +08:00
parent 5b1bd4f387
commit f7ac16b4db
6 changed files with 19 additions and 49 deletions

View File

@@ -40,7 +40,7 @@ bool c_button::on_touch(int x, int y, TOUCH_ACTION action)
{
m_status = STATUS_FOCUSED;
on_paint();
notify_parent(GL_BN_CLICKED, get_id(), 0);
notify_parent(GL_BN_CLICKED, 0);
}
return true;
}
@@ -49,7 +49,7 @@ bool c_button::on_key(KEY_TYPE key)
{
if (key == KEY_ENTER)
{
notify_parent(GL_BN_CLICKED, get_id(), 0);
notify_parent(GL_BN_CLICKED, 0);
return false;// Do not handle KEY_ENTER by other wnd.
}
return true;// Handle KEY_FOWARD/KEY_BACKWARD by parent wnd.