mirror of
https://gitee.com/Polarix/simplegui.git
synced 2025-06-17 05:27:52 +00:00
2022-06-24:
修改文本输入框的示例代码,确保不使用定时器时可以操作。
This commit is contained in:
parent
f01138be5b
commit
25d819f40a
@ -184,14 +184,19 @@ HMI_ENGINE_RESULT HMI_DemoVariableBox_ProcessEvent(SGUI_SCR_DEV* pstDeviceIF, co
|
|||||||
{
|
{
|
||||||
// Stop count down when press space.
|
// Stop count down when press space.
|
||||||
s_uiAutoConfirmTimer = 0;
|
s_uiAutoConfirmTimer = 0;
|
||||||
|
eProcessResult = HMI_DemoVariableBox_RefreshScreen(pstDeviceIF, NULL);
|
||||||
|
RTCTimerEnable(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case EVENT_ID_RTC:
|
case EVENT_ID_RTC:
|
||||||
|
{
|
||||||
|
if(s_uiAutoConfirmTimer > 0)
|
||||||
{
|
{
|
||||||
//Count down five seconds
|
//Count down five seconds
|
||||||
s_uiAutoConfirmTimer--;
|
s_uiAutoConfirmTimer--;
|
||||||
|
}
|
||||||
// Redraw screen if time out.
|
// Redraw screen if time out.
|
||||||
if(0 == s_uiAutoConfirmTimer)
|
else
|
||||||
{
|
{
|
||||||
eProcessResult = HMI_DemoVariableBox_RefreshScreen(pstDeviceIF, NULL);
|
eProcessResult = HMI_DemoVariableBox_RefreshScreen(pstDeviceIF, NULL);
|
||||||
RTCTimerEnable(false);
|
RTCTimerEnable(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user