Start re-organizing demos so the physics setup can be shared easier (explicit create graphics objects, init/exit physics etc)
Add B3G_RETURN key code, only implemented in Windows so far (todo: Mac, Linux) Fix Windows key management (use WM_CHAR event instead of WM_KEYUP Add Return (OnKeyReturn) key support TreeNode, so we can select an item using the return key.
This commit is contained in:
@@ -38,6 +38,7 @@ namespace Gwen
|
||||
|
||||
virtual void SetText( const UnicodeString& text );
|
||||
virtual void SetText( const String& text );
|
||||
UnicodeString GetText() const;
|
||||
|
||||
virtual void Open();
|
||||
virtual void Close();
|
||||
@@ -60,7 +61,18 @@ namespace Gwen
|
||||
virtual void DeselectAll();
|
||||
|
||||
virtual void iterate(int action, int* curIndex, int* resultIndex);
|
||||
|
||||
virtual bool OnKeyReturn(bool bDown)
|
||||
{
|
||||
static bool prevDown = false;
|
||||
if (!prevDown && bDown)
|
||||
{
|
||||
onReturnKeyDown.Call(this);
|
||||
}
|
||||
prevDown = bDown;
|
||||
return Base::OnKeyReturn(bDown);
|
||||
}
|
||||
|
||||
Event::Caller onReturnKeyDown;
|
||||
|
||||
Event::Caller onNamePress;
|
||||
Event::Caller onSelectChange;
|
||||
|
||||
Reference in New Issue
Block a user