From ccd59e1d3acdab1dca044a74f39c093f667a064a Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 25 Nov 2016 16:45:26 +0100 Subject: [PATCH 1/2] supplement to 3019b1abdc78b969cfcc59c2aac3b775d0ca8298 Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/91e0f8070b2578ce56b280b13daf942cfaf2a47b Author: Jacek Jendrzej Date: 2016-11-25 (Fri, 25 Nov 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/menue.cpp | 8 ++++++-- src/gui/widget/menue.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 8a2550ceb..d0c30166a 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1395,16 +1395,18 @@ void CMenuWidget::saveScreen() delete[] background; saveScreen_height = full_height+fbutton_height; saveScreen_width = full_width; + saveScreen_y = y; + saveScreen_x = x; background = new fb_pixel_t [saveScreen_height * saveScreen_width]; if(background) - frameBuffer->SaveScreen(x /*-ConnectLineBox_Width*/, y, full_width, saveScreen_height, background); + frameBuffer->SaveScreen(saveScreen_x /*-ConnectLineBox_Width*/, saveScreen_y, saveScreen_width, saveScreen_height, background); } void CMenuWidget::restoreScreen() { if(background) { if(savescreen) - frameBuffer->RestoreScreen(x /*-ConnectLineBox_Width*/, y, saveScreen_width, saveScreen_height, background); + frameBuffer->RestoreScreen(saveScreen_x /*-ConnectLineBox_Width*/, saveScreen_y, saveScreen_width, saveScreen_height, background); } } @@ -1416,6 +1418,8 @@ void CMenuWidget::enableSaveScreen(bool enable) background = NULL; saveScreen_width = 0; saveScreen_height = 0; + saveScreen_y = 0; + saveScreen_x = 0; } } diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 61d6691b4..5da3cc3f5 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -496,6 +496,8 @@ class CMenuWidget : public CMenuTarget, public CComponentsSignals CComponentsHeader *header; unsigned int saveScreen_width ; unsigned int saveScreen_height; + unsigned int saveScreen_y; + unsigned int saveScreen_x; protected: std::string nameString; neutrino_locale_t name; From 9ebac10a5b9f96a448461ecb3efa9efd41067d05 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 25 Nov 2016 18:17:49 +0100 Subject: [PATCH 2/2] src/gui/widget/keyboard_input.cpp -add direkt digikey pressed Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/983d24cd516dcc965dd7333028c8d028ce39d618 Author: Jacek Jendrzej Date: 2016-11-25 (Fri, 25 Nov 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/widget/keyboard_input.cpp | 20 ++++++++++++++++++++ src/gui/widget/keyboard_input.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/src/gui/widget/keyboard_input.cpp b/src/gui/widget/keyboard_input.cpp index 3ff38ab1a..92b5efaeb 100644 --- a/src/gui/widget/keyboard_input.cpp +++ b/src/gui/widget/keyboard_input.cpp @@ -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) && diff --git a/src/gui/widget/keyboard_input.h b/src/gui/widget/keyboard_input.h index 1003e7f39..7af5c1c17 100644 --- a/src/gui/widget/keyboard_input.h +++ b/src/gui/widget/keyboard_input.h @@ -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();