Skip to content

Commit

Permalink
🎨 Add DWIN_StatusChanged_P
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 25, 2021
1 parent 91db603 commit 52718f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Marlin/src/lcd/dwin/e3v2/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4128,6 +4128,12 @@ void DWIN_StatusChanged(const char *text) {
DWIN_UpdateLCD();
}

void DWIN_StatusChanged_P(PGM_P const pstr) {
char str[strlen_P((const char*)pstr) + 1];
strcpy_P(str, (const char*)pstr);
DWIN_StatusChanged(str);
}

// GUI extension
void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode=false) {
DWIN_Draw_String(false,true,font8x16,Select_Color,bcolor,x+4,y,F(mode ? "x" : " "));
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/lcd/dwin/e3v2/dwin.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ void DWIN_Update();
void EachMomentUpdate();
void DWIN_HandleScreen();
void DWIN_StatusChanged(const char *text);
void DWIN_StatusChanged_P(PGM_P const pstr);
void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode /* = false*/);

inline void DWIN_StartHoming() { HMI_flag.home_flag = true; }
Expand Down

0 comments on commit 52718f3

Please sign in to comment.