mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
src/gui/widget/keyboard_input.cpp -add direkt digikey pressed
This commit is contained in:
@@ -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) &&
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user