(svn r13151) -Codechange: use an enum instead of bool as return type of OnKeyPress/OnCTRLStateChange to make it obvious what the return values mean.

This commit is contained in:
rubidium
2008-05-17 23:11:06 +00:00
parent c1713c9ab7
commit f5681547ef
13 changed files with 85 additions and 81 deletions

View File

@@ -121,16 +121,16 @@ public:
}
}
virtual bool OnKeyPress(uint16 key, uint16 keycode)
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
{
const uint8 i = keycode - '1';
if (i < 9 && i < this->bridges->list_length) {
/* Build the requested bridge */
this->BuildBridge(i);
delete this;
return false;
return ES_HANDLED;
}
return true;
return ES_NOT_HANDLED;
}
virtual void OnClick(Point pt, int widget)