src/gui/widget/keyboard_input.cpp -add direkt digikey pressed

Origin commit data
------------------
Branch: ni/coolstream
Commit: 983d24cd51
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-11-25 (Fri, 25 Nov 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2016-11-25 18:17:49 +01:00
parent ccd59e1d3a
commit 9ebac10a5b
2 changed files with 22 additions and 0 deletions

View File

@@ -502,6 +502,22 @@ void CKeyboardInput::keyBackspacePressed(void)
}
}
void CKeyboardInput::keyDigiPressed(const neutrino_msg_t key)
{
int old_col = scol;
int old_srow = srow;
int digi = CRCInput::getNumericValue(key);
digi = (digi == 0) ? 10 : digi;
srow = 0;
scol = digi;
if (focus == FOCUS_KEY)
paintKey(old_srow, old_col);
focus = FOCUS_KEY;
paintKey(srow, scol);
NormalKeyPressed();
}
void CKeyboardInput::insertChar()
{
int item = inputSize -1;
@@ -614,6 +630,10 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
{
switchLayout();
}
else if (CRCInput::isNumeric(msg))
{
keyDigiPressed(msg);
}
else if ((msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout))
{
if ((inputString->getValue() != oldval) &&

View File

@@ -104,6 +104,8 @@ class CKeyboardInput : public CMenuTarget
bool force_saveScreen;
fb_pixel_t *pixBuf;
void keyDigiPressed(const neutrino_msg_t key);
virtual void init();
virtual void paint();