My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

about_screen.cpp 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /********************
  2. * about_screen.cpp *
  3. ********************/
  4. /****************************************************************************
  5. * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
  6. * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
  7. * *
  8. * This program is free software: you can redistribute it and/or modify *
  9. * it under the terms of the GNU General Public License as published by *
  10. * the Free Software Foundation, either version 3 of the License, or *
  11. * (at your option) any later version. *
  12. * *
  13. * This program is distributed in the hope that it will be useful, *
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  16. * GNU General Public License for more details. *
  17. * *
  18. * To view a copy of the GNU General Public License, go to the following *
  19. * location: <http://www.gnu.org/licenses/>. *
  20. ****************************************************************************/
  21. #include "../config.h"
  22. #if ENABLED(TOUCH_UI_FTDI_EVE)
  23. #include "screens.h"
  24. #define GRID_COLS 4
  25. #define GRID_ROWS 9
  26. using namespace FTDI;
  27. using namespace Theme;
  28. using namespace ExtUI;
  29. void AboutScreen::onEntry() {
  30. BaseScreen::onEntry();
  31. sound.play(chimes, PLAY_ASYNCHRONOUS);
  32. }
  33. void AboutScreen::onRedraw(draw_mode_t) {
  34. CommandProcessor cmd;
  35. cmd.cmd(CLEAR_COLOR_RGB(bg_color))
  36. .cmd(CLEAR(true,true,true))
  37. .cmd(COLOR_RGB(bg_text_enabled))
  38. .tag(0);
  39. draw_text_box(cmd, BTN_POS(1,2), BTN_SIZE(4,1),
  40. #ifdef CUSTOM_MACHINE_NAME
  41. F(CUSTOM_MACHINE_NAME)
  42. #else
  43. GET_TEXT_F(MSG_ABOUT_TOUCH_PANEL_1)
  44. #endif
  45. , OPT_CENTER, font_xlarge
  46. );
  47. #ifdef TOOLHEAD_NAME
  48. char about_str[
  49. strlen_P(GET_TEXT(FIRMWARE_FOR_TOOLHEAD)) +
  50. strlen_P(TOOLHEAD_NAME) +
  51. strlen_P(GET_TEXT(ABOUT_TOUCH_PANEL_2)) + 1
  52. ];
  53. sprintf_P(about_str, GET_TEXT(FIRMWARE_FOR_TOOLHEAD), TOOLHEAD_NAME);
  54. strcat_P (about_str, GET_TEXT(ABOUT_TOUCH_PANEL_2));
  55. #endif
  56. cmd.tag(2);
  57. draw_text_box(cmd, BTN_POS(1,3), BTN_SIZE(4,3),
  58. #ifdef TOOLHEAD_NAME
  59. about_str
  60. #else
  61. GET_TEXT_F(MSG_ABOUT_TOUCH_PANEL_2)
  62. #endif
  63. , OPT_CENTER, font_medium
  64. );
  65. cmd.tag(0);
  66. draw_text_box(cmd, BTN_POS(1,6), BTN_SIZE(4,2), progmem_str(getFirmwareName_str()), OPT_CENTER, font_medium);
  67. cmd.font(font_medium).colors(action_btn).tag(1).button(BTN_POS(2,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_OKAY));
  68. }
  69. bool AboutScreen::onTouchEnd(uint8_t tag) {
  70. switch (tag) {
  71. case 1: GOTO_PREVIOUS(); return true;
  72. #if ENABLED(TOUCH_UI_DEVELOPER_MENU)
  73. case 2: GOTO_SCREEN(DeveloperMenu); return true;
  74. #endif
  75. default: return false;
  76. }
  77. }
  78. #endif // TOUCH_UI_FTDI_EVE