0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-03-15 10:46:18 +00:00

📺 Fix Makefile build, improve Touch UI button titles (#22361)

This commit is contained in:
Marcio T 2021-07-14 21:13:08 -06:00 committed by Scott Lahteine
parent 7e50d8761d
commit 3be35a6bd6
25 changed files with 29 additions and 25 deletions

View file

@ -38,6 +38,8 @@
#include "../gcode/gcode.h"
#endif
#if EITHER(PSU_CONTROL, AUTO_POWER_CONTROL)
Power powerManager;
bool Power::psu_on;
@ -214,3 +216,5 @@ void Power::power_off() {
#endif
#endif // AUTO_POWER_CONTROL
#endif // PSU_CONTROL || AUTO_POWER_CONTROL

View file

@ -87,7 +87,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.tag(13) .button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE))
.tag(14) .button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS))
.colors(action_btn)
.tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
#undef GRID_COLS
#undef GRID_ROWS
}

View file

@ -54,7 +54,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
.tag(8).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_ADVANCED_SETTINGS))
.tag(9).button(BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_MENU))
.colors(action_btn)
.tag(1).button(BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.tag(1).button(BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
}
#undef GRID_COLS

View file

@ -54,7 +54,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
.enabled(!isPrinting()).tag(5).button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_MOVE_TO_HOME))
.enabled(!isPrinting()).tag(6).button(BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_RAISE_PLUNGER))
.enabled(!isPrinting()).tag(7).button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_RELEASE_XY_AXIS))
.colors(action_btn) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.colors(action_btn) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
}
#undef GRID_COLS
#undef GRID_ROWS

View file

@ -67,7 +67,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.tag(10).button(DISPLAY_POS, GET_TEXT_F(MSG_DISPLAY_MENU))
.tag(11).button(RESTORE_DEFAULTS_POS, GET_TEXT_F(MSG_RESTORE_DEFAULTS))
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -71,7 +71,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) {
#undef GRID_COLS
#define GRID_COLS 3
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -90,7 +90,7 @@ void LoadChocolateScreen::draw_buttons(draw_mode_t what) {
cmd.tag(3).button(x, y, h, v, GET_TEXT_F(MSG_FULL_LOAD));
ui.bounds(POLY(load_screen_back_btn), x, y, h, v);
cmd.tag(1).colors(action_btn).button(x, y, h, v, GET_TEXT_F(MSG_BACK));
cmd.tag(1).colors(action_btn).button(x, y, h, v, GET_TEXT_F(MSG_BUTTON_DONE));
}
void LoadChocolateScreen::draw_text(draw_mode_t what) {

View file

@ -68,7 +68,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
.tag(10).button(LEVELING_POS, GET_TEXT_F(MSG_LEVELING))
.tag(11).button(ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU))
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -65,7 +65,7 @@ void PreheatMenu::onRedraw(draw_mode_t what) {
}
#endif
cmd.colors(action_btn)
.tag(1) .button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.tag(1) .button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -77,7 +77,7 @@ void PreheatTimerScreen::draw_interaction_buttons(draw_mode_t what) {
CommandProcessor cmd;
cmd.colors(normal_btn)
.font(font_medium)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -94,7 +94,7 @@ void AboutScreen::onRedraw(draw_mode_t) {
.tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU));
#endif
cmd.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
bool AboutScreen::onTouchEnd(uint8_t tag) {

View file

@ -111,7 +111,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.enabled(ENABLED(BACKLASH_GCODE))
.tag(8).button(BACKLASH_POS, GET_TEXT_F(MSG_BACKLASH))
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -61,7 +61,7 @@ BaseNumericAdjustmentScreen::widgets_t::widgets_t(draw_mode_t what) : _what(what
#else
BTN_POS(15,7), BTN_SIZE(4,1),
#endif
GET_TEXT_F(MSG_BACK), true, true
GET_TEXT_F(MSG_BUTTON_DONE), true, true
);
_line = 1;

View file

@ -136,7 +136,7 @@ void BedMeshEditScreen::drawHighlightedPointValue() {
if (mydata.highlight.x != NONE)
draw_adjuster(cmd, Z_VALUE_POS, 3, getHighlightedValue(), GET_TEXT_F(MSG_UNITS_MM), 4, 3);
cmd.colors(mydata.needSave ? normal_btn : action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_BACK))
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE))
.colors(mydata.needSave ? action_btn : normal_btn)
.enabled(mydata.needSave)
.tag(2).button(SAVE_POS, GET_TEXT_F(MSG_TOUCHMI_SAVE));

View file

@ -224,7 +224,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) {
.tag(6) .enabled(t_ok).button (LOAD_MOMN_POS, GET_TEXT_F(MSG_MOMENTARY))
.tag(7).TOG_STYLE(tog7).enabled(t_ok).button (UNLD_CONT_POS, GET_TEXT_F(MSG_CONTINUOUS))
.tag(8).TOG_STYLE(tog8).enabled(t_ok).button (LOAD_CONT_POS, GET_TEXT_F(MSG_CONTINUOUS))
.tag(1).colors(action_btn) .button (BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).colors(action_btn) .button (BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -135,7 +135,7 @@ void CustomUserMenus::onRedraw(draw_mode_t what) {
_USER_ITEM(20)
#endif
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -120,7 +120,7 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) {
cmd.font(font_medium)
.colors(action_btn)
.tag(1).button(BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXT_F(MSG_BACK));
.tag(1).button(BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXT_F(MSG_BUTTON_DONE));
#undef GRID_COLS
#undef GRID_ROWS
}

View file

@ -63,7 +63,7 @@ void FilamentMenu::onRedraw(draw_mode_t what) {
.enabled(ENABLED(LIN_ADVANCE))
.tag(3).button(LIN_ADVANCE_POS, GET_TEXT_F(MSG_LINEAR_ADVANCE))
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -168,7 +168,7 @@ void FilesScreen::drawFooter() {
cmd.colors(normal_btn)
.font(font_medium)
.colors(has_selection ? normal_btn : action_btn)
.tag(back_tag).button(BTN_POS(4,y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BACK))
.tag(back_tag).button(BTN_POS(4,y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_DONE))
.enabled(has_selection)
.colors(has_selection ? action_btn : normal_btn);

View file

@ -108,11 +108,11 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
.colors(normal_btn)
.tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXT_F(MSG_SOUNDS))
.colors(action_btn)
.tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK));
.tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE));
#else
.tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUNDS))
.colors(action_btn)
.tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK));
.tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE));
#endif
}
}

View file

@ -102,7 +102,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) {
.tag(5).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED))
.tag(6).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED))
.colors(action_btn)
.tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK));
.tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -96,7 +96,7 @@ void LevelingMenu::onRedraw(draw_mode_t what) {
.tag(8).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST))
#endif
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -95,7 +95,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
.tag(11).button(CUSTOM_MENU_POS, GET_TEXT_F(MSG_CUSTOM_COMMANDS))
#endif
.colors(action_btn)
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -63,7 +63,7 @@ void StatisticsScreen::onRedraw(draw_mode_t what) {
if (what & FOREGROUND) {
cmd.font(Theme::font_medium)
.colors(action_btn)
.tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK));
.tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE));
}
}

View file

@ -92,7 +92,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
.tag(10).button(CASE_LIGHT_POS, GET_TEXT_F(MSG_CASE_LIGHT))
.tag(11).button(ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS))
.tag(1).colors(action_btn)
.button(BACK_POS, GET_TEXT_F(MSG_BACK));
.button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE));
}
#undef GRID_COLS
#undef GRID_ROWS