diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index ea5ab978..9e8bbc85 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -1057,7 +1057,13 @@ static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - heart_height) / 2 + 2 + 5, heart_width, heart_height, heart); } else { snprintf(tempBuf, sizeof(tempBuf), "%s", mp.decoded.payload.bytes); - display->drawStringMaxWidth(0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), tempBuf); + #if defined(T_DECK) || defined(CHATTER_2) + display->setFont(FONT_MEDIUM); + display->drawStringMaxWidth(0 + x, 0 + y + FONT_HEIGHT_MEDIUM, x + display->getWidth(), tempBuf); + #else + display->setFont(FONT_SMALL); + display->drawStringMaxWidth(0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), tempBuf); + #endif } #else snprintf(tempBuf, sizeof(tempBuf), "%s", mp.decoded.payload.bytes); @@ -2732,4 +2738,4 @@ int Screen::handleAdminMessage(const meshtastic_AdminMessage *arg) } // namespace graphics #else graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {} -#endif // HAS_SCREEN \ No newline at end of file +#endif // HAS_SCREEN diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index 4df5a03f..e9c5b946 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -201,6 +201,12 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event) this->payload = 0xb4; } else if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT)) { this->payload = 0xb7; + #ifdef T_DECK + } else if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_UP)) { + this->payload = 0xb5; + } else if (event->inputEvent == static_cast(meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_DOWN)) { + this->payload = 0xb6; + #endif } } else { // pass the pressed key @@ -593,6 +599,14 @@ int32_t CannedMessageModule::runOnce() this->cursor--; } break; + #ifdef T_DECK + case 0xb5: // up + this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NODE; + break; + case 0xb6: // down + this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE; + break; + #endif case 0x09: // tab if (this->destSelect == CANNED_MESSAGE_DESTINATION_TYPE_CHANNEL) { this->destSelect = CANNED_MESSAGE_DESTINATION_TYPE_NONE; @@ -1048,9 +1062,17 @@ void CannedMessageModule::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *st display->drawString(x + display->getWidth() - display->getStringWidth(buffer), y + 0, buffer); } display->setColor(WHITE); - display->drawStringMaxWidth( - 0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), - cannedMessageModule->drawWithCursor(cannedMessageModule->freetext, cannedMessageModule->cursor)); + #if defined(T_DECK) || defined(CHATTER_2) + display->setFont(FONT_MEDIUM); + display->drawStringMaxWidth( + 0 + x, 0 + y + FONT_HEIGHT_MEDIUM, x + display->getWidth(), + cannedMessageModule->drawWithCursor(cannedMessageModule->freetext, cannedMessageModule->cursor)); + #else + display->setFont(FONT_SMALL); + display->drawStringMaxWidth( + 0 + x, 0 + y + FONT_HEIGHT_SMALL, x + display->getWidth(), + cannedMessageModule->drawWithCursor(cannedMessageModule->freetext, cannedMessageModule->cursor)); + #endif #endif } else { if (this->messagesCount > 0) { @@ -1220,4 +1242,4 @@ String CannedMessageModule::drawWithCursor(String text, int cursor) return result; } -#endif \ No newline at end of file +#endif