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
 #define DWIN_LANGUAGE_EEPROM_ADDRESS 0x01   // Between 0x01 and 0x63 (EEPROM_OFFSET-1)
190
 #define DWIN_LANGUAGE_EEPROM_ADDRESS 0x01   // Between 0x01 and 0x63 (EEPROM_OFFSET-1)
191
                                             // BL24CXX::check() uses 0x00
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
     DWIN_JPG_CacheTo1(Language_Chinese);
196
     DWIN_JPG_CacheTo1(Language_Chinese);
197
   else
197
   else
198
     DWIN_JPG_CacheTo1(Language_English);
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
   DWIN_JPG_CacheTo1(Language_English);
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
   DWIN_JPG_CacheTo1(Language_Chinese);
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
 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) {
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
 void ICON_Print() {
223
 void ICON_Print() {
224
   if (select_page.now == 0) {
224
   if (select_page.now == 0) {
225
     DWIN_ICON_Show(ICON, ICON_Print_1, 17, 130);
225
     DWIN_ICON_Show(ICON, ICON_Print_1, 17, 130);
226
-    if (HMI_flag.language_flag)
226
+    if (HMI_flag.language_chinese)
227
       DWIN_Frame_AreaCopy(1, 1, 447, 271 - 243, 479 - 19, 58, 201);
227
       DWIN_Frame_AreaCopy(1, 1, 447, 271 - 243, 479 - 19, 58, 201);
228
     else
228
     else
229
       DWIN_Frame_AreaCopy(1, 1, 451, 271 - 240, 479 - 16, 72 - 15, 201);
229
       DWIN_Frame_AreaCopy(1, 1, 451, 271 - 240, 479 - 16, 72 - 15, 201);
230
   }
230
   }
231
   else {
231
   else {
232
     DWIN_ICON_Show(ICON, ICON_Print_0, 17, 130);
232
     DWIN_ICON_Show(ICON, ICON_Print_0, 17, 130);
233
-    if (HMI_flag.language_flag)
233
+    if (HMI_flag.language_chinese)
234
       DWIN_Frame_AreaCopy(1, 1, 405, 271 - 243, 420, 58, 201);
234
       DWIN_Frame_AreaCopy(1, 1, 405, 271 - 243, 420, 58, 201);
235
     else
235
     else
236
       DWIN_Frame_AreaCopy(1, 1, 423, 271 - 240, 423 + 12, 72 - 15, 201);
236
       DWIN_Frame_AreaCopy(1, 1, 423, 271 - 240, 423 + 12, 72 - 15, 201);
240
 void ICON_Prepare() {
240
 void ICON_Prepare() {
241
   if (select_page.now == 1) {
241
   if (select_page.now == 1) {
242
     DWIN_ICON_Show(ICON, ICON_Prepare_1, 145, 130);
242
     DWIN_ICON_Show(ICON, ICON_Prepare_1, 145, 130);
243
-    if (HMI_flag.language_flag)
243
+    if (HMI_flag.language_chinese)
244
       DWIN_Frame_AreaCopy(1, 31, 447, 271 - 213, 479 - 19, 186, 201);
244
       DWIN_Frame_AreaCopy(1, 31, 447, 271 - 213, 479 - 19, 186, 201);
245
     else
245
     else
246
       DWIN_Frame_AreaCopy(1, 33, 451, 271 - 189, 479 - 13, 200 - 25, 201);
246
       DWIN_Frame_AreaCopy(1, 33, 451, 271 - 189, 479 - 13, 200 - 25, 201);
247
   }
247
   }
248
   else {
248
   else {
249
     DWIN_ICON_Show(ICON, ICON_Prepare_0, 145, 130);
249
     DWIN_ICON_Show(ICON, ICON_Prepare_0, 145, 130);
250
-    if (HMI_flag.language_flag)
250
+    if (HMI_flag.language_chinese)
251
       DWIN_Frame_AreaCopy(1, 31, 405, 271 - 213, 420, 186, 201);
251
       DWIN_Frame_AreaCopy(1, 31, 405, 271 - 213, 420, 186, 201);
252
     else
252
     else
253
       DWIN_Frame_AreaCopy(1, 33, 423, 271 - 189, 423 + 15, 200 - 25, 201);
253
       DWIN_Frame_AreaCopy(1, 33, 423, 271 - 189, 423 + 15, 200 - 25, 201);
257
 void ICON_Control() {
257
 void ICON_Control() {
258
   if (select_page.now == 2) {
258
   if (select_page.now == 2) {
259
     DWIN_ICON_Show(ICON, ICON_Control_1, 17, 246);
259
     DWIN_ICON_Show(ICON, ICON_Control_1, 17, 246);
260
-    if (HMI_flag.language_flag)
260
+    if (HMI_flag.language_chinese)
261
       DWIN_Frame_AreaCopy(1, 61, 447, 271 - 183, 479 - 19, 58, 318);
261
       DWIN_Frame_AreaCopy(1, 61, 447, 271 - 183, 479 - 19, 58, 318);
262
     else
262
     else
263
       DWIN_Frame_AreaCopy(1, 85, 451, 271 - 139, 479 - 16, 72 - 24, 318);
263
       DWIN_Frame_AreaCopy(1, 85, 451, 271 - 139, 479 - 16, 72 - 24, 318);
264
   }
264
   }
265
   else {
265
   else {
266
     DWIN_ICON_Show(ICON, ICON_Control_0, 17, 246);
266
     DWIN_ICON_Show(ICON, ICON_Control_0, 17, 246);
267
-    if (HMI_flag.language_flag)
267
+    if (HMI_flag.language_chinese)
268
       DWIN_Frame_AreaCopy(1, 61, 405, 271 - 183, 420, 58, 318);
268
       DWIN_Frame_AreaCopy(1, 61, 405, 271 - 183, 420, 58, 318);
269
     else
269
     else
270
       DWIN_Frame_AreaCopy(1, 85, 423, 271 - 139, 479 - 45, 72 - 24, 318);
270
       DWIN_Frame_AreaCopy(1, 85, 423, 271 - 139, 479 - 45, 72 - 24, 318);
274
 void ICON_StartInfo(bool show) {
274
 void ICON_StartInfo(bool show) {
275
   if (show) {
275
   if (show) {
276
     DWIN_ICON_Show(ICON, ICON_Info_1, 145, 246);
276
     DWIN_ICON_Show(ICON, ICON_Info_1, 145, 246);
277
-    if (HMI_flag.language_flag)
277
+    if (HMI_flag.language_chinese)
278
       DWIN_Frame_AreaCopy(1, 91, 447, 271 - 153, 479 - 19, 186, 318);
278
       DWIN_Frame_AreaCopy(1, 91, 447, 271 - 153, 479 - 19, 186, 318);
279
     else
279
     else
280
       DWIN_Frame_AreaCopy(1, 132, 451, 159, 479 - 13, 186, 318);
280
       DWIN_Frame_AreaCopy(1, 132, 451, 159, 479 - 13, 186, 318);
281
   }
281
   }
282
   else {
282
   else {
283
     DWIN_ICON_Show(ICON, ICON_Info_0, 145, 246);
283
     DWIN_ICON_Show(ICON, ICON_Info_0, 145, 246);
284
-    if (HMI_flag.language_flag)
284
+    if (HMI_flag.language_chinese)
285
       DWIN_Frame_AreaCopy(1, 91, 405, 271 - 153, 420, 186, 318);
285
       DWIN_Frame_AreaCopy(1, 91, 405, 271 - 153, 420, 186, 318);
286
     else
286
     else
287
       DWIN_Frame_AreaCopy(1, 132, 423, 159, 423 + 12, 186, 318);
287
       DWIN_Frame_AreaCopy(1, 132, 423, 159, 423 + 12, 186, 318);
291
 void ICON_Leveling(bool show) {
291
 void ICON_Leveling(bool show) {
292
   if (show) {
292
   if (show) {
293
     DWIN_ICON_Show(ICON, ICON_Leveling_1, 145, 246);
293
     DWIN_ICON_Show(ICON, ICON_Leveling_1, 145, 246);
294
-    if (HMI_flag.language_flag)
294
+    if (HMI_flag.language_chinese)
295
       DWIN_Frame_AreaCopy(1, 211, 447, 238, 479 - 19, 186, 318);
295
       DWIN_Frame_AreaCopy(1, 211, 447, 238, 479 - 19, 186, 318);
296
     else
296
     else
297
       DWIN_Frame_AreaCopy(1, 84, 437, 120,  449, 200 - 18, 318);
297
       DWIN_Frame_AreaCopy(1, 84, 437, 120,  449, 200 - 18, 318);
298
   }
298
   }
299
   else {
299
   else {
300
     DWIN_ICON_Show(ICON, ICON_Leveling_0, 145, 246);
300
     DWIN_ICON_Show(ICON, ICON_Leveling_0, 145, 246);
301
-    if (HMI_flag.language_flag)
301
+    if (HMI_flag.language_chinese)
302
       DWIN_Frame_AreaCopy(1, 211, 405, 238, 420, 186, 318);
302
       DWIN_Frame_AreaCopy(1, 211, 405, 238, 420, 186, 318);
303
     else
303
     else
304
       DWIN_Frame_AreaCopy(1, 84, 465, 120, 478, 200 - 18, 318);
304
       DWIN_Frame_AreaCopy(1, 84, 465, 120, 478, 200 - 18, 318);
308
 void ICON_Tune() {
308
 void ICON_Tune() {
309
   if (select_print.now == 0) {
309
   if (select_print.now == 0) {
310
     DWIN_ICON_Show(ICON, ICON_Setup_1, 8, 252);
310
     DWIN_ICON_Show(ICON, ICON_Setup_1, 8, 252);
311
-    if (HMI_flag.language_flag)
311
+    if (HMI_flag.language_chinese)
312
       DWIN_Frame_AreaCopy(1, 121, 447, 271 - 123, 479 - 21, 34, 325);
312
       DWIN_Frame_AreaCopy(1, 121, 447, 271 - 123, 479 - 21, 34, 325);
313
     else
313
     else
314
       DWIN_Frame_AreaCopy(1, 1, 465, 271 - 237, 479 - 2, 48 - 17, 325);
314
       DWIN_Frame_AreaCopy(1, 1, 465, 271 - 237, 479 - 2, 48 - 17, 325);
315
   }
315
   }
316
   else {
316
   else {
317
     DWIN_ICON_Show(ICON, ICON_Setup_0, 8, 252);
317
     DWIN_ICON_Show(ICON, ICON_Setup_0, 8, 252);
318
-    if (HMI_flag.language_flag)
318
+    if (HMI_flag.language_chinese)
319
       DWIN_Frame_AreaCopy(1, 121, 405, 271 - 123, 420, 34, 325);
319
       DWIN_Frame_AreaCopy(1, 121, 405, 271 - 123, 420, 34, 325);
320
     else
320
     else
321
       DWIN_Frame_AreaCopy(1, 1, 438, 271 - 239, 479 - 31, 48 - 17, 325);
321
       DWIN_Frame_AreaCopy(1, 1, 438, 271 - 239, 479 - 31, 48 - 17, 325);
325
 void ICON_Pause() {
325
 void ICON_Pause() {
326
   if (select_print.now == 1) {
326
   if (select_print.now == 1) {
327
     DWIN_ICON_Show(ICON, ICON_Pause_1, 96, 252);
327
     DWIN_ICON_Show(ICON, ICON_Pause_1, 96, 252);
328
-    if (HMI_flag.language_flag)
328
+    if (HMI_flag.language_chinese)
329
       DWIN_Frame_AreaCopy(1, 181, 447, 271 - 63, 479 - 20, 124, 325);
329
       DWIN_Frame_AreaCopy(1, 181, 447, 271 - 63, 479 - 20, 124, 325);
330
     else
330
     else
331
       DWIN_Frame_AreaCopy(1, 177, 451, 271 - 55, 479 - 17, 136 - 20, 325);
331
       DWIN_Frame_AreaCopy(1, 177, 451, 271 - 55, 479 - 17, 136 - 20, 325);
332
   }
332
   }
333
   else {
333
   else {
334
     DWIN_ICON_Show(ICON, ICON_Pause_0, 96, 252);
334
     DWIN_ICON_Show(ICON, ICON_Pause_0, 96, 252);
335
-    if (HMI_flag.language_flag)
335
+    if (HMI_flag.language_chinese)
336
       DWIN_Frame_AreaCopy(1, 181, 405, 271 - 63, 420, 124, 325);
336
       DWIN_Frame_AreaCopy(1, 181, 405, 271 - 63, 420, 124, 325);
337
     else
337
     else
338
       DWIN_Frame_AreaCopy(1, 177, 423, 271 - 56, 479 - 46, 136 - 20, 325);
338
       DWIN_Frame_AreaCopy(1, 177, 423, 271 - 56, 479 - 46, 136 - 20, 325);
342
 void ICON_Continue() {
342
 void ICON_Continue() {
343
   if (select_print.now == 1) {
343
   if (select_print.now == 1) {
344
     DWIN_ICON_Show(ICON, ICON_Continue_1, 96, 252);
344
     DWIN_ICON_Show(ICON, ICON_Continue_1, 96, 252);
345
-    if (HMI_flag.language_flag)
345
+    if (HMI_flag.language_chinese)
346
       DWIN_Frame_AreaCopy(1, 1, 447, 271 - 243, 479 - 19, 124, 325);
346
       DWIN_Frame_AreaCopy(1, 1, 447, 271 - 243, 479 - 19, 124, 325);
347
     else
347
     else
348
       DWIN_Frame_AreaCopy(1, 1, 451, 271 - 239, 479 - 16, 136 - 15, 325);
348
       DWIN_Frame_AreaCopy(1, 1, 451, 271 - 239, 479 - 16, 136 - 15, 325);
349
   }
349
   }
350
   else {
350
   else {
351
     DWIN_ICON_Show(ICON, ICON_Continue_0, 96, 252);
351
     DWIN_ICON_Show(ICON, ICON_Continue_0, 96, 252);
352
-    if (HMI_flag.language_flag)
352
+    if (HMI_flag.language_chinese)
353
       DWIN_Frame_AreaCopy(1, 1, 405, 271 - 243, 420, 124, 325);
353
       DWIN_Frame_AreaCopy(1, 1, 405, 271 - 243, 420, 124, 325);
354
     else
354
     else
355
       DWIN_Frame_AreaCopy(1, 1, 424, 271 - 240, 479 - 45, 136 - 15, 325);
355
       DWIN_Frame_AreaCopy(1, 1, 424, 271 - 240, 479 - 45, 136 - 15, 325);
359
 void ICON_Stop() {
359
 void ICON_Stop() {
360
   if (select_print.now == 2) {
360
   if (select_print.now == 2) {
361
     DWIN_ICON_Show(ICON, ICON_Stop_1, 184, 252);
361
     DWIN_ICON_Show(ICON, ICON_Stop_1, 184, 252);
362
-    if (HMI_flag.language_flag)
362
+    if (HMI_flag.language_chinese)
363
       DWIN_Frame_AreaCopy(1, 151, 447, 271 - 93, 479 - 20, 210, 325);
363
       DWIN_Frame_AreaCopy(1, 151, 447, 271 - 93, 479 - 20, 210, 325);
364
     else
364
     else
365
       DWIN_Frame_AreaCopy(1, 218, 451, 271 - 22, 479 - 14, 224 - 15, 325);
365
       DWIN_Frame_AreaCopy(1, 218, 451, 271 - 22, 479 - 14, 224 - 15, 325);
366
   }
366
   }
367
   else {
367
   else {
368
     DWIN_ICON_Show(ICON, ICON_Stop_0, 184, 252);
368
     DWIN_ICON_Show(ICON, ICON_Stop_0, 184, 252);
369
-    if (HMI_flag.language_flag)
369
+    if (HMI_flag.language_chinese)
370
       DWIN_Frame_AreaCopy(1, 151, 405, 271 - 93, 420, 210, 325);
370
       DWIN_Frame_AreaCopy(1, 151, 405, 271 - 93, 420, 210, 325);
371
     else
371
     else
372
       DWIN_Frame_AreaCopy(1, 218, 423, 271 - 24, 479 - 43, 224 - 15, 325);
372
       DWIN_Frame_AreaCopy(1, 218, 423, 271 - 24, 479 - 43, 224 - 15, 325);
454
 
454
 
455
 // The "Back" label is always on the first line
455
 // The "Back" label is always on the first line
456
 inline void Draw_Back_Label(void) {
456
 inline void Draw_Back_Label(void) {
457
-  if (HMI_flag.language_flag)
457
+  if (HMI_flag.language_chinese)
458
     DWIN_Frame_AreaCopy(1, 129, 72, 271 - 115, 479 - 395, LBLX, MBASE(0));
458
     DWIN_Frame_AreaCopy(1, 129, 72, 271 - 115, 479 - 395, LBLX, MBASE(0));
459
   else
459
   else
460
     DWIN_Frame_AreaCopy(1, 226, 179, 271 - 15, 479 - 290, LBLX, MBASE(0));
460
     DWIN_Frame_AreaCopy(1, 226, 179, 271 - 15, 479 - 290, LBLX, MBASE(0));
476
 }
476
 }
477
 
477
 
478
 inline void Prepare_Item_Move(const uint8_t row) {
478
 inline void Prepare_Item_Move(const uint8_t row) {
479
-  if (HMI_flag.language_flag)
479
+  if (HMI_flag.language_chinese)
480
     DWIN_Frame_AreaCopy(1, 159, 70, 271 - 71, 479 - 395, LBLX, MBASE(row));
480
     DWIN_Frame_AreaCopy(1, 159, 70, 271 - 71, 479 - 395, LBLX, MBASE(row));
481
   else
481
   else
482
     draw_move_en(MBASE(row)); // "Move >"
482
     draw_move_en(MBASE(row)); // "Move >"
485
 }
485
 }
486
 
486
 
487
 inline void Prepare_Item_Disable(const uint8_t row) {
487
 inline void Prepare_Item_Disable(const uint8_t row) {
488
-  if (HMI_flag.language_flag)
488
+  if (HMI_flag.language_chinese)
489
     DWIN_Frame_AreaCopy(1, 204, 70, 271 - 12, 479 - 397, LBLX, MBASE(row));
489
     DWIN_Frame_AreaCopy(1, 204, 70, 271 - 12, 479 - 397, LBLX, MBASE(row));
490
   else
490
   else
491
     DWIN_Frame_AreaCopy(1, 103, 59, 271 - 71, 479 - 405, LBLX, MBASE(row)); // "Disable Stepper"
491
     DWIN_Frame_AreaCopy(1, 103, 59, 271 - 71, 479 - 405, LBLX, MBASE(row)); // "Disable Stepper"
493
 }
493
 }
494
 
494
 
495
 inline void Prepare_Item_Home(const uint8_t row) {
495
 inline void Prepare_Item_Home(const uint8_t row) {
496
-  if (HMI_flag.language_flag)
496
+  if (HMI_flag.language_chinese)
497
     DWIN_Frame_AreaCopy(1, 0, 89, 271 - 230, 479 - 378, LBLX, MBASE(row));
497
     DWIN_Frame_AreaCopy(1, 0, 89, 271 - 230, 479 - 378, LBLX, MBASE(row));
498
   else
498
   else
499
     DWIN_Frame_AreaCopy(1, 202, 61, 271 - 0, 479 - 408, LBLX, MBASE(row)); // "Auto Home"
499
     DWIN_Frame_AreaCopy(1, 202, 61, 271 - 0, 479 - 408, LBLX, MBASE(row)); // "Auto Home"
501
 }
501
 }
502
 
502
 
503
 inline void Prepare_Item_Offset(const uint8_t row) {
503
 inline void Prepare_Item_Offset(const uint8_t row) {
504
-  if (HMI_flag.language_flag) {
504
+  if (HMI_flag.language_chinese) {
505
     #if HAS_BED_PROBE
505
     #if HAS_BED_PROBE
506
       DWIN_Frame_AreaCopy(1, 174, 164, 271 - 48, 479 - 302, LBLX, MBASE(row));
506
       DWIN_Frame_AreaCopy(1, 174, 164, 271 - 48, 479 - 302, LBLX, MBASE(row));
507
       show_plus_or_minus(font8x16, Background_black, 2, 2, 202, MBASE(row), probe.offset.z * 100);
507
       show_plus_or_minus(font8x16, Background_black, 2, 2, 202, MBASE(row), probe.offset.z * 100);
521
 }
521
 }
522
 
522
 
523
 inline void Prepare_Item_PLA(const uint8_t row) {
523
 inline void Prepare_Item_PLA(const uint8_t row) {
524
-  if (HMI_flag.language_flag) {
524
+  if (HMI_flag.language_chinese) {
525
     DWIN_Frame_AreaCopy(1, 100, 89, 271 - 93 - 27, 479 - 378, LBLX, MBASE(row));
525
     DWIN_Frame_AreaCopy(1, 100, 89, 271 - 93 - 27, 479 - 378, LBLX, MBASE(row));
526
   }
526
   }
527
   else {
527
   else {
532
 }
532
 }
533
 
533
 
534
 inline void Prepare_Item_ABS(const uint8_t row) {
534
 inline void Prepare_Item_ABS(const uint8_t row) {
535
-  if (HMI_flag.language_flag) {
535
+  if (HMI_flag.language_chinese) {
536
     DWIN_Frame_AreaCopy(1, 180, 89, 271 - 11 - 27, 479 - 379, LBLX, MBASE(row));
536
     DWIN_Frame_AreaCopy(1, 180, 89, 271 - 11 - 27, 479 - 379, LBLX, MBASE(row));
537
   }
537
   }
538
   else {
538
   else {
543
 }
543
 }
544
 
544
 
545
 inline void Prepare_Item_Cool(const uint8_t row) {
545
 inline void Prepare_Item_Cool(const uint8_t row) {
546
-  if (HMI_flag.language_flag)
546
+  if (HMI_flag.language_chinese)
547
     DWIN_Frame_AreaCopy(1, 1, 104, 271 - 215, 479 - 362, LBLX, MBASE(row));
547
     DWIN_Frame_AreaCopy(1, 1, 104, 271 - 215, 479 - 362, LBLX, MBASE(row));
548
   else
548
   else
549
     DWIN_Frame_AreaCopy(1, 200,  76, 271 - 7, 479 - 393, LBLX, MBASE(row));// "Cooldown"
549
     DWIN_Frame_AreaCopy(1, 200,  76, 271 - 7, 479 - 393, LBLX, MBASE(row));// "Cooldown"
551
 }
551
 }
552
 
552
 
553
 inline void Prepare_Item_Lang(const uint8_t row) {
553
 inline void Prepare_Item_Lang(const uint8_t row) {
554
-  if (HMI_flag.language_flag) {
554
+  if (HMI_flag.language_chinese) {
555
     DWIN_Frame_AreaCopy(1, 239, 134, 271 - 5, 479 - 333, LBLX, MBASE(row));
555
     DWIN_Frame_AreaCopy(1, 239, 134, 271 - 5, 479 - 333, LBLX, MBASE(row));
556
     DWIN_Draw_String(false, false, font8x16, White, Background_black, 226, MBASE(row), (char*)"CN");
556
     DWIN_Draw_String(false, false, font8x16, White, Background_black, 226, MBASE(row), (char*)"CN");
557
   }
557
   }
569
   #define PSCROL(L) (scroll + (L))
569
   #define PSCROL(L) (scroll + (L))
570
   #define PVISI(L)  WITHIN(PSCROL(L), 0, MROWS)
570
   #define PVISI(L)  WITHIN(PSCROL(L), 0, MROWS)
571
 
571
 
572
-  if (HMI_flag.language_flag) {
572
+  if (HMI_flag.language_chinese) {
573
     DWIN_Frame_AreaCopy(1, 133, 1, 271 - 111, 479 - 465 - 1, 14, 8); // "Prepare"
573
     DWIN_Frame_AreaCopy(1, 133, 1, 271 - 111, 479 - 465 - 1, 14, 8); // "Prepare"
574
   }
574
   }
575
   else {
575
   else {
604
 
604
 
605
   if (CVISI(0)) Draw_Back_First(select_control.now == 0);                        // < Back
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
     DWIN_Frame_AreaCopy(1, 103,   1, 271 - 141, 479 - 465, 14, 8);
608
     DWIN_Frame_AreaCopy(1, 103,   1, 271 - 141, 479 - 465, 14, 8);
609
     DWIN_Frame_AreaCopy(1,  57, 104, 271 - 187, 479 - 363, LBLX, CLINE(1));  // Temperature >
609
     DWIN_Frame_AreaCopy(1,  57, 104, 271 - 187, 479 - 363, LBLX, CLINE(1));  // Temperature >
610
     DWIN_Frame_AreaCopy(1,  87, 104, 271 - 157, 479 - 363, LBLX, CLINE(2));  // Motion >
610
     DWIN_Frame_AreaCopy(1,  87, 104, 271 - 157, 479 - 363, LBLX, CLINE(2));  // Motion >
618
   else {
618
   else {
619
     #ifdef USE_STRING_HEADINGS
619
     #ifdef USE_STRING_HEADINGS
620
       Draw_Title(GET_TEXT_F(MSG_CONTROL));
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
     #else
628
     #else
622
       DWIN_Frame_AreaCopy(1, 128, 2, 271 - 95, 479 - 467, 14, 8);
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
     #endif
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
   if (select_control.now && CVISI(select_control.now))
642
   if (select_control.now && CVISI(select_control.now))
651
 inline void Draw_Tune_Menu() {
654
 inline void Draw_Tune_Menu() {
652
   Clear_Main_Window();
655
   Clear_Main_Window();
653
 
656
 
654
-  if (HMI_flag.language_flag) {
657
+  if (HMI_flag.language_chinese) {
655
     DWIN_Frame_AreaCopy(1, 73, 2, 271 - 171, 479 - 466, 14, 9);
658
     DWIN_Frame_AreaCopy(1, 73, 2, 271 - 171, 479 - 466, 14, 9);
656
-
657
     DWIN_Frame_AreaCopy(1, 116, 164, 271 - 100, 479 - 303, LBLX, MBASE(1));
659
     DWIN_Frame_AreaCopy(1, 116, 164, 271 - 100, 479 - 303, LBLX, MBASE(1));
658
     DWIN_Frame_AreaCopy(1, 1, 134, 271 - 215, 479 - 333, LBLX, MBASE(2));
660
     DWIN_Frame_AreaCopy(1, 1, 134, 271 - 215, 479 - 333, LBLX, MBASE(2));
659
     DWIN_Frame_AreaCopy(1, 58, 134, 271 - 158, 479 - 333, LBLX, MBASE(3));
661
     DWIN_Frame_AreaCopy(1, 58, 134, 271 - 158, 479 - 333, LBLX, MBASE(3));
663
   else {
665
   else {
664
     #ifdef USE_STRING_HEADINGS
666
     #ifdef USE_STRING_HEADINGS
665
       Draw_Title(GET_TEXT_F(MSG_TUNE));
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
     #else
673
     #else
667
       DWIN_Frame_AreaCopy(1, 94, 2, 271 - 145, 479 - 467, 14, 9);
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
     #endif
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
   Draw_Back_First(select_tune.now == 0);
685
   Draw_Back_First(select_tune.now == 0);
723
 inline void Draw_Motion_Menu() {
730
 inline void Draw_Motion_Menu() {
724
   Clear_Main_Window();
731
   Clear_Main_Window();
725
 
732
 
726
-  if (HMI_flag.language_flag) {
733
+  if (HMI_flag.language_chinese) {
727
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
734
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
728
 
735
 
729
     DWIN_Frame_AreaCopy(1, 173, 133, 228, 479 - 332, LBLX, MBASE(1));     // max speed
736
     DWIN_Frame_AreaCopy(1, 173, 133, 228, 479 - 332, LBLX, MBASE(1));     // max speed
737
   else {
744
   else {
738
     #ifdef USE_STRING_HEADINGS
745
     #ifdef USE_STRING_HEADINGS
739
       Draw_Title(GET_TEXT_F(MSG_MOTION));
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
     #else
751
     #else
741
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
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
     #endif
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
   Draw_Back_First(select_motion.now == 0);
760
   Draw_Back_First(select_motion.now == 0);
766
   Draw_Popup_Bkgd_105();
777
   Draw_Popup_Bkgd_105();
767
   if (toohigh) {
778
   if (toohigh) {
768
     DWIN_ICON_Show(ICON, ICON_TempTooHigh, 102, 165);
779
     DWIN_ICON_Show(ICON, ICON_TempTooHigh, 102, 165);
769
-    if (HMI_flag.language_flag) {
780
+    if (HMI_flag.language_chinese) {
770
       DWIN_Frame_AreaCopy(1, 103, 371, 237, 479 - 93, 52, 285);
781
       DWIN_Frame_AreaCopy(1, 103, 371, 237, 479 - 93, 52, 285);
771
       DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285);
782
       DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285);
772
       DWIN_Frame_AreaCopy(1, 189, 389, 271 - 0, 402, 95, 310);
783
       DWIN_Frame_AreaCopy(1, 189, 389, 271 - 0, 402, 95, 310);
778
   }
789
   }
779
   else {
790
   else {
780
     DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 165);
791
     DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 165);
781
-    if (HMI_flag.language_flag) {
792
+    if (HMI_flag.language_chinese) {
782
       DWIN_Frame_AreaCopy(1, 103, 371, 271 - 1, 479 - 93, 52, 285);
793
       DWIN_Frame_AreaCopy(1, 103, 371, 271 - 1, 479 - 93, 52, 285);
783
       DWIN_Frame_AreaCopy(1, 189, 389, 271 - 0, 402, 95, 310);
794
       DWIN_Frame_AreaCopy(1, 189, 389, 271 - 0, 402, 95, 310);
784
     }
795
     }
799
     Clear_Main_Window();
810
     Clear_Main_Window();
800
     Draw_Popup_Bkgd_60();
811
     Draw_Popup_Bkgd_60();
801
     DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105);
812
     DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105);
802
-    if (HMI_flag.language_flag) {
813
+    if (HMI_flag.language_chinese) {
803
       DWIN_Frame_AreaCopy(1, 103, 371, 136, 479 - 93, 69, 240);
814
       DWIN_Frame_AreaCopy(1, 103, 371, 136, 479 - 93, 69, 240);
804
       DWIN_Frame_AreaCopy(1, 170, 371, 271 - 1, 479 - 93, 69 + 33, 240);
815
       DWIN_Frame_AreaCopy(1, 170, 371, 271 - 1, 479 - 93, 69 + 33, 240);
805
       DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280);
816
       DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280);
815
 void Popup_Window_Resume(void) {
826
 void Popup_Window_Resume(void) {
816
   Clear_Popup_Area();
827
   Clear_Popup_Area();
817
   Draw_Popup_Bkgd_105();
828
   Draw_Popup_Bkgd_105();
818
-  if (HMI_flag.language_flag) {
829
+  if (HMI_flag.language_chinese) {
819
     DWIN_Frame_AreaCopy(1, 160, 338, 271 - 36, 479 - 125, 98, 135);
830
     DWIN_Frame_AreaCopy(1, 160, 338, 271 - 36, 479 - 125, 98, 135);
820
     DWIN_Frame_AreaCopy(1, 103, 321, 271 - 0, 479 - 144, 52, 192);
831
     DWIN_Frame_AreaCopy(1, 103, 321, 271 - 0, 479 - 144, 52, 192);
821
     DWIN_ICON_Show(ICON, ICON_Continue_C, 26, 307);
832
     DWIN_ICON_Show(ICON, ICON_Continue_C, 26, 307);
834
   Clear_Main_Window();
845
   Clear_Main_Window();
835
   Draw_Popup_Bkgd_60();
846
   Draw_Popup_Bkgd_60();
836
   DWIN_ICON_Show(ICON, ICON_BLTouch, 101, 105);
847
   DWIN_ICON_Show(ICON, ICON_BLTouch, 101, 105);
837
-  if (HMI_flag.language_flag) {
848
+  if (HMI_flag.language_chinese) {
838
     DWIN_Frame_AreaCopy(1, 0, 371, 33, 386, 85, 240);
849
     DWIN_Frame_AreaCopy(1, 0, 371, 33, 386, 85, 240);
839
     DWIN_Frame_AreaCopy(1, 203, 286, 271, 302, 118, 240);
850
     DWIN_Frame_AreaCopy(1, 203, 286, 271, 302, 118, 240);
840
     DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280);
851
     DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280);
841
   }
852
   }
842
   else {
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
     DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 24, 260, (char*)"Please wait until completed");
855
     DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 24, 260, (char*)"Please wait until completed");
845
   }
856
   }
846
 }
857
 }
849
   Clear_Main_Window();
860
   Clear_Main_Window();
850
   Draw_Popup_Bkgd_60();
861
   Draw_Popup_Bkgd_60();
851
   DWIN_ICON_Show(ICON, ICON_AutoLeveling, 101, 105);
862
   DWIN_ICON_Show(ICON, ICON_AutoLeveling, 101, 105);
852
-  if (HMI_flag.language_flag) {
863
+  if (HMI_flag.language_chinese) {
853
     DWIN_Frame_AreaCopy(1, 0, 371, 100, 386, 84, 240);
864
     DWIN_Frame_AreaCopy(1, 0, 371, 100, 386, 84, 240);
854
     DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280);
865
     DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280);
855
   }
866
   }
856
   else {
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
     DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 24, 260, (char*)"Please wait until completed");
869
     DWIN_Draw_String(false, true, font8x16, Font_window, Background_window, 24, 260, (char*)"Please wait until completed");
859
   }
870
   }
860
 }
871
 }
872
 void Popup_window_PauseOrStop(void) {
883
 void Popup_window_PauseOrStop(void) {
873
   Clear_Main_Window();
884
   Clear_Main_Window();
874
   Draw_Popup_Bkgd_60();
885
   Draw_Popup_Bkgd_60();
875
-  if (HMI_flag.language_flag) {
886
+  if (HMI_flag.language_chinese) {
876
     if (select_print.now == 1) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150);
887
     if (select_print.now == 1) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150);
877
     else if (select_print.now == 2) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150);
888
     else if (select_print.now == 2) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150);
878
     DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150);
889
     DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150);
880
     DWIN_ICON_Show(ICON, ICON_Cancel_C, 146, 280);
891
     DWIN_ICON_Show(ICON, ICON_Cancel_C, 146, 280);
881
   }
892
   }
882
   else {
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
     DWIN_ICON_Show(ICON, ICON_Confirm_E, 26, 280);
896
     DWIN_ICON_Show(ICON, ICON_Confirm_E, 26, 280);
886
     DWIN_ICON_Show(ICON, ICON_Cancel_E, 146, 280);
897
     DWIN_ICON_Show(ICON, ICON_Cancel_E, 146, 280);
887
   }
898
   }
889
 }
900
 }
890
 
901
 
891
 void Draw_Printing_Screen(void) {
902
 void Draw_Printing_Screen(void) {
892
-  if (HMI_flag.language_flag) {
903
+  if (HMI_flag.language_chinese) {
893
     DWIN_Frame_AreaCopy(1, 30,  1, 271 - 200, 479 - 465,  14,   9);// Tune
904
     DWIN_Frame_AreaCopy(1, 30,  1, 271 - 200, 479 - 465,  14,   9);// Tune
894
     DWIN_Frame_AreaCopy(1,  0, 72, 271 - 208, 479 - 393,  41, 188);// Pause
905
     DWIN_Frame_AreaCopy(1,  0, 72, 271 - 208, 479 - 393,  41, 188);// Pause
895
     DWIN_Frame_AreaCopy(1, 65, 72, 271 - 143, 479 - 393, 176, 188); // Stop
906
     DWIN_Frame_AreaCopy(1, 65, 72, 271 - 143, 479 - 393, 176, 188); // Stop
949
 
960
 
950
   Clear_Main_Window();
961
   Clear_Main_Window();
951
 
962
 
952
-  if (HMI_flag.language_flag) {
963
+  if (HMI_flag.language_chinese) {
953
     DWIN_Frame_AreaCopy(1, 2, 2, 271 - 244, 479 - 465, 14, 9); // "Home"
964
     DWIN_Frame_AreaCopy(1, 2, 2, 271 - 244, 479 - 465, 14, 9); // "Home"
954
   }
965
   }
955
   else {
966
   else {
1715
   DWIN_Draw_String(false, false, font8x16, White, Background_black, (DWIN_WIDTH - strlen(MACHINE_SIZE) * MENU_CHR_W) / 2, 122, (char*)MACHINE_SIZE);
1726
   DWIN_Draw_String(false, false, font8x16, White, Background_black, (DWIN_WIDTH - strlen(MACHINE_SIZE) * MENU_CHR_W) / 2, 122, (char*)MACHINE_SIZE);
1716
   DWIN_Draw_String(false, false, font8x16, White, Background_black, (DWIN_WIDTH - strlen(SHORT_BUILD_VERSION) * MENU_CHR_W) / 2, 195, (char*)SHORT_BUILD_VERSION);
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
     DWIN_Frame_AreaCopy(1, 30, 17, 271 - 214, 479 - 450, 14, 8);
1730
     DWIN_Frame_AreaCopy(1, 30, 17, 271 - 214, 479 - 450, 14, 8);
1720
 
1731
 
1721
     DWIN_Frame_AreaCopy(1, 197, 149, 271 - 19, 479 - 318, 108, 102);
1732
     DWIN_Frame_AreaCopy(1, 197, 149, 271 - 19, 479 - 318, 108, 102);
1746
 inline void Draw_Print_File_Menu() {
1757
 inline void Draw_Print_File_Menu() {
1747
   Clear_Title_Bar();
1758
   Clear_Title_Bar();
1748
 
1759
 
1749
-  if (HMI_flag.language_flag) {
1760
+  if (HMI_flag.language_chinese) {
1750
     DWIN_Frame_AreaCopy(1, 0, 31, 271 - 216, 479 - 435, 14, 8);
1761
     DWIN_Frame_AreaCopy(1, 0, 31, 271 - 216, 479 - 435, 14, 8);
1751
   }
1762
   }
1752
   else {
1763
   else {
2093
 inline void Draw_Move_Menu() {
2104
 inline void Draw_Move_Menu() {
2094
   Clear_Main_Window();
2105
   Clear_Main_Window();
2095
 
2106
 
2096
-  if (HMI_flag.language_flag) {
2107
+  if (HMI_flag.language_chinese) {
2097
     DWIN_Frame_AreaCopy(1, 192, 1, 271 - 38, 479 - 465, 14, 8);
2108
     DWIN_Frame_AreaCopy(1, 192, 1, 271 - 38, 479 - 465, 14, 8);
2098
     DWIN_Frame_AreaCopy(1, 58, 118, 271 - 165, 479 - 347, LBLX, MBASE(1));
2109
     DWIN_Frame_AreaCopy(1, 58, 118, 271 - 165, 479 - 347, LBLX, MBASE(1));
2099
     DWIN_Frame_AreaCopy(1, 109, 118, 271 - 114, 479 - 347, LBLX, MBASE(2));
2110
     DWIN_Frame_AreaCopy(1, 109, 118, 271 - 114, 479 - 347, LBLX, MBASE(2));
2239
         break;
2250
         break;
2240
       case 8: // language
2251
       case 8: // language
2241
         /* select language */
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
           DWIN_JPG_CacheTo1(Language_Chinese);
2256
           DWIN_JPG_CacheTo1(Language_Chinese);
2246
         }
2257
         }
2247
         else {
2258
         else {
2248
-          set_english_to_eeprom();
2259
+          HMI_SetAndSaveLanguageWestern();
2249
           DWIN_JPG_CacheTo1(Language_English);
2260
           DWIN_JPG_CacheTo1(Language_English);
2250
         }
2261
         }
2251
         Draw_Prepare_Menu();
2262
         Draw_Prepare_Menu();
2260
 void Draw_Temperature_Menu() {
2271
 void Draw_Temperature_Menu() {
2261
   Clear_Main_Window();
2272
   Clear_Main_Window();
2262
 
2273
 
2263
-  if (HMI_flag.language_flag) {
2274
+  if (HMI_flag.language_chinese) {
2264
     DWIN_Frame_AreaCopy(1, 236, 2, 271 - 8, 479 - 466, 14, 8);
2275
     DWIN_Frame_AreaCopy(1, 236, 2, 271 - 8, 479 - 466, 14, 8);
2265
 
2276
 
2266
     DWIN_Frame_AreaCopy(1, 1, 134, 271 - 215, 479 - 333, LBLX, MBASE(1));
2277
     DWIN_Frame_AreaCopy(1, 1, 134, 271 - 215, 479 - 333, LBLX, MBASE(1));
2272
   else {
2283
   else {
2273
     #ifdef USE_STRING_HEADINGS
2284
     #ifdef USE_STRING_HEADINGS
2274
       Draw_Title(GET_TEXT_F(MSG_TEMPERATURE));
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
     #else
2291
     #else
2276
       DWIN_Frame_AreaCopy(1, 56, 16, 271 - 130, 479 - 450 - 1, 14, 8);
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
     #endif
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
   Draw_Back_First(select_temp.now == 0);
2307
   Draw_Back_First(select_temp.now == 0);
2319
         Draw_More_Icon(2 + MROWS - index_control); // Motion >
2334
         Draw_More_Icon(2 + MROWS - index_control); // Motion >
2320
         if (index_control > MROWS) {
2335
         if (index_control > MROWS) {
2321
           Draw_More_Icon(6 + MROWS - index_control); // Info >
2336
           Draw_More_Icon(6 + MROWS - index_control); // Info >
2322
-          if (HMI_flag.language_flag)
2337
+          if (HMI_flag.language_chinese)
2323
             DWIN_Frame_AreaCopy(1, 231, 104, 271 - 13, 479 - 363, LBLX, MBASE(5));
2338
             DWIN_Frame_AreaCopy(1, 231, 104, 271 - 13, 479 - 363, LBLX, MBASE(5));
2324
           else
2339
           else
2325
             DWIN_Frame_AreaCopy(1, 0, 104, 271 - 247, 479 - 365, LBLX, MBASE(5));
2340
             DWIN_Frame_AreaCopy(1, 0, 104, 271 - 247, 479 - 365, LBLX, MBASE(5));
2523
 
2538
 
2524
             Clear_Main_Window();
2539
             Clear_Main_Window();
2525
 
2540
 
2526
-            if (HMI_flag.language_flag) {
2541
+            if (HMI_flag.language_chinese) {
2527
               DWIN_Frame_AreaCopy(1, 59, 16, 271 - 132, 479 - 450, 14, 8);
2542
               DWIN_Frame_AreaCopy(1, 59, 16, 271 - 132, 479 - 450, 14, 8);
2528
 
2543
 
2529
               DWIN_Frame_AreaCopy(1, 100, 89, 124, 479 - 378, LBLX, MBASE(1));
2544
               DWIN_Frame_AreaCopy(1, 100, 89, 124, 479 - 378, LBLX, MBASE(1));
2537
             else {
2552
             else {
2538
               #ifdef USE_STRING_HEADINGS
2553
               #ifdef USE_STRING_HEADINGS
2539
                 Draw_Title("PLA Settings"); // TODO: GET_TEXT_F
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
               #else
2559
               #else
2541
                 DWIN_Frame_AreaCopy(1, 56, 16, 271 - 130, 479 - 450 - 1, 14, 8);
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
               #endif
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
             Draw_Back_First();
2573
             Draw_Back_First();
2572
 
2590
 
2573
             Clear_Main_Window();
2591
             Clear_Main_Window();
2574
 
2592
 
2575
-            if (HMI_flag.language_flag) {
2593
+            if (HMI_flag.language_chinese) {
2576
               DWIN_Frame_AreaCopy(1, 142, 16, 271 - 48, 479 - 450, 14, 8);
2594
               DWIN_Frame_AreaCopy(1, 142, 16, 271 - 48, 479 - 450, 14, 8);
2577
 
2595
 
2578
               DWIN_Frame_AreaCopy(1, 180, 89, 204, 479 - 379, LBLX, MBASE(1));
2596
               DWIN_Frame_AreaCopy(1, 180, 89, 204, 479 - 379, LBLX, MBASE(1));
2587
             else {
2605
             else {
2588
               #ifdef USE_STRING_HEADINGS
2606
               #ifdef USE_STRING_HEADINGS
2589
                 Draw_Title("ABS Settings"); // TODO: GET_TEXT_F
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
               #else
2612
               #else
2591
                 DWIN_Frame_AreaCopy(1, 56, 16, 271 - 130, 479 - 450 - 1, 14, 8);
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
               #endif
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
             Draw_Back_First();
2627
             Draw_Back_First();
2624
 inline void Draw_Max_Speed_Menu() {
2645
 inline void Draw_Max_Speed_Menu() {
2625
   Clear_Main_Window();
2646
   Clear_Main_Window();
2626
 
2647
 
2627
-  if (HMI_flag.language_flag) {
2648
+  if (HMI_flag.language_chinese) {
2628
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2649
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2629
 
2650
 
2630
     auto say_max_speed = [](const uint16_t row) {
2651
     auto say_max_speed = [](const uint16_t row) {
2643
   else {
2664
   else {
2644
     #ifdef USE_STRING_HEADINGS
2665
     #ifdef USE_STRING_HEADINGS
2645
       Draw_Title("Max Speed (mm/s)"); // TODO: GET_TEXT_F
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
     #else
2671
     #else
2647
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
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
   Draw_Back_First();
2691
   Draw_Back_First();
2675
 inline void Draw_Max_Accel_Menu() {
2700
 inline void Draw_Max_Accel_Menu() {
2676
   Clear_Main_Window();
2701
   Clear_Main_Window();
2677
 
2702
 
2678
-  if (HMI_flag.language_flag) {
2703
+  if (HMI_flag.language_chinese) {
2679
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2704
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2680
 
2705
 
2681
     DWIN_Frame_AreaCopy(1, 173, 133, 200, 479 - 332, LBLX, MBASE(1));
2706
     DWIN_Frame_AreaCopy(1, 173, 133, 200, 479 - 332, LBLX, MBASE(1));
2693
   }
2718
   }
2694
   else {
2719
   else {
2695
     #ifdef USE_STRING_HEADINGS
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
     #else
2726
     #else
2698
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
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
     #endif
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
   Draw_Back_First();
2735
   Draw_Back_First();
2715
 inline void Draw_Max_Jerk_Menu() {
2744
 inline void Draw_Max_Jerk_Menu() {
2716
   Clear_Main_Window();
2745
   Clear_Main_Window();
2717
 
2746
 
2718
-  if (HMI_flag.language_flag) {
2747
+  if (HMI_flag.language_chinese) {
2719
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2748
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2720
 
2749
 
2721
     DWIN_Frame_AreaCopy(1, 173, 133, 200, 479 - 332, LBLX, MBASE(1));
2750
     DWIN_Frame_AreaCopy(1, 173, 133, 200, 479 - 332, LBLX, MBASE(1));
2737
   }
2766
   }
2738
   else {
2767
   else {
2739
     #ifdef USE_STRING_HEADINGS
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
     #else
2774
     #else
2742
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
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
     #endif
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
   Draw_Back_First();
2798
   Draw_Back_First();
2775
 inline void Draw_Steps_Menu() {
2807
 inline void Draw_Steps_Menu() {
2776
   Clear_Main_Window();
2808
   Clear_Main_Window();
2777
 
2809
 
2778
-  if (HMI_flag.language_flag) {
2810
+  if (HMI_flag.language_chinese) {
2779
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2811
     DWIN_Frame_AreaCopy(1, 1, 16, 271 - 243, 479 - 451, 14, 8);
2780
 
2812
 
2781
     DWIN_Frame_AreaCopy(1, 153, 148, 271 - 77, 479 - 318, LBLX, MBASE(1));
2813
     DWIN_Frame_AreaCopy(1, 153, 148, 271 - 77, 479 - 318, LBLX, MBASE(1));
2789
   }
2821
   }
2790
   else {
2822
   else {
2791
     #ifdef USE_STRING_HEADINGS
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
     #else
2829
     #else
2794
       DWIN_Frame_AreaCopy(1, 144, 16, 271 - 82, 479 - 453, 14, 8);
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
     #endif
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
   Draw_Back_First();
2838
   Draw_Back_First();
2947
         break;
2983
         break;
2948
       case 6: // Language
2984
       case 6: // Language
2949
         // Select language
2985
         // Select language
2950
-        HMI_flag.language_flag = !HMI_flag.language_flag;
2986
+        HMI_flag.language_chinese ^= true;
2951
 
2987
 
2952
         Clear_Main_Window();
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
           DWIN_JPG_CacheTo1(Language_Chinese);
2992
           DWIN_JPG_CacheTo1(Language_Chinese);
2957
         }
2993
         }
2958
         else {
2994
         else {
2959
-          set_english_to_eeprom();
2995
+          HMI_SetAndSaveLanguageWestern();
2960
           DWIN_JPG_CacheTo1(Language_English);
2996
           DWIN_JPG_CacheTo1(Language_English);
2961
         }
2997
         }
2962
 
2998
 
3304
     delay(20);
3340
     delay(20);
3305
   }
3341
   }
3306
 
3342
 
3307
-  lcd_select_language();
3343
+  HMI_SetLanguage();
3308
 
3344
 
3309
   #if ENABLED(FIX_MOUNTED_PROBE) // For "CREALITY_TOUCH" probe too?
3345
   #if ENABLED(FIX_MOUNTED_PROBE) // For "CREALITY_TOUCH" probe too?
3310
     SET_OUTPUT(COM_PIN);
3346
     SET_OUTPUT(COM_PIN);
3345
 
3381
 
3346
       // show print done confirm
3382
       // show print done confirm
3347
       DWIN_Draw_Rectangle(1, Background_black, 0, 250,  271, 360);
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
     else if (HMI_flag.pause_flag != printingIsPaused()) {
3386
     else if (HMI_flag.pause_flag != printingIsPaused()) {
3351
       // print status update
3387
       // print status update

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

244
 } HMI_value_t;
244
 } HMI_value_t;
245
 
245
 
246
 typedef struct {
246
 typedef struct {
247
-  bool language_flag;  // 0: EN, 1: CN
247
+  bool language_chinese;  // 0: EN, 1: CN
248
   bool pause_flag:1;
248
   bool pause_flag:1;
249
   bool print_finish:1;
249
   bool print_finish:1;
250
   bool confirm_flag:1;
250
   bool confirm_flag:1;
269
 extern HMI_Flag    HMI_flag;
269
 extern HMI_Flag    HMI_flag;
270
 
270
 
271
 // Language
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
 // Show ICO
276
 // Show ICO
277
 void ICON_Print(bool show);
277
 void ICON_Print(bool show);

Loading…
Cancel
Save