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:
@@ -49,17 +49,28 @@ namespace Gwen
|
||||
virtual void SetImage( const TextObject& strName, bool bCenter = false );
|
||||
|
||||
// You can use this to trigger OnPress directly from other controls using GWEN_CALL_EX
|
||||
virtual void ReceiveEventPress( Base* /*pControl*/ ){ OnPress(); }
|
||||
virtual void ReceiveEventPress( Base* /*pControl*/ )
|
||||
{
|
||||
OnPress();
|
||||
}
|
||||
|
||||
virtual void SizeToContents();
|
||||
virtual void Layout( Skin::Base* pSkin );
|
||||
|
||||
virtual bool OnKeyReturn(bool bDown)
|
||||
{
|
||||
onKeyboardReturn.Call(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Gwen::Event::Caller onPress;
|
||||
Gwen::Event::Caller onDown;
|
||||
Gwen::Event::Caller onUp;
|
||||
Gwen::Event::Caller onDoubleClick;
|
||||
Gwen::Event::Caller onKeyboardReturn;
|
||||
|
||||
Gwen::Event::Caller onToggle;
|
||||
Gwen::Event::Caller onToggleOn;
|
||||
Gwen::Event::Caller onToggleOff;
|
||||
|
||||
Reference in New Issue
Block a user