addressed the conflicts, and changed target branch to 2.7-MiscFixes-Week1

This commit is contained in:
csrutil
2025-06-25 08:53:03 +08:00
parent 653f6c2a85
commit 0b1703a51a
2 changed files with 141 additions and 69 deletions

View File

@@ -2,6 +2,8 @@
#include "OLEDDisplay.h"
#include "OLEDDisplayUi.h"
#include "graphics/emotes.h"
#include <string>
#include <vector>
namespace graphics
{
@@ -14,5 +16,27 @@ void drawStringWithEmotes(OLEDDisplay *display, int x, int y, const std::string
/// Draws the text message frame for displaying received messages
void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
// Function to generate lines with word wrapping
std::vector<std::string> generateLines(OLEDDisplay *display,
const char *headerStr,
const char *messageBuf, int textWidth);
// Function to calculate heights for each line
std::vector<int> calculateLineHeights(OLEDDisplay *display,
const std::vector<std::string> &lines,
const Emote *emotes, int emoteCount);
// Function to render the message content
void renderMessageContent(OLEDDisplay *display,
const std::vector<std::string> &lines,
const std::vector<int> &rowHeights,
int x,
int yOffset,
int scrollBottom,
const Emote *emotes,
int numEmotes,
bool isInverted,
bool isBold);
} // namespace MessageRenderer
} // namespace graphics