Browse Source

Translatable strings on Ender-3 V2 DWIN (#19053)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
Steven Haigh 5 years ago
parent
commit
563eda4b6b
No account linked to committer's email address
2 changed files with 215 additions and 179 deletions
  1. 211
    175
      Marlin/src/lcd/dwin/dwin.cpp
  2. 4
    4
      Marlin/src/lcd/dwin/dwin.h

+ 211
- 175
Marlin/src/lcd/dwin/dwin.cpp View File

@@ -190,23 +190,23 @@ float last_zoffset = 0, last_probe_zoffset = 0;
190 190
 #define DWIN_LANGUAGE_EEPROM_ADDRESS 0x01   // Between 0x01 and 0x63 (EEPROM_OFFSET-1)
191 191
                                             // BL24CXX::check() uses 0x00
192 192
 
193
-void lcd_select_language(void) {
194
-  BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language_flag, sizeof(HMI_flag.language_flag));
195
-  if (HMI_flag.language_flag)
193
+void HMI_SetLanguage(void) {
194
+  BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language_chinese, sizeof(HMI_flag.language_chinese));
195
+  if (HMI_flag.language_chinese)
196 196
     DWIN_JPG_CacheTo1(Language_Chinese);
197 197
   else
198 198
     DWIN_JPG_CacheTo1(Language_English);
199 199
 }
200 200
 
201
-void set_english_to_eeprom(void) {
202
-  HMI_flag.language_flag = 0;
201
+void HMI_SetAndSaveLanguageWestern(void) {
202
+  HMI_flag.language_chinese = false;
203 203
   DWIN_JPG_CacheTo1(Language_English);
204
-  BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language_flag, sizeof(HMI_flag.language_flag));
204
+  BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language_chinese, sizeof(HMI_flag.language_chinese));
205 205
 }
206
-void set_chinese_to_eeprom(void) {
207
-  HMI_flag.language_flag = 1;
206
+void HMI_SetAndSaveLanguageChinese(void) {
207
+  HMI_flag.language_chinese = true;
208 208
   DWIN_JPG_CacheTo1(Language_Chinese);
209
-  BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language_flag, sizeof(HMI_flag.language_flag));
209
+  BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language_chinese, sizeof(HMI_flag.language_chinese));
210 210
 }
211 211
 
