mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2026-01-02 12:27:22 +08:00
!26 remove clone & core_include/widgets_include; support keyboard input
This commit is contained in:
@@ -41,10 +41,22 @@ void c_edit::set_text(const char* str)
|
||||
}
|
||||
}
|
||||
|
||||
bool c_edit::on_touch(int x, int y, TOUCH_ACTION action)
|
||||
void c_edit::on_key(KEY_TYPE key)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
case KEY_ENTER:
|
||||
(m_status == STATUS_PUSHED) ? s_keyboard.on_key(key) : (on_touch(m_wnd_rect.m_left, m_wnd_rect.m_top, TOUCH_DOWN), on_touch(m_wnd_rect.m_left, m_wnd_rect.m_top, TOUCH_UP));
|
||||
return;
|
||||
case KEY_BACKWARD:
|
||||
case KEY_FORWARD:
|
||||
return (m_status == STATUS_PUSHED) ? s_keyboard.on_key(key) : c_wnd::on_key(key);
|
||||
}
|
||||
}
|
||||
|
||||
void c_edit::on_touch(int x, int y, TOUCH_ACTION action)
|
||||
{
|
||||
(action == TOUCH_DOWN) ? on_touch_down(x, y) : on_touch_up(x, y);
|
||||
return true;
|
||||
}
|
||||
|
||||
void c_edit::on_touch_down(int x, int y)
|
||||
|
||||
Reference in New Issue
Block a user