mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-14 06:42:34 +00:00
* Add mesh/Default.h include. * Reflacter OnScreenKeyBoard Module, do not interrupt keyboard when new message comes. * feat: Add long press scrolling for Joystick and upDown Encoder on baseUI frames and menus. * refactor: Clean up code formatting and improve readability in Screen and OnScreenKeyboardModule * Fix navigation on UpDownEncoder, default was RotaryEncoder while bringing the T_LORA_PAGER * Update src/graphics/draw/MenuHandler.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/modules/OnScreenKeyboardModule.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/graphics/draw/NotificationRenderer.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Optimize the detection logic for repeated events of the arrow keys. * Fixed parameter names in the OnScreenKeyboardModule::start * Trunk fix * Reflator OnScreenKeyboard Input checking, make it simple * Simplify long press logic in OnScreenKeyboardModule. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
53 lines
2.1 KiB
C++
53 lines
2.1 KiB
C++
#pragma once
|
|
|
|
#include "OLEDDisplay.h"
|
|
#include "OLEDDisplayUi.h"
|
|
#include "graphics/Screen.h"
|
|
#include "graphics/VirtualKeyboard.h"
|
|
#include "modules/OnScreenKeyboardModule.h"
|
|
#include <functional>
|
|
#include <string>
|
|
#define MAX_LINES 5
|
|
|
|
namespace graphics
|
|
{
|
|
|
|
class NotificationRenderer
|
|
{
|
|
public:
|
|
static InputEvent inEvent;
|
|
static char inKeypress;
|
|
static int8_t curSelected;
|
|
static char alertBannerMessage[256];
|
|
static uint32_t alertBannerUntil; // 0 is a special case meaning forever
|
|
static const char **optionsArrayPtr;
|
|
static const int *optionsEnumPtr;
|
|
static uint8_t alertBannerOptions; // last x lines are seelctable options
|
|
static std::function<void(int)> alertBannerCallback;
|
|
static uint32_t numDigits;
|
|
static uint32_t currentNumber;
|
|
static VirtualKeyboard *virtualKeyboard;
|
|
static std::function<void(const std::string &)> textInputCallback;
|
|
|
|
static bool pauseBanner;
|
|
|
|
static void resetBanner();
|
|
static void showKeyboardMessagePopupWithTitle(const char *title, const char *content, uint32_t durationMs);
|
|
static void drawBannercallback(OLEDDisplay *display, OLEDDisplayUiState *state);
|
|
static void drawAlertBannerOverlay(OLEDDisplay *display, OLEDDisplayUiState *state);
|
|
static void drawNumberPicker(OLEDDisplay *display, OLEDDisplayUiState *state);
|
|
static void drawNodePicker(OLEDDisplay *display, OLEDDisplayUiState *state);
|
|
static void drawTextInput(OLEDDisplay *display, OLEDDisplayUiState *state);
|
|
static void drawNotificationBox(OLEDDisplay *display, OLEDDisplayUiState *state, const char *lines[MAX_LINES + 1],
|
|
uint16_t totalLines, uint8_t firstOptionToShow, uint16_t maxWidth = 0);
|
|
|
|
static void drawCriticalFaultFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
|
static void drawSSLScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
|
static void drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
|
static bool isOverlayBannerShowing();
|
|
|
|
static graphics::notificationTypeEnum current_notification_type;
|
|
};
|
|
|
|
} // namespace graphics
|