pressing tab switches between textboxes in the deco editor
This commit is contained in:
parent
1266307070
commit
d38b7b9b11
2
.gitignore
vendored
2
.gitignore
vendored
@ -51,7 +51,7 @@ Makefile.me
|
|||||||
*.cbp
|
*.cbp
|
||||||
*.layout
|
*.layout
|
||||||
*.config
|
*.config
|
||||||
*.creator
|
*.creator*
|
||||||
*.files
|
*.files
|
||||||
*.includes
|
*.includes
|
||||||
config.log
|
config.log
|
||||||
|
@ -241,6 +241,20 @@ void ColourPickerActivity::OnMouseUp(int x, int y, unsigned button)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ColourPickerActivity::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt)
|
||||||
|
{
|
||||||
|
if (key == KEY_TAB)
|
||||||
|
{
|
||||||
|
if (rValue->IsFocused())
|
||||||
|
gValue->TabFocus();
|
||||||
|
else if (gValue->IsFocused())
|
||||||
|
bValue->TabFocus();
|
||||||
|
else if (bValue->IsFocused())
|
||||||
|
aValue->TabFocus();
|
||||||
|
else if (aValue->IsFocused())
|
||||||
|
rValue->TabFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ColourPickerActivity::OnDraw()
|
void ColourPickerActivity::OnDraw()
|
||||||
{
|
{
|
||||||
|
@ -36,6 +36,7 @@ public:
|
|||||||
virtual void OnMouseMove(int x, int y, int dx, int dy);
|
virtual void OnMouseMove(int x, int y, int dx, int dy);
|
||||||
virtual void OnMouseDown(int x, int y, unsigned button);
|
virtual void OnMouseDown(int x, int y, unsigned button);
|
||||||
virtual void OnMouseUp(int x, int y, unsigned button);
|
virtual void OnMouseUp(int x, int y, unsigned button);
|
||||||
|
virtual void OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
|
||||||
virtual void OnTryExit(ExitMethod method);
|
virtual void OnTryExit(ExitMethod method);
|
||||||
ColourPickerActivity(ui::Colour initialColour, ColourPickedCallback * callback = NULL);
|
ColourPickerActivity(ui::Colour initialColour, ColourPickedCallback * callback = NULL);
|
||||||
virtual ~ColourPickerActivity();
|
virtual ~ColourPickerActivity();
|
||||||
|
@ -127,6 +127,12 @@ void Textbox::resetCursorPosition()
|
|||||||
Graphics::PositionAtCharIndex(multiline?((char*)textLines.c_str()):((char*)text.c_str()), cursor, cursorPositionX, cursorPositionY);
|
Graphics::PositionAtCharIndex(multiline?((char*)textLines.c_str()):((char*)text.c_str()), cursor, cursorPositionX, cursorPositionY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Textbox::TabFocus()
|
||||||
|
{
|
||||||
|
GetParentWindow()->FocusComponent(this);
|
||||||
|
selectAll();
|
||||||
|
}
|
||||||
|
|
||||||
void Textbox::cutSelection()
|
void Textbox::cutSelection()
|
||||||
{
|
{
|
||||||
char * clipboardText;
|
char * clipboardText;
|
||||||
|
@ -42,6 +42,7 @@ public:
|
|||||||
void SetInputType(ValidInput input);
|
void SetInputType(ValidInput input);
|
||||||
|
|
||||||
void resetCursorPosition();
|
void resetCursorPosition();
|
||||||
|
void TabFocus();
|
||||||
//Determines if the given character is valid given the input type
|
//Determines if the given character is valid given the input type
|
||||||
bool CharacterValid(Uint16 character);
|
bool CharacterValid(Uint16 character);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user