212 212
 void show_plus_or_minus(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) {
@@ -223,14 +223,14 @@ void show_plus_or_minus(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNu
223 223
 void ICON_Print() {
224 224
   if (select_page.now == 0) {
225 225
     DWIN_ICON_Show(ICON, ICON_Print_1, 17, 130);
226
-    if (HMI_flag.language_flag)
226
+    if (HMI_flag.language_chinese)
227 227
       DWIN_Frame_AreaCopy(1, 1, 447, 271 - 243, 479 - 19, 58, 201);
228 228
     else
229 229
       DWIN_Frame_AreaCopy(1, 1, 451, 271 - 240, 479 - 16, 72 - 15, 201);
230 230
   }
231 231
   else {
232 232
     DWIN_ICON_Show(ICON, ICON_Print_0, 17, 130);
233
-    if (HMI_flag.language_flag)
233
+    if (HMI_flag.language_chinese)
234 234
       DWIN_Frame_AreaCopy(1, 1, 405, 271 - 243, 420, 58, 201);
235 235
     else
236 236
       DWIN_Frame_AreaCopy(1, 1, 423, 271 - 240, 423 + 12, 72 - 15, 201);
@@ -240,14 +240,14 @@ void ICON_Print() {
240 240
 void ICON_Prepare() {
241 241
   if (select_page.now == 1) {
242 242
     DWIN_ICON_Show(ICON, ICON_Prepare_1, 145, 130);
243
-    if (HMI_flag.language_flag)
243
+    if (HMI_flag.language_chinese)
244 244
       DWIN_Frame_AreaCopy(1, 31, 447, 271 - 213, 479 - 19, 186, 201);
245 245
     else
246 246
       DWIN_Frame_AreaCopy(1, 33, 451, 271 - 189, 479 - 13, 200 - 25, 201);
247 247
   }
248 248
   else {
249 249
     DWIN_ICON_Show(ICON, ICON_Prepare_0, 145, 130);
250
-    if (HMI_flag.language_flag)
250
+    if (HMI_flag.language_chinese)
251 251
       DWIN_Frame_AreaCopy(1, 31, 405, 271 - 213, 420, 186, 201);
252 252
     else
253 253
       DWIN_Frame_AreaCopy(1, 33, 423, 271 - 189, 423 + 15, 200 - 25, 201);
@@ -257,14 +257,14 @@ void ICON_Prepare() {
257 257
 void ICON_Control() {
258 258
   if (select_page.now == 2) {
259 259
     DWIN_ICON_Show(ICON, ICON_Control_1, 17, 246);
260
-    if (HMI_flag.language_flag)
260
+    if (HMI_flag.language_chinese)
261 261
       DWIN_Frame_AreaCopy(1, 61, 447, 271 - 183, 479 - 19, 58, 318);
262 262
     else
263 263
       DWIN_Frame_AreaCopy(1, 85, 451, 271 - 139, 479 - 16, 72 - 24, 318);
264 264
   }
265 265
   else {
266 266
     DWIN_ICON_Show(ICON, ICON_Control_0, 17, 246);
267
-    if (HMI_flag.language_flag)
267
+    if (HMI_flag.language_chinese)
268 268
       DWIN_Frame_AreaCopy(1, 61, 405, 271 - 183, 420, 58, 318);
269 269
     else
270 270
       DWIN_Frame_AreaCopy(1, 85, 423, 271 - 139, 479 - 45, 72 - 24, 318);
@@ -274,14 +274,14 @@ void ICON_Control() {
274 274
 void ICON_StartInfo(bool show) {
275 275
   if (show) {
276 276
     DWIN_ICON_Show(ICON, ICON_Info_1, 145, 246);
277
-    if (HMI_flag.language_flag)
277
+    if (HMI_flag.language_chinese)
278 278
       DWIN_Frame_AreaCopy(1, 91, 447, 271 - 153, 479 - 19, 186, 318);
279 279
     else
280 280
       DWIN_Frame_AreaCopy(1, 132, 451, 159, 479 - 13, 186, 318);
281 281
   }
282 282
   else {
283 283
     DWIN_ICON_Show(ICON, ICON_Info_0, 145, 246);
284
-    if (HMI_flag.language_flag)
284
+    if (HMI_flag.language_chinese)
285 285
       DWIN_Frame_AreaCopy(1, 91, 405, 271 - 153, 420, 186, 318);
286 286
     else
287 287
       DWIN_Frame_AreaCopy(1, 132, 423, 159, 423 + 12, 186, 318);
@@ -291,14 +291,14 @@ void ICON_StartInfo(bool show) {
291 291
 void ICON_Leveling(bool show) {
292 292
   if (show) {
293 293
     DWIN_ICON_Show(ICON, ICON_Leveling_1, 145, 246);
294
-    if (HMI_flag.language_flag)
294
+    if (HMI_flag.language_chinese)
295 295
       DWIN_Frame_AreaCopy(1, 211, 447, 238, 479 - 19, 186, 318);
296 296
     else
297 297
       DWIN_Frame_AreaCopy(1, 84, 437, 120,  449, 200 - 18, 318);
298 298
   }
299 299
   else {
300 300
     DWIN_ICON_Show(ICON, ICON_Leveling_0, 145, 246);
301
-    if (HMI_flag.language_flag)
301
+    if (HMI_flag.language_chinese)
302 302
       DWIN_Frame_AreaCopy(1, 211, 405, 238, 420, 186, 318);
303 303
     else
304 304
       DWIN_Frame_AreaCopy(1, 84, 465, 120, 478, 200 - 18, 318);
@@ -308,14 +308,14 @@ void ICON_Leveling(bool show) {
308 308
 void ICON_Tune() {
309 309
   if (select_print.now == 0) {
310 310
     DWIN_ICON_Show(ICON, ICON_Setup_1, 8, 252);
311
-    if (HMI_flag.language_flag)
311
+    if (HMI_flag.language_chinese)
312 312
       DWIN_Frame_AreaCopy(1, 121, 447, 271 - 123, 479 - 21, 34, 325);
313 313
     else
314 314
       DWIN_Frame_AreaCopy(1, 1, 465, 271 - 237, 479 - 2, 48 - 17, 325);
315 315
   }
316 316
   else {
317 317
     DWIN_ICON_Show(ICON, ICON_Setup_0, 8, 252);
318
-    if (HMI_flag.language_flag)
318
+    if (HMI_flag.language_chinese)
319 319
       DWIN_Frame_AreaCopy(1, 121, 405, 271 - 123, 420, 34, 325);
320 320
     else
321 321
       DWIN_Frame_AreaCopy(1, 1, 438, 271 - 239, 479 - 31, 48 - 17, 325);
@@ -325,14 +325,14 @@ void ICON_Tune() {
325 325
 void ICON_Pause() {
326 326
   if (select_print.now == 1) {
327 327
     DWIN_ICON_Show(ICON, ICON_Pause_1, 96, 252);
328
-    if (HMI_flag.language_flag)
328
+    if (HMI_flag.language_chinese)
329 329
       DWIN_Frame_AreaCopy(1, 181, 447, 271 - 63, 479 - 20, 124, 325);
330 330
     else
331 331
       DWIN_Frame_AreaCopy(1, 177, 451, 271 - 55, 479 - 17, 136 - 20, 325);
332 332
   }
333 333
   else {
334 334
     DWIN_ICON_Show(ICON, ICON_Pause_0, 96, 252);
335
-    if (HMI_flag.language_flag)
335
+    if (HMI_flag.language_chinese)
336 336
       DWIN_Frame_AreaCopy(1, 181, 405, 271 - 63, 420, 124, 325);
337 337
     else
338 338
       DWIN_Frame_AreaCopy(1, 177, 423, 271 - 56, 479 - 46, 136 - 20, 325);
@@ -342,14 +342,14 @@ void ICON_Pause() {
342 342
 void ICON_Continue() {
343 343
   if (select_print.now == 1) {
344 344
     DWIN_ICON_Show(ICON, ICON_Continue_1, 96, 252);
345
-    if (HMI_flag.language_flag)
345
+    if (HMI_flag.language_chinese)
346 346
       DWIN_Frame_AreaCopy(1, 1, 447, 271 - 243, 479 - 19, 124, 325);
347 347
     else
348 348
       DWIN_Frame_AreaCopy(1, 1, 451, 271 - 239, 479 - 16, 136 - 15, 325);
349 349
   }
350 350
   else {
351 351
     DWIN_ICON_Show(ICON, ICON_Continue_0, 96, 252);
352
-    if (HMI_flag.language_flag)
352
+    if (HMI_flag.language_chinese)
353 353
       DWIN_Frame_AreaCopy(1, 1, 405, 271 - 243, 420, 124, 325);
354 354
     else
355 355
       DWIN_Frame_AreaCopy(1, 1, 424, 271 - 240, 479 - 45, 136 - 15, 325);
@@ -359,14 +359,14 @@ void ICON_Continue() {
359 359
 void ICON_Stop() {
360 360
   if (select_print.now == 2) {
361 361
     DWIN_ICON_Show(ICON, ICON_Stop_1, 184, 252);
362
-    if (HMI_flag.language_flag)
362
+    if (HMI_flag.language_chinese)
363 363
       DWIN_Frame_AreaCopy(1, 151, 447, 271 - 93, 479 - 20, 210, 325);
364 364
     else
365 365
       DWIN_Frame_AreaCopy(1, 218, 451, 271 - 22, 479 - 14, 224 - 15, 325);
366 366
   }
367 367
   else {
368 368
     DWIN_ICON_Show(ICON, ICON_Stop_0, 184, 252);
369
-    if (HMI_flag.language_flag)
369
+    if (HMI_flag.language_chinese)
370 370
       DWIN_Frame_AreaCopy(1, 151, 405, 271 - 93, 420, 210, 325);
371 371
     else
372 372
       DWIN_Frame_AreaCopy(1, 218, 423, 271 - 24, 479 - 43, 224 - 15, 325);
@@ -454,7 +454,7 @@ inline void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char
454 454
 
455 455
 // The "Back" label is always on the first line
456 456
 inline void Draw_Back_Label(void) {
457
-  if (HMI_flag.language_flag)
457
+  if (HMI_flag.language_chinese)
458 458
     DWIN_Frame_AreaCopy(1, 129, 72, 271 - 115, 479 - 395, LBLX, MBASE(0));
459 459
   else
460 460
     DWIN_Frame_AreaCopy(1, 226, 179, 271 - 15, 479 - 290, LBLX, MBASE(0));
@@ -476,7 +476,7 @@ inline void draw_move_en(const uint16_t line) {
476 476
 }
477 477
 
478 478
 inline void Prepare_Item_Move(const uint8_t row) {
479
-  if (HMI_flag.language_flag)
479
+  if (HMI_flag.language_chinese)
480 480
     DWIN_Frame_AreaCopy(1, 159, 70, 271 - 71, 479 - 395, LBLX, MBASE(row));
481 481
   else
482 482
     draw_move_en(MBASE(row)); // "Move >"
@@ -485,7 +485,7 @@ inline void Prepare_Item_Move(const uint8_t row) {
485 485
 }
486 486
 
487 487
 inline void Prepare_Item_Disable(const uint8_t row) {
488
-  if (HMI_flag.language_flag)
488
+  if (HMI_flag.language_chinese)
489 489
     DWIN_Frame_AreaCopy(1, 204, 70, 271 - 12, 479 - 397, LBLX, MBASE(row));
490 490
   else
491 491
     DWIN_Frame_AreaCopy(1, 103, 59, 271 - 71, 479 - 405, LBLX, MBASE(row)); // "Disable Stepper"
@@ -493,7 +493,7 @@ inline void Prepare_Item_Disable(const uint8_t row) {
493 493
 }
494 494
 
495 495
 inline void Prepare_Item_Home(const uint8_t row) {
496
-  if (HMI_flag.language_flag)
496
+  if (HMI_flag.language_chinese)
497 497
     DWIN_Frame_AreaCopy(1, 0, 89, 271 - 230, 479 - 378, LBLX, MBASE(row));
498 498
   else
499 499
     DWIN_Frame_AreaCopy(1, 202, 61, 271 - 0, 479 - 408, LBLX, MBASE(row)); // "Auto Home"
@@ -501,7 +501,7 @@ inline void Prepare_Item_Home(const uint8_t row) {
501 501
 }
502 502
 
503 503
 inline void Prepare_Item_Offset(const uint8_t row) {
504
-  if (HMI_flag.language_flag) {
504
+  if (HMI_flag.language_chinese) {
505 505
     #if HAS_BED_PROBE
506 506
       DWIN_Frame_AreaCopy(1, 174, 164, 271 - 48, 479 - 302, LBLX, MBASE(row));
507 507
       show_plus_or_minus(font8x16, Background_black, 2, 2, 202, MBASE(row), probe.offset.z * 100);
@@ -521,7 +521,7 @@ inline void Prepare_Item_Offset(const uint8_t row) {
521 521
 }
522 522
 
523 523
 inline void Prepare_Item_PLA(const uint8_t row) {
524
-  if (HMI_flag.language_flag) {
524
+  if (HMI_flag.language_chinese) {
525 525
     DWIN_Frame_AreaCopy(1, 100, 89, 271 - 93 - 27, 479 - 378, LBLX, MBASE(row));
526 526
   }
527 527
   else {
@@ -532,7 +532,7 @@ inline void Prepare_Item_PLA(const uint8_t row) {
532 532
 }
533 533
 
534 534
 inline void Prepare_Item_ABS(const uint8_t row) {
535
-  if (HMI_flag.language_flag) {
535
+  if (HMI_flag.language_chinese) {
536 536
     DWIN_Frame_AreaCopy(1, 180, 89, 271 - 11 - 27, 479 - 379, LBLX, MBASE(row));
537 537
   }
538 538
   else {
@@ -543,7 +543,7 @@ inline void Prepare_Item_ABS(const uint8_t row) {
543 543
 }
544 544
 
545 545
 inline void Prepare_Item_Cool(const uint8_t row) {
546
-  if (HMI_flag.language_flag)
546
+  if (HMI_flag.language_chinese)
547 547
     DWIN_Frame_AreaCopy(1, 1, 104, 271 - 215, 479 - 362, LBLX, MBASE(row));
548 548
   else
549 549
     DWIN_Frame_AreaCopy(1, 200,  76, 271 - 7, 479 - 393, LBLX, MBASE(row));// "Cooldown"
@@ -551,7 +551,7 @@ inline void Prepare_Item_Cool(const uint8_t row) {
551 551
 }
552 552
 
553 553
 inline void Prepare_Item_Lang(const uint8_t row) {
554
-  if (HMI_flag.language_flag) {
554
+  if (HMI_flag.language_chinese) {
555 555
     DWIN_Frame_AreaCopy(1, 239, 134, 271 - 5, 479 - 333, LBLX, MBASE(row));
556 556
     DWIN_Draw_String(false, false, font8x16, White, Background_black, 226, MBASE(row), (char*)"CN");
557 557
   }
@@ -569,7 +569,7 @@ inline void Draw_Prepare_Menu() {
569 569
   #define PSCROL(L) (scroll + (L))
570 570
   #define PVISI(L)  WITHIN(PSCROL(L), 0, MROWS)
571 571
 
572
-  if (HMI_flag.language_flag) {
572
+  if (HMI_flag.language_chinese) {
573 573
     DWIN_Frame_AreaCopy(1, 133, 1, 271 - 111, 479 - 465 - 1, 14, 8); // "Prepare"
574 574
   }
575 575
   else {
@@ -604,7 +604,7 @@ inline void Draw_Control_Menu() {
604 604
 
605 605
   if (CVISI(0)) Draw_Back_First(select_control.now == 0);                        // < Back
606 606
 
607
-  if (HMI_flag.language_flag) {
607
+  if (HMI_flag.language_chinese) {
608 608
     DWIN_Frame_AreaCopy(1, 103,   1, 271 - 141, 479 - 465, 14, 8);
609 609
     DWIN_Frame_AreaCopy(1,  57, 104, 271 - 187, 479 - 363, LBLX, CLINE(1));  // Temperature >
610 610
     DWIN_Frame_AreaCopy(1,  87, 104, 271 - 157, 479 - 363, LBLX, CLINE(2));  // Motion >
@@ -618,22 +618,25 @@ inline void Draw_Control_Menu() {
618 618
   else {
619 619
     #ifdef USE_STRING_HEADINGS
620 620
       Draw_Title(GET_TEXT_F(MSG_CONTROL));
621
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)GET_TEXT_F(MSG_TEMPERATURE));
622
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)GET_TEXT_F(MSG_MOTION));
623
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)GET_TEXT_F(MSG_STORE_EEPROM));
624
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)GET_TEXT_F(MSG_LOAD_EEPROM));
625
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 4), (char*)GET_TEXT_F(MSG_RESTORE_DEFAULTS));
626
+      if (CVISI(6))
627
+          DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 5), (char*)"Info");
621 628
     #else
622 629
       DWIN_Frame_AreaCopy(1, 128, 2, 271 - 95, 479 - 467, 14, 8);
630
+      DWIN_Frame_AreaCopy(1,   1,    89, 271 - 188, 479 - 377 - 1, LBLX, CLINE(1));// Temperature >
631
+      DWIN_Frame_AreaCopy(1,  84,    89, 271 - 143, 479 - 380,   LBLX, CLINE(2));// Motion >
632
+      DWIN_Frame_AreaCopy(1, 131 + 17, 89, 271 -  3, 479 - 377 - 1, LBLX, CLINE(3));// "Store Configuration"
633
+      DWIN_Frame_AreaCopy(1, 26, 104, 271 - 214, 479 - 365, LBLX, CLINE(4));   // "Read"
634
+      DWIN_Frame_AreaCopy(1, 131 + 51, 89, 271 - 3, 479 - 377 - 1, LBLX + 31 + 3, CLINE(4)); // "Configuration"
635
+      DWIN_Frame_AreaCopy(1, 59, 104, 271 - 178, 479 - 365, LBLX, CLINE(5));   // "Reset"
636
+      DWIN_Frame_AreaCopy(1, 131 + 51, 89, 271 - 3, 479 - 377 - 1, LBLX + 34 + 3, CLINE(5)); // "Configuration"
637
+      if (CVISI(6))
638
+        DWIN_Frame_AreaCopy(1, 0, 104, 25, 115, LBLX, CLINE(6));               // Info >
623 639
     #endif
624
-
625
-    DWIN_Frame_AreaCopy(1,   1,    89, 271 - 188, 479 - 377 - 1, LBLX, CLINE(1));// Temperature >
626
-    DWIN_Frame_AreaCopy(1,  84,    89, 271 - 143, 479 - 380,   LBLX, CLINE(2));// Motion >
627
-    DWIN_Frame_AreaCopy(1, 131 + 17, 89, 271 -  3, 479 - 377 - 1, LBLX, CLINE(3));// "Store Configuration"
628
-
629
-    DWIN_Frame_AreaCopy(1, 26, 104, 271 - 214, 479 - 365, LBLX, CLINE(4));   // "Read"
630
-    DWIN_Frame_AreaCopy(1, 131 + 51, 89, 271 - 3, 479 - 377 - 1, LBLX + 31 + 3, CLINE(4)); // "Configuration"
631
-
632
-    DWIN_Frame_AreaCopy(1, 59, 104, 271 - 178, 479 - 365, LBLX, CLINE(5));   // "Reset"
633
-    DWIN_Frame_AreaCopy(1, 131 + 51, 89, 271 - 3, 479 - 377 - 1, LBLX + 34 + 3, CLINE(5)); // "Configuration"
634
-
635
-    if (CVISI(6))
636
-      DWIN_Frame_AreaCopy(1, 0, 104, 25, 115, LBLX, CLINE(6));               // Info >
637 640
   }
638 641
 
639 642
   if (select_control.now && CVISI(select_control.now))
@@ -651,9 +654,8 @@ inline void Draw_Control_Menu() {
651 654
 inline void Draw_Tune_Menu() {
652 655
   Clear_Main_Window();
653 656
 
654
-  if (HMI_flag.language_flag) {
657
+  if (HMI_flag.language_chinese) {
655 658
     DWIN_Frame_AreaCopy(1, 73, 2, 271 - 171, 479 - 466, 14, 9);
656
-
657 659
     DWIN_Frame_AreaCopy(1, 116, 164, 271 - 100, 479 - 303, LBLX, MBASE(1));
658 660
     DWIN_Frame_AreaCopy(1, 1, 134, 271 - 215, 479 - 333, LBLX, MBASE(2));
659 661
     DWIN_Frame_AreaCopy(1, 58, 134, 271 - 158, 479 - 333, LBLX, MBASE(3));
@@ -663,16 +665,21 @@ inline void Draw_Tune_Menu() {
663 665
   else {
664 666
     #ifdef USE_STRING_HEADINGS
665 667
       Draw_Title(GET_TEXT_F(MSG_TUNE));
668
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)GET_TEXT_F(MSG_SPEED));
669
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND));
670
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)GET_TEXT_F(MSG_UBL_SET_TEMP_BED));
671
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)GET_TEXT_F(MSG_FAN_SPEED));
672
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 4), (char*)GET_TEXT_F(MSG_ZPROBE_ZOFFSET));
666 673
     #else
667 674
       DWIN_Frame_AreaCopy(1, 94, 2, 271 - 145, 479 - 467, 14, 9);
675
+      DWIN_Frame_AreaCopy(1, 1, 179, 271 - 179, 479 - 287 - 2, LBLX, MBASE(1)); // print speed
676
+      DWIN_Frame_AreaCopy(1, 197, 104, 271 - 33, 479 - 365, LBLX, MBASE(2)); // Hotend...
677
+      DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 41 + 3, MBASE(2)); // ...Temperature
678
+      DWIN_Frame_AreaCopy(1, 240, 104, 271 - 7, 479 - 365, LBLX, MBASE(3)); // Bed...
679
+      DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 3, MBASE(3)); // ...Temperature
680
+      DWIN_Frame_AreaCopy(1, 0, 119, 271 - 207, 479 - 347, LBLX, MBASE(4)); // fan speed
681
+      DWIN_Frame_AreaCopy(1, 93, 179, 271 - 130, 479 - 290, LBLX, MBASE(5)); // Z-offset
668 682
     #endif
669
-    DWIN_Frame_AreaCopy(1, 1, 179, 271 - 179, 479 - 287 - 2, LBLX, MBASE(1)); // print speed
670
-    DWIN_Frame_AreaCopy(1, 197, 104, 271 - 33, 479 - 365, LBLX, MBASE(2)); // Hotend...
671
-    DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 41 + 3, MBASE(2)); // ...Temperature
672
-    DWIN_Frame_AreaCopy(1, 240, 104, 271 - 7, 479 - 365, LBLX, MBASE(3)); // Bed...
673
-    DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 3, MBASE(3)); // ...Temperature
674
-    DWIN_Frame_AreaCopy(1, 0, 119, 271 - 207, 479 - 347, LBLX, MBASE(4)); // fan speed
675
-    DWIN_Frame_AreaCopy(1, 93, 179, 271 - 130, 479 - 290, LBLX, MBASE(5)); // Z-offset
676 683
   }
677 684
 
678 685
   Draw_Back_First(select_tune.now == 0);
@@ -723,7 +730,7 @@ inline void say_e(const uint16_t inset, const uint16_t line) {
723 730
 inline void Draw_Motion_Menu() {
724 731
   Clear_Main_Window();
725 732
 
726
-  if (HMI_flag.language_flag) {
733
+  if (HMI_flag.language_chinese) {
727 734
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
728 735
 
729 736
     DWIN_Frame_AreaCopy(1, 173, 133, 228, 479 - 332, LBLX, MBASE(1));     // max speed
@@ -737,13 +744,17 @@ inline void Draw_Motion_Menu() {
737 744
   else {
738 745
     #ifdef USE_STRING_HEADINGS
739 746
       Draw_Title(GET_TEXT_F(MSG_MOTION));
747
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)"Feedrate");
748
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)GET_TEXT_F(MSG_ACCELERATION));
749
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)GET_TEXT_F(MSG_JERK));
750
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)GET_TEXT_F(MSG_STEPS_PER_MM));
740 751
     #else
741 752
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
753
+      draw_max_en(MBASE(1)); draw_speed_en(24 + 3, MBASE(1));               // "Max Speed"
754
+      draw_max_accel_en(MBASE(2));                                          // "Max Acceleration"
755
+      draw_max_en(MBASE(3)); draw_corner_en(MBASE(3));                      // "Max Corner"
756
+      draw_steps_per_mm(MBASE(4));                                          // "Steps-per-mm"
742 757
     #endif
743
-    draw_max_en(MBASE(1)); draw_speed_en(24 + 3, MBASE(1));               // "Max Speed"
744
-    draw_max_accel_en(MBASE(2));                                          // "Max Acceleration"
745
-    draw_max_en(MBASE(3)); draw_corner_en(MBASE(3));                      // "Max Corner"
746
-    draw_steps_per_mm(MBASE(4));                                          // "Steps-per-mm"
747 758
   }
748 759
 
749 760
   Draw_Back_First(select_motion.now == 0);
@@ -766,7 +777,7 @@ void Popup_Window_Temperature(const bool toohigh) {
766 777
   Draw_Popup_Bkgd_105();
767 778
   if (toohigh) {
768 779
     DWIN_ICON_Show(ICON, ICON_TempTooHigh, 102, 165);
769
-    if (HMI_flag.language_flag) {
780
+    if (HMI_flag.language_chinese) {
770 781
       DWIN_Frame_AreaCopy(1, 103, 371, 237, 479 - 93, 52, 285);
771 782
       DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285);
772 783
       DWIN_Frame_AreaCopy(1, 189, 389, 271 - 0, 402, 95, 310);
@@ -778,7 +789,7 @@ void Popup_Window_Temperature(const bool toohigh) {
778 789
   }
779 790
   else {
780 791
     DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 165);
781
-    if (HMI_flag.language_flag) {
792
+    if (HMI_flag.language_chinese) {
782 793
       DWIN_Frame_AreaCopy(1, 103, 371, 271 - 1, 479 - 93, 52, 285);
783 794
       DWIN_Frame_AreaCopy(1, 189, 389, 271 - 0, 402, 95, 310);
784 795
     }
@@ -799,7 +810,7 @@ inline void Draw_Popup_Bkgd_60() {
799 810
     Clear_Main_Window();
800 811
     Draw_Popup_Bkgd_60();
801 812
     DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105);
802
-    if (HMI_flag.language_flag) {
813
+    if (HMI_flag.language_chinese) {
803 814
       DWIN_Frame_AreaCopy(1, 103, 371, 136, 479 - 93, 69, 240);
804 815
       DWIN_Frame_AreaCopy(1, 170, 371, 271 - 1, 479 - 93, 69 + 33, 240);
805 816
       DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280);
@@ -815,7 +826,7 @@ inline void Draw_Popup_Bkgd_60() {
815 826
 void Popup_Window_Resume(void) {
816 827
   Clear_Popup_Area();
817 828
   Draw_Popup_Bkgd_105();
818
-  if (HMI_flag.language_flag) {
829
+  if (HMI_flag.language_chinese) {
819 830
     DWIN_Frame_AreaCopy(1, 160, 338, 271 - 36, 479 - 125, 98, 135);
820 831
     DWIN_Frame_AreaCopy(1, 103, 321, 271 - 0, 479 - 144, 52, 192);
821 832
     DWIN_ICON_Show(ICON, ICON_Continue_C, 26, 307);
@@ -834,13 +845,13 @@ void Popup_Window_Home(void) {
834 845
   Clear_Main_Window();
835 846
   Draw_Popup_Bkgd_60();
836 847
   DWIN_ICON_Show(ICON, ICON_BLTouch, 101, 105);
837
-  if (HMI_flag.language_flag) {
848
+  if (HMI_flag.language_chinese) {
838 849
     DWIN_Frame_AreaCopy(1, 0, 371, 33, 386, 85, 240);
839 850
     DWIN_Frame_AreaCopy(1, 203, 286, 271, 302, 118, 240);
840 851
     DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280);
841 852
   }
842 853
   else {
843
-    DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 80, 230, (char*)"Auto homing...");
854
+    DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 80, 230, (char*)GET_TEXT_F(MSG_LEVEL_BED_HOMING));
844 855
     DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 24, 260, (char*)"Please wait until completed");
845 856
   }
846 857
 }
@@ -849,12 +860,12 @@ void Popup_Window_Leveling(void) {
849 860
   Clear_Main_Window();
850 861
   Draw_Popup_Bkgd_60();
851 862
   DWIN_ICON_Show(ICON, ICON_AutoLeveling, 101, 105);
852
-  if (HMI_flag.language_flag) {
863
+  if (HMI_flag.language_chinese) {
853 864
     DWIN_Frame_AreaCopy(1, 0, 371, 100, 386, 84, 240);
854 865
     DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280);
855 866
   }
856 867
   else {
857
-    DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 76, 230, (char*)"Auto leveling...");
868
+    DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 76, 230, (char*)GET_TEXT_F(MSG_BED_LEVELING));
858 869
     DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 24, 260, (char*)"Please wait until completed");
859 870
   }
860 871
 }
@@ -872,7 +883,7 @@ void Draw_Select_Highlight(const bool sel) {
872 883
 void Popup_window_PauseOrStop(void) {
873 884
   Clear_Main_Window();
874 885
   Draw_Popup_Bkgd_60();
875
-  if (HMI_flag.language_flag) {
886
+  if (HMI_flag.language_chinese) {
876 887
     if (select_print.now == 1) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150);
877 888
     else if (select_print.now == 2) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150);
878 889
     DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150);
@@ -880,8 +891,8 @@ void Popup_window_PauseOrStop(void) {
880 891
     DWIN_ICON_Show(ICON, ICON_Cancel_C, 146, 280);
881 892
   }
882 893
   else {
883
-    if (select_print.now == 1) DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 88, 150, (char*)"Pause print?");
884
-    else if (select_print.now == 2) DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 92, 150, (char*)"Stop print?");
894
+    if (select_print.now == 1) DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 88, 150, (char*)GET_TEXT_F(MSG_PAUSE_PRINT));
895
+    else if (select_print.now == 2) DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 92, 150, (char*)GET_TEXT_F(MSG_STOP_PRINT));
885 896
     DWIN_ICON_Show(ICON, ICON_Confirm_E, 26, 280);
886 897
     DWIN_ICON_Show(ICON, ICON_Cancel_E, 146, 280);
887 898
   }
@@ -889,7 +900,7 @@ void Popup_window_PauseOrStop(void) {
889 900
 }
890 901
 
891 902
 void Draw_Printing_Screen(void) {
892
-  if (HMI_flag.language_flag) {
903
+  if (HMI_flag.language_chinese) {
893 904
     DWIN_Frame_AreaCopy(1, 30,  1, 271 - 200, 479 - 465,  14,   9);// Tune
894 905
     DWIN_Frame_AreaCopy(1,  0, 72, 271 - 208, 479 - 393,  41, 188);// Pause
895 906
     DWIN_Frame_AreaCopy(1, 65, 72, 271 - 143, 479 - 393, 176, 188); // Stop
@@ -949,7 +960,7 @@ void Goto_MainMenu(void) {
949 960
 
950 961
   Clear_Main_Window();
951 962
 
952
-  if (HMI_flag.language_flag) {
963
+  if (HMI_flag.language_chinese) {
953 964
     DWIN_Frame_AreaCopy(1, 2, 2, 271 - 244, 479 - 465, 14, 9); // "Home"
954 965
   }
955 966
   else {
@@ -1715,7 +1726,7 @@ inline void Draw_Info_Menu() {
1715 1726
   DWIN_Draw_String(false, false, font8x16, White, Background_black, (DWIN_WIDTH - strlen(MACHINE_SIZE) * MENU_CHR_W) / 2, 122, (char*)MACHINE_SIZE);
1716 1727
   DWIN_Draw_String(false, false, font8x16, White, Background_black, (DWIN_WIDTH - strlen(SHORT_BUILD_VERSION) * MENU_CHR_W) / 2, 195, (char*)SHORT_BUILD_VERSION);
1717 1728
 
1718
-  if (HMI_flag.language_flag) {
1729
+  if (HMI_flag.language_chinese) {
1719 1730
     DWIN_Frame_AreaCopy(1, 30, 17, 271 - 214, 479 - 450, 14, 8);
1720 1731
 
1721 1732
     DWIN_Frame_AreaCopy(1, 197, 149, 271 - 19, 479 - 318, 108, 102);
@@ -1746,7 +1757,7 @@ inline void Draw_Info_Menu() {
1746 1757
 inline void Draw_Print_File_Menu() {
1747 1758
   Clear_Title_Bar();
1748 1759
 
1749
-  if (HMI_flag.language_flag) {
1760
+  if (HMI_flag.language_chinese) {
1750 1761
     DWIN_Frame_AreaCopy(1, 0, 31, 271 - 216, 479 - 435, 14, 8);
1751 1762
   }
1752 1763
   else {
@@ -2093,7 +2104,7 @@ void HMI_PauseOrStop(void) {
2093 2104
 inline void Draw_Move_Menu() {
2094 2105
   Clear_Main_Window();
2095 2106
 
2096
-  if (HMI_flag.language_flag) {
2107
+  if (HMI_flag.language_chinese) {
2097 2108
     DWIN_Frame_AreaCopy(1, 192, 1, 271 - 38, 479 - 465, 14, 8);
2098 2109
     DWIN_Frame_AreaCopy(1, 58, 118, 271 - 165, 479 - 347, LBLX, MBASE(1));
2099 2110
     DWIN_Frame_AreaCopy(1, 109, 118, 271 - 114, 479 - 347, LBLX, MBASE(2));
@@ -2239,13 +2250,13 @@ void HMI_Prepare(void) {
2239 2250
         break;
2240 2251
       case 8: // language
2241 2252
         /* select language */
2242
-        HMI_flag.language_flag = !HMI_flag.language_flag;
2243
-        if (HMI_flag.language_flag) {
2244
-          set_chinese_to_eeprom();
2253
+        HMI_flag.language_chinese ^= true;
2254
+        if (HMI_flag.language_chinese) {
2255
+          HMI_SetAndSaveLanguageChinese();
2245 2256
           DWIN_JPG_CacheTo1(Language_Chinese);
2246 2257
         }
2247 2258
         else {
2248
-          set_english_to_eeprom();
2259
+          HMI_SetAndSaveLanguageWestern();
2249 2260
           DWIN_JPG_CacheTo1(Language_English);
2250 2261
         }
2251 2262
         Draw_Prepare_Menu();
@@ -2260,7 +2271,7 @@ void HMI_Prepare(void) {
2260 2271
 void Draw_Temperature_Menu() {
2261 2272
   Clear_Main_Window();
2262 2273
 
2263
-  if (HMI_flag.language_flag) {
2274
+  if (HMI_flag.language_chinese) {
2264 2275
     DWIN_Frame_AreaCopy(1, 236, 2, 271 - 8, 479 - 466, 14, 8);
2265 2276
 
2266 2277
     DWIN_Frame_AreaCopy(1, 1, 134, 271 - 215, 479 - 333, LBLX, MBASE(1));
@@ -2272,21 +2283,25 @@ void Draw_Temperature_Menu() {
2272 2283
   else {
2273 2284
     #ifdef USE_STRING_HEADINGS
2274 2285
       Draw_Title(GET_TEXT_F(MSG_TEMPERATURE));
2286
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND));
2287
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)GET_TEXT_F(MSG_UBL_SET_TEMP_BED));
2288
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)GET_TEXT_F(MSG_FAN_SPEED));
2289
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)"PLA Preheat Settings");
2290
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 4), (char*)"ABS Preheat Settings");
2275 2291
     #else
2276 2292
       DWIN_Frame_AreaCopy(1, 56, 16, 271 - 130, 479 - 450 - 1, 14, 8);
2293
+      DWIN_Frame_AreaCopy(1, 197, 104, 271 - 33, 479 - 365, LBLX, MBASE(1));                    // Nozzle...
2294
+      DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 41 + 3, MBASE(1));         // ...Temperature
2295
+      DWIN_Frame_AreaCopy(1, 240, 104, 271 - 7, 479 - 365, LBLX, MBASE(2));                     // Bed...
2296
+      DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 3, MBASE(2));         // ...Temperature
2297
+      DWIN_Frame_AreaCopy(1, 0, 119, 271 - 207, 479 - 347, LBLX, MBASE(3));                     // Fan speed
2298
+      DWIN_Frame_AreaCopy(1, 107, 76, 271 - 115, 479 - 393, LBLX, MBASE(4));                    // Preheat...
2299
+      DWIN_Frame_AreaCopy(1, 157, 76, 181, 479 - 393, LBLX + 49 + 3, MBASE(4));                 // ...PLA
2300
+      DWIN_Frame_AreaCopy(1, 131, 119, 271 - 89, 479 - 347, LBLX + 49 + 24 + 6, MBASE(4));      // PLA setting
2301
+      DWIN_Frame_AreaCopy(1, 107, 76, 271 - 115, 479 - 393, LBLX, MBASE(5));                    // Preheat...
2302
+      DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX + 49 + 3, MBASE(5));                 // ...ABS
2303
+      DWIN_Frame_AreaCopy(1, 131, 119, 271 - 89, 479 - 347, LBLX + 49 + 3 + 26 + 3, MBASE(5));  // ABS setting
2277 2304
     #endif
2278
-
2279
-    DWIN_Frame_AreaCopy(1, 197, 104, 271 - 33, 479 - 365, LBLX, MBASE(1));                    // Nozzle...
2280
-    DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 41 + 3, MBASE(1));         // ...Temperature
2281
-    DWIN_Frame_AreaCopy(1, 240, 104, 271 - 7, 479 - 365, LBLX, MBASE(2));                     // Bed...
2282
-    DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 3, MBASE(2));         // ...Temperature
2283
-    DWIN_Frame_AreaCopy(1, 0, 119, 271 - 207, 479 - 347, LBLX, MBASE(3));                     // Fan speed
2284
-    DWIN_Frame_AreaCopy(1, 107, 76, 271 - 115, 479 - 393, LBLX, MBASE(4));                    // Preheat...
2285
-    DWIN_Frame_AreaCopy(1, 157, 76, 181, 479 - 393, LBLX + 49 + 3, MBASE(4));                 // ...PLA
2286
-    DWIN_Frame_AreaCopy(1, 131, 119, 271 - 89, 479 - 347, LBLX + 49 + 24 + 6, MBASE(4));      // PLA setting
2287
-    DWIN_Frame_AreaCopy(1, 107, 76, 271 - 115, 479 - 393, LBLX, MBASE(5));                    // Preheat...
2288
-    DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX + 49 + 3, MBASE(5));                 // ...ABS
2289
-    DWIN_Frame_AreaCopy(1, 131, 119, 271 - 89, 479 - 347, LBLX + 49 + 3 + 26 + 3, MBASE(5));  // ABS setting
2290 2305
   }
2291 2306
 
2292 2307
   Draw_Back_First(select_temp.now == 0);
@@ -2319,7 +2334,7 @@ void HMI_Control(void) {
2319 2334
         Draw_More_Icon(2 + MROWS - index_control); // Motion >
2320 2335
         if (index_control > MROWS) {
2321 2336
           Draw_More_Icon(6 + MROWS - index_control); // Info >
2322
-          if (HMI_flag.language_flag)
2337
+          if (HMI_flag.language_chinese)
2323 2338
             DWIN_Frame_AreaCopy(1, 231, 104, 271 - 13, 479 - 363, LBLX, MBASE(5));
2324 2339
           else
2325 2340
             DWIN_Frame_AreaCopy(1, 0, 104, 271 - 247, 479 - 365, LBLX, MBASE(5));
@@ -2523,7 +2538,7 @@ void HMI_Temperature(void) {
2523 2538
 
2524 2539
             Clear_Main_Window();
2525 2540
 
2526
-            if (HMI_flag.language_flag) {
2541
+            if (HMI_flag.language_chinese) {
2527 2542
               DWIN_Frame_AreaCopy(1, 59, 16, 271 - 132, 479 - 450, 14, 8);
2528 2543
 
2529 2544
               DWIN_Frame_AreaCopy(1, 100, 89, 124, 479 - 378, LBLX, MBASE(1));
@@ -2537,19 +2552,22 @@ void HMI_Temperature(void) {
2537 2552
             else {
2538 2553
               #ifdef USE_STRING_HEADINGS
2539 2554
                 Draw_Title("PLA Settings"); // TODO: GET_TEXT_F
2555
+                DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)"Nozzle Temp");
2556
+                DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)"Bed Temp");
2557
+                DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)GET_TEXT_F(MSG_FAN_SPEED));
2558
+                DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)GET_TEXT_F(MSG_STORE_EEPROM));
2540 2559
               #else
2541 2560
                 DWIN_Frame_AreaCopy(1, 56, 16, 271 - 130, 479 - 450 - 1, 14, 8);
2561
+                DWIN_Frame_AreaCopy(1, 157, 76, 181, 479 - 393, LBLX, MBASE(1));
2562
+                DWIN_Frame_AreaCopy(1, 197, 104, 271 - 33, 479 - 365, LBLX + 24 + 3, MBASE(1));
2563
+                DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 41 + 6, MBASE(1)); // PLA nozzle temp
2564
+                DWIN_Frame_AreaCopy(1, 157, 76, 181, 479 - 393, LBLX, MBASE(2) + 3);
2565
+                DWIN_Frame_AreaCopy(1, 240, 104, 271 - 7, 479 - 365, LBLX + 24 + 3, MBASE(2) + 3);
2566
+                DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 24 + 6, MBASE(2) + 3); // PLA bed temp
2567
+                DWIN_Frame_AreaCopy(1, 157, 76, 181, 479 - 393, LBLX, MBASE(3));
2568
+                DWIN_Frame_AreaCopy(1, 0, 119, 271 - 207, 479 - 347, LBLX + 24 + 3, MBASE(3)); // PLA fan speed
2569
+                DWIN_Frame_AreaCopy(1, 97, 165, 271 - 42, 479 - 301 - 1, LBLX, MBASE(4)); // save PLA configuration
2542 2570
               #endif
2543
-
2544
-              DWIN_Frame_AreaCopy(1, 157, 76, 181, 479 - 393, LBLX, MBASE(1));
2545
-              DWIN_Frame_AreaCopy(1, 197, 104, 271 - 33, 479 - 365, LBLX + 24 + 3, MBASE(1));
2546
-              DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 41 + 6, MBASE(1)); // PLA nozzle temp
2547
-              DWIN_Frame_AreaCopy(1, 157, 76, 181, 479 - 393, LBLX, MBASE(2) + 3);
2548
-              DWIN_Frame_AreaCopy(1, 240, 104, 271 - 7, 479 - 365, LBLX + 24 + 3, MBASE(2) + 3);
2549
-              DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 24 + 6, MBASE(2) + 3); // PLA bed temp
2550
-              DWIN_Frame_AreaCopy(1, 157, 76, 181, 479 - 393, LBLX, MBASE(3));
2551
-              DWIN_Frame_AreaCopy(1, 0, 119, 271 - 207, 479 - 347, LBLX + 24 + 3, MBASE(3)); // PLA fan speed
2552
-              DWIN_Frame_AreaCopy(1, 97, 165, 271 - 42, 479 - 301 - 1, LBLX, MBASE(4)); // save PLA configuration
2553 2571
             }
2554 2572
 
2555 2573
             Draw_Back_First();
@@ -2572,7 +2590,7 @@ void HMI_Temperature(void) {
2572 2590
 
2573 2591
             Clear_Main_Window();
2574 2592
 
2575
-            if (HMI_flag.language_flag) {
2593
+            if (HMI_flag.language_chinese) {
2576 2594
               DWIN_Frame_AreaCopy(1, 142, 16, 271 - 48, 479 - 450, 14, 8);
2577 2595
 
2578 2596
               DWIN_Frame_AreaCopy(1, 180, 89, 204, 479 - 379, LBLX, MBASE(1));
@@ -2587,20 +2605,23 @@ void HMI_Temperature(void) {
2587 2605
             else {
2588 2606
               #ifdef USE_STRING_HEADINGS
2589 2607
                 Draw_Title("ABS Settings"); // TODO: GET_TEXT_F
2608
+                DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)"Nozzle Temp");
2609
+                DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)"Bed Temp");
2610
+                DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)GET_TEXT_F(MSG_FAN_SPEED));
2611
+                DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)GET_TEXT_F(MSG_STORE_EEPROM));
2590 2612
               #else
2591 2613
                 DWIN_Frame_AreaCopy(1, 56, 16, 271 - 130, 479 - 450 - 1, 14, 8);
2614
+                DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX, MBASE(1));
2615
+                DWIN_Frame_AreaCopy(1, 197, 104, 271 - 33, 479 - 365, LBLX + 24 + 3, MBASE(1));
2616
+                DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 41 + 6, MBASE(1)); // ABS nozzle temp
2617
+                DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX, MBASE(2) + 3);
2618
+                DWIN_Frame_AreaCopy(1, 240, 104, 271 - 7, 479 - 365, LBLX + 24 + 3, MBASE(2) + 3);
2619
+                DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 24 + 6, MBASE(2) + 3); // ABS bed temp
2620
+                DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX, MBASE(3));
2621
+                DWIN_Frame_AreaCopy(1, 0, 119, 271 - 207, 479 - 347, LBLX + 24 + 3, MBASE(3)); // ABS fan speed
2622
+                DWIN_Frame_AreaCopy(1, 97, 165, 271 - 42, 479 - 301 - 1, LBLX, MBASE(4));
2623
+                DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX + 33, MBASE(4));  // save ABS configuration
2592 2624
               #endif
2593
-
2594
-              DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX, MBASE(1));
2595
-              DWIN_Frame_AreaCopy(1, 197, 104, 271 - 33, 479 - 365, LBLX + 24 + 3, MBASE(1));
2596
-              DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 41 + 6, MBASE(1)); // ABS nozzle temp
2597
-              DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX, MBASE(2) + 3);
2598
-              DWIN_Frame_AreaCopy(1, 240, 104, 271 - 7, 479 - 365, LBLX + 24 + 3, MBASE(2) + 3);
2599
-              DWIN_Frame_AreaCopy(1, 1, 89, 271 - 188, 479 - 377 - 1, LBLX + 24 + 24 + 6, MBASE(2) + 3); // ABS bed temp
2600
-              DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX, MBASE(3));
2601
-              DWIN_Frame_AreaCopy(1, 0, 119, 271 - 207, 479 - 347, LBLX + 24 + 3, MBASE(3)); // ABS fan speed
2602
-              DWIN_Frame_AreaCopy(1, 97, 165, 271 - 42, 479 - 301 - 1, LBLX, MBASE(4));
2603
-              DWIN_Frame_AreaCopy(1, 172, 76, 198, 479 - 393, LBLX + 33, MBASE(4));  // save ABS configuration
2604 2625
             }
2605 2626
 
2606 2627
             Draw_Back_First();
@@ -2624,7 +2645,7 @@ void HMI_Temperature(void) {
2624 2645
 inline void Draw_Max_Speed_Menu() {
2625 2646
   Clear_Main_Window();
2626 2647
 
2627
-  if (HMI_flag.language_flag) {
2648
+  if (HMI_flag.language_chinese) {
2628 2649
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2629 2650
 
2630 2651
     auto say_max_speed = [](const uint16_t row) {
@@ -2643,24 +2664,28 @@ inline void Draw_Max_Speed_Menu() {
2643 2664
   else {
2644 2665
     #ifdef USE_STRING_HEADINGS
2645 2666
       Draw_Title("Max Speed (mm/s)"); // TODO: GET_TEXT_F
2667
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)"Max Feedrate X");
2668
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)"Max Feedrate Y");
2669
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)"Max Feedrate Z");
2670
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)"Max Feedrate E");
2646 2671
     #else
2647 2672
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
2648
-    #endif
2649 2673
 
2650
-    draw_max_en(MBASE(1));                                                    // "Max"
2651
-    DWIN_Frame_AreaCopy(1, 184, 119, 271 - 37, 479 - 347, LBLX + 24 + 3, MBASE(1)); // "Speed X"
2674
+      draw_max_en(MBASE(1));            // "Max"
2675
+      DWIN_Frame_AreaCopy(1, 184, 119, 271 - 37, 479 - 347, LBLX + 24 + 3, MBASE(1)); // "Speed X"
2652 2676
 
2653
-    draw_max_en(MBASE(2));                                                    // "Max"
2654
-    draw_speed_en(24 + 3, MBASE(2));                                          // "Speed"
2655
-    say_y(24 + 40 + 6, MBASE(2));                                             // "Y"
2677
+      draw_max_en(MBASE(2));            // "Max"
2678
+      draw_speed_en(24 + 3, MBASE(2));  // "Speed"
2679
+      say_y(24 + 40 + 6, MBASE(2));     // "Y"
2656 2680
 
2657
-    draw_max_en(MBASE(3));                                                    // "Max"
2658
-    draw_speed_en(24 + 3, MBASE(3));                                          // "Speed"
2659
-    say_z(24 + 40 + 6, MBASE(3));                                             // "Z"
2681
+      draw_max_en(MBASE(3));            // "Max"
2682
+      draw_speed_en(24 + 3, MBASE(3));  // "Speed"
2683
+      say_z(24 + 40 + 6, MBASE(3));     // "Z"
2660 2684
 
2661
-    draw_max_en(MBASE(4));                                                    // "Max"
2662
-    draw_speed_en(24 + 3, MBASE(4));                                          // "Speed"
2663
-    say_e(24 + 40 + 6, MBASE(4));                                             // "E"
2685
+      draw_max_en(MBASE(4));            // "Max"
2686
+      draw_speed_en(24 + 3, MBASE(4));  // "Speed"
2687
+      say_e(24 + 40 + 6, MBASE(4));     // "E"
2688
+    #endif
2664 2689
   }
2665 2690
 
2666 2691
   Draw_Back_First();
@@ -2675,7 +2700,7 @@ inline void Draw_Max_Speed_Menu() {
2675 2700
 inline void Draw_Max_Accel_Menu() {
2676 2701
   Clear_Main_Window();
2677 2702
 
2678
-  if (HMI_flag.language_flag) {
2703
+  if (HMI_flag.language_chinese) {
2679 2704
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2680 2705
 
2681 2706
     DWIN_Frame_AreaCopy(1, 173, 133, 200, 479 - 332, LBLX, MBASE(1));
@@ -2693,14 +2718,18 @@ inline void Draw_Max_Accel_Menu() {
2693 2718
   }
2694 2719
   else {
2695 2720
     #ifdef USE_STRING_HEADINGS
2696
-      Draw_Title("Max Accel (mm/s/s)"); // TODO: GET_TEXT_F
2721
+      Draw_Title(GET_TEXT_F(MSG_ACCELERATION));
2722
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)"Max Accel X");
2723
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)"Max Accel Y");
2724
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)"Max Accel Z");
2725
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)"Max Accel E");
2697 2726
     #else
2698 2727
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
2728
+      draw_max_accel_en(MBASE(1)); say_x(24 + 78 + 6, MBASE(1)); // "Max Acceleration X"
2729
+      draw_max_accel_en(MBASE(2)); say_y(24 + 78 + 6, MBASE(2)); // "Max Acceleration Y"
2730
+      draw_max_accel_en(MBASE(3)); say_z(24 + 78 + 6, MBASE(3)); // "Max Acceleration Z"
2731
+      draw_max_accel_en(MBASE(4)); say_e(24 + 78 + 6, MBASE(4)); // "Max Acceleration E"
2699 2732
     #endif
2700
-    draw_max_accel_en(MBASE(1)); say_x(24 + 78 + 6, MBASE(1)); // "Max Acceleration X"
2701
-    draw_max_accel_en(MBASE(2)); say_y(24 + 78 + 6, MBASE(2)); // "Max Acceleration Y"
2702
-    draw_max_accel_en(MBASE(3)); say_z(24 + 78 + 6, MBASE(3)); // "Max Acceleration Z"
2703
-    draw_max_accel_en(MBASE(4)); say_e(24 + 78 + 6, MBASE(4)); // "Max Acceleration E"
2704 2733
   }
2705 2734
 
2706 2735
   Draw_Back_First();
@@ -2715,7 +2744,7 @@ inline void Draw_Max_Accel_Menu() {
2715 2744
 inline void Draw_Max_Jerk_Menu() {
2716 2745
   Clear_Main_Window();
2717 2746
 
2718
-  if (HMI_flag.language_flag) {
2747
+  if (HMI_flag.language_chinese) {
2719 2748
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2720 2749
 
2721 2750
     DWIN_Frame_AreaCopy(1, 173, 133, 200, 479 - 332, LBLX, MBASE(1));
@@ -2737,30 +2766,33 @@ inline void Draw_Max_Jerk_Menu() {
2737 2766
   }
2738 2767
   else {
2739 2768
     #ifdef USE_STRING_HEADINGS
2740
-      Draw_Title("Max Corner"); // TODO: GET_TEXT_F
2769
+      Draw_Title(GET_TEXT_F(MSG_JERK));
2770
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)"Max Jerk X");
2771
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)"Max Jerk Y");
2772
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)"Max Jerk Z");
2773
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)"Max Jerk E");
2741 2774
     #else
2742 2775
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
2776
+      draw_max_en(MBASE(1));            // "Max"
2777
+      draw_corner_en(MBASE(1));         // "Corner"
2778
+      draw_speed_en(66 + 6, MBASE(1));  // "Speed"
2779
+      say_x(106 + 9, MBASE(1));         // "X"
2780
+
2781
+      draw_max_en(MBASE(2));            // "Max"
2782
+      draw_corner_en(MBASE(2));         // "Corner"
2783
+      draw_speed_en(66 + 6, MBASE(2));  // "Speed"
2784
+      say_y(106 + 9, MBASE(2));         // "Y"
2785
+
2786
+      draw_max_en(MBASE(3));            // "Max"
2787
+      draw_corner_en(MBASE(3));         // "Corner"
2788
+      draw_speed_en(66 + 6, MBASE(3));  // "Speed"
2789
+      say_z(106 + 9, MBASE(3));         // "Z"
2790
+
2791
+      draw_max_en(MBASE(4));            // "Max"
2792
+      draw_corner_en(MBASE(4));         // "Corner"
2793
+      draw_speed_en(66 + 6, MBASE(4));  // "Speed"
2794
+      say_e(106 + 9, MBASE(4));         // "E"
2743 2795
     #endif
2744
-
2745
-    draw_max_en(MBASE(1));            // "Max"
2746
-    draw_corner_en(MBASE(1));         // "Corner"
2747
-    draw_speed_en(66 + 6, MBASE(1));  // "Speed"
2748
-    say_x(106 + 9, MBASE(1));         // "X"
2749
-
2750
-    draw_max_en(MBASE(2));            // "Max"
2751
-    draw_corner_en(MBASE(2));         // "Corner"
2752
-    draw_speed_en(66 + 6, MBASE(2));  // "Speed"
2753
-    say_y(106 + 9, MBASE(2));         // "Y"
2754
-
2755
-    draw_max_en(MBASE(3));            // "Max"
2756
-    draw_corner_en(MBASE(3));         // "Corner"
2757
-    draw_speed_en(66 + 6, MBASE(3));  // "Speed"
2758
-    say_z(106 + 9, MBASE(3));         // "Z"
2759
-
2760
-    draw_max_en(MBASE(4));            // "Max"
2761
-    draw_corner_en(MBASE(4));         // "Corner"
2762
-    draw_speed_en(66 + 6, MBASE(4));  // "Speed"
2763
-    say_e(106 + 9, MBASE(4));         // "E"
2764 2796
   }
2765 2797
 
2766 2798
   Draw_Back_First();
@@ -2775,7 +2807,7 @@ inline void Draw_Max_Jerk_Menu() {
2775 2807
 inline void Draw_Steps_Menu() {
2776 2808
   Clear_Main_Window();
2777 2809
 
2778
-  if (HMI_flag.language_flag) {
2810
+  if (HMI_flag.language_chinese) {
2779 2811
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2780 2812
 
2781 2813
     DWIN_Frame_AreaCopy(1, 153, 148, 271 - 77, 479 - 318, LBLX, MBASE(1));
@@ -2789,14 +2821,18 @@ inline void Draw_Steps_Menu() {
2789 2821
   }
2790 2822
   else {
2791 2823
     #ifdef USE_STRING_HEADINGS
2792
-      Draw_Title("Steps-per-mm"); // TODO: GET_TEXT_F
2824
+      Draw_Title(GET_TEXT_F(MSG_STEPS_PER_MM));
2825
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 0), (char*)"Steps/mm X");
2826
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 1), (char*)"Steps/mm Y");
2827
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 2), (char*)"Steps/mm Z");
2828
+      DWIN_Draw_String(false, true, font8x16, White, Background_black, 60, 102 + (MLINE * 3), (char*)"Steps/mm E");
2793 2829
     #else
2794 2830
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
2831
+      draw_steps_per_mm(MBASE(1)); say_x(100 + 3, MBASE(1)); // "Steps-per-mm X"
2832
+      draw_steps_per_mm(MBASE(2)); say_y(100 + 3, MBASE(2)); // "Y"
2833
+      draw_steps_per_mm(MBASE(3)); say_z(100 + 3, MBASE(3)); // "Z"
2834
+      draw_steps_per_mm(MBASE(4)); say_e(100 + 3, MBASE(4)); // "E"
2795 2835
     #endif
2796
-    draw_steps_per_mm(MBASE(1)); say_x(100 + 3, MBASE(1)); // "Steps-per-mm X"
2797
-    draw_steps_per_mm(MBASE(2)); say_y(100 + 3, MBASE(2)); // "Y"
2798
-    draw_steps_per_mm(MBASE(3)); say_z(100 + 3, MBASE(3)); // "Z"
2799
-    draw_steps_per_mm(MBASE(4)); say_e(100 + 3, MBASE(4)); // "E"
2800 2836
   }
2801 2837
 
2802 2838
   Draw_Back_First();
@@ -2947,16 +2983,16 @@ void HMI_Tune(void) {
2947 2983
         break;
2948 2984
       case 6: // Language
2949 2985
         // Select language
2950
-        HMI_flag.language_flag = !HMI_flag.language_flag;
2986
+        HMI_flag.language_chinese ^= true;
2951 2987
 
2952 2988
         Clear_Main_Window();
2953 2989
 
2954
-        if (HMI_flag.language_flag) {
2955
-          set_chinese_to_eeprom();
2990
+        if (HMI_flag.language_chinese) {
2991
+          HMI_SetAndSaveLanguageChinese();
2956 2992
           DWIN_JPG_CacheTo1(Language_Chinese);
2957 2993
         }
2958 2994
         else {
2959
-          set_english_to_eeprom();
2995
+          HMI_SetAndSaveLanguageWestern();
2960 2996
           DWIN_JPG_CacheTo1(Language_English);
2961 2997
         }
2962 2998
 
@@ -3304,7 +3340,7 @@ void HMI_Init(void) {
3304 3340
     delay(20);
3305 3341
   }
3306 3342
 
3307
-  lcd_select_language();
3343
+  HMI_SetLanguage();
3308 3344
 
3309 3345
   #if ENABLED(FIX_MOUNTED_PROBE) // For "CREALITY_TOUCH" probe too?
3310 3346
     SET_OUTPUT(COM_PIN);
@@ -3345,7 +3381,7 @@ void EachMomentUpdate(void) {
3345 3381
 
3346 3382
       // show print done confirm
3347 3383
       DWIN_Draw_Rectangle(1, Background_black, 0, 250,  271, 360);
3348
-      DWIN_ICON_Show(ICON, HMI_flag.language_flag ? ICON_Confirm_C : ICON_Confirm_E, 86, 302 - 19);
3384
+      DWIN_ICON_Show(ICON, HMI_flag.language_chinese ? ICON_Confirm_C : ICON_Confirm_E, 86, 302 - 19);
3349 3385
     }
3350 3386
     else if (HMI_flag.pause_flag != printingIsPaused()) {
3351 3387
       // print status update

+ 4
- 4
Marlin/src/lcd/dwin/dwin.h View File

@@ -244,7 +244,7 @@ typedef struct {
244 244
 } HMI_value_t;
245 245
 
246 246
 typedef struct {
247
-  bool language_flag;  // 0: EN, 1: CN
247
+  bool language_chinese;  // 0: EN, 1: CN
248 248
   bool pause_flag:1;
249 249
   bool print_finish:1;
250 250
   bool confirm_flag:1;
@@ -269,9 +269,9 @@ extern HMI_value_t HMI_ValueStruct;
269 269
 extern HMI_Flag    HMI_flag;
270 270
 
271 271
 // Language
272
-void lcd_select_language(void);
273
-void set_english_to_eeprom(void);
274
-void set_chinese_to_eeprom(void);
272
+void HMI_SetLanguage(void);
273
+void HMI_SetAndSaveLanguageWestern(void);
274
+void HMI_SetAndSaveLanguageChinese(void);
275 275
 
276 276
 // Show ICO
277 277
 void ICON_Print(bool show);

Loading…
Cancel
Save