mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-02 16:10:43 +00:00
Move drawfunctionoverlay
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "CompassRenderer.h"
|
||||
#include "NodeDB.h"
|
||||
#include "UIRenderer.h"
|
||||
#include "configuration.h"
|
||||
#include "gps/GeoCoord.h"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "DebugRenderer.h"
|
||||
#include "../Screen.h"
|
||||
#include "FSCommon.h"
|
||||
#include "NodeDB.h"
|
||||
#include "Throttle.h"
|
||||
#include "UIRenderer.h"
|
||||
#include "airtime.h"
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "graphics/Screen.h"
|
||||
#include <OLEDDisplay.h>
|
||||
#include <OLEDDisplayUi.h>
|
||||
|
||||
namespace graphics
|
||||
{
|
||||
|
||||
/// Forward declarations
|
||||
class Screen;
|
||||
|
||||
/**
|
||||
* @brief Screen-specific drawing functions
|
||||
*
|
||||
* Contains drawing functions for specific screen types like GPS location,
|
||||
* memory usage, device info, and other specialized screens.
|
||||
*/
|
||||
namespace ScreenRenderer
|
||||
{
|
||||
// Screen frame functions
|
||||
void drawCompassAndLocationScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
void drawMemoryUsage(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
void drawDeviceFocused(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
void drawLoRaFocused(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
|
||||
// Text message screen
|
||||
void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
|
||||
// Module and firmware frames
|
||||
void drawModuleFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
void drawFrameFirmware(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
void drawCriticalFaultFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
|
||||
|
||||
} // namespace ScreenRenderer
|
||||
|
||||
} // namespace graphics
|
||||
@@ -1,9 +1,10 @@
|
||||
#include "UIRenderer.h"
|
||||
#include "../Screen.h"
|
||||
#include "GPSStatus.h"
|
||||
#include "NodeDB.h"
|
||||
#include "NodeListRenderer.h"
|
||||
#include "configuration.h"
|
||||
#include "gps/GeoCoord.h"
|
||||
#include "graphics/Screen.h"
|
||||
#include "graphics/ScreenFonts.h"
|
||||
#include "graphics/SharedUIDisplay.h"
|
||||
#include "graphics/images.h"
|
||||
@@ -1126,6 +1127,18 @@ void drawOEMBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t
|
||||
|
||||
#endif
|
||||
|
||||
// Function overlay for showing mute/buzzer modifiers etc.
|
||||
void drawFunctionOverlay(OLEDDisplay *display, OLEDDisplayUiState *state)
|
||||
{
|
||||
// LOG_DEBUG("Draw function overlay");
|
||||
if (functionSymbol.begin() != functionSymbol.end()) {
|
||||
char buf[64];
|
||||
display->setFont(FONT_SMALL);
|
||||
snprintf(buf, sizeof(buf), "%s", functionSymbolString.c_str());
|
||||
display->drawString(SCREEN_WIDTH - display->getStringWidth(buf), SCREEN_HEIGHT - FONT_HEIGHT_SMALL, buf);
|
||||
}
|
||||
}
|
||||
|
||||
// Navigation bar overlay implementation
|
||||
static int8_t lastFrameIndex = -1;
|
||||
static uint32_t lastFrameChangeTime = 0;
|
||||
|
||||
@@ -48,6 +48,9 @@ void drawScrollbar(OLEDDisplay *display, int visibleItems, int totalItems, int s
|
||||
// Overlay and special screens
|
||||
void drawFrameText(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *text);
|
||||
|
||||
// Function overlay for showing mute/buzzer modifiers etc.
|
||||
void drawFunctionOverlay(OLEDDisplay *display, OLEDDisplayUiState *state);
|
||||
|
||||
// Navigation bar overlay
|
||||
void drawNavigationBar(OLEDDisplay *display, OLEDDisplayUiState *state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user