mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-30 03:43:44 -04:00
EGD-2180 put GUI_REFERSH_FAST in the parent method
This commit is contained in:
@@ -85,28 +85,16 @@ void NotesMainWindow::onBeforeShow( ShowMode mode, SwitchData* data ) {
|
||||
}
|
||||
|
||||
bool NotesMainWindow::onInput( const InputEvent& inputEvent ) {
|
||||
//check if any of the lower inheritance onInput methods catch the event
|
||||
if( AppWindow::onInput( inputEvent ) ) {
|
||||
//refresh window only when key is other than enter
|
||||
if( inputEvent.keyCode != KeyCode::KEY_ENTER )
|
||||
application->render( RefreshModes::GUI_REFRESH_FAST );
|
||||
return true;
|
||||
}
|
||||
|
||||
//process only if key is released
|
||||
if(( inputEvent.state != InputEvent::State::keyReleasedShort ) &&
|
||||
(( inputEvent.state != InputEvent::State::keyReleasedLong )))
|
||||
return false;
|
||||
|
||||
if( inputEvent.keyCode == KeyCode::KEY_ENTER ) {
|
||||
LOG_INFO("Enter pressed");
|
||||
}
|
||||
else if( inputEvent.keyCode == KeyCode::KEY_LEFT ) {
|
||||
application->switchWindow( "EditWindow" );
|
||||
return true;
|
||||
if(( inputEvent.state != InputEvent::State::keyReleasedShort ) || ( inputEvent.state != InputEvent::State::keyReleasedLong )) {
|
||||
if( inputEvent.keyCode == KeyCode::KEY_LEFT ) {
|
||||
application->switchWindow( "EditWindow" );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return AppWindow::onInput( inputEvent );
|
||||
}
|
||||
|
||||
bool NotesMainWindow::onDatabaseMessage( sys::Message* msgl ) {
|
||||
|
||||
Reference in New Issue
Block a user