forked from xiaozhi/xiaozhi-esp32
Change LCD display layout from grids to layers (#1438)
* Upgrade component version * update fonts component version * change lcd display layout from grids to layers * Update English README as default * Handle OTA error code
This commit is contained in:
@@ -20,10 +20,12 @@ protected:
|
||||
esp_lcd_panel_handle_t panel_ = nullptr;
|
||||
|
||||
lv_draw_buf_t draw_buf_;
|
||||
lv_obj_t* top_bar_ = nullptr;
|
||||
lv_obj_t* status_bar_ = nullptr;
|
||||
lv_obj_t* content_ = nullptr;
|
||||
lv_obj_t* container_ = nullptr;
|
||||
lv_obj_t* side_bar_ = nullptr;
|
||||
lv_obj_t* bottom_bar_ = nullptr;
|
||||
lv_obj_t* preview_image_ = nullptr;
|
||||
lv_obj_t* emoji_label_ = nullptr;
|
||||
lv_obj_t* emoji_image_ = nullptr;
|
||||
@@ -32,6 +34,7 @@ protected:
|
||||
lv_obj_t* chat_message_label_ = nullptr;
|
||||
esp_timer_handle_t preview_timer_ = nullptr;
|
||||
std::unique_ptr<LvglImage> preview_image_cached_ = nullptr;
|
||||
bool hide_subtitle_ = false; // Control whether to hide chat messages/subtitles
|
||||
|
||||
void InitializeLcdThemes();
|
||||
void SetupUI();
|
||||
@@ -39,7 +42,7 @@ protected:
|
||||
virtual void Unlock() override;
|
||||
|
||||
protected:
|
||||
// 添加protected构造函数
|
||||
// Add protected constructor
|
||||
LcdDisplay(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_handle_t panel, int width, int height);
|
||||
|
||||
public:
|
||||
@@ -50,9 +53,12 @@ public:
|
||||
|
||||
// Add theme switching function
|
||||
virtual void SetTheme(Theme* theme) override;
|
||||
|
||||
// Set whether to hide chat messages/subtitles
|
||||
void SetHideSubtitle(bool hide);
|
||||
};
|
||||
|
||||
// SPI LCD显示器
|
||||
// SPI LCD display
|
||||
class SpiLcdDisplay : public LcdDisplay {
|
||||
public:
|
||||
SpiLcdDisplay(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_handle_t panel,
|
||||
@@ -60,7 +66,7 @@ public:
|
||||
bool mirror_x, bool mirror_y, bool swap_xy);
|
||||
};
|
||||
|
||||
// RGB LCD显示器
|
||||
// RGB LCD display
|
||||
class RgbLcdDisplay : public LcdDisplay {
|
||||
public:
|
||||
RgbLcdDisplay(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_handle_t panel,
|
||||
@@ -68,7 +74,7 @@ public:
|
||||
bool mirror_x, bool mirror_y, bool swap_xy);
|
||||
};
|
||||
|
||||
// MIPI LCD显示器
|
||||
// MIPI LCD display
|
||||
class MipiLcdDisplay : public LcdDisplay {
|
||||
public:
|
||||
MipiLcdDisplay(esp_lcd_panel_io_handle_t panel_io, esp_lcd_panel_handle_t panel,
|
||||
|
||||
Reference in New Issue
Block a user