GWEN improvement: allow to navigate TreeControl and ComboBox using the cursor keys

This commit is contained in:
erwin coumans
2013-07-01 23:43:49 -07:00
parent 898f423f95
commit 0f78c696b5
14 changed files with 458 additions and 17 deletions

View File

@@ -12,6 +12,14 @@
#include "Gwen/Controls/Button.h"
#include "Gwen/Controls/ScrollControl.h"
enum
{
ITERATE_ACTION_OPEN=1,
ITERATE_ACTION_CLOSE,
ITERATE_ACTION_FIND_SELECTED_INDEX,
ITERATE_ACTION_DESELECT_INDEX,
ITERATE_ACTION_SELECT,
};
namespace Gwen
{
@@ -51,6 +59,9 @@ namespace Gwen
virtual void DeselectAll();
virtual void iterate(int action, int* curIndex, int* resultIndex);
Event::Caller onNamePress;
Event::Caller onSelectChange;
Event::Caller onSelect;