🎨 ProUI cleanup

This commit is contained in:
Scott Lahteine 2023-01-08 04:18:24 -06:00
parent c3fe4abd44
commit 290a55ced1
4 changed files with 9 additions and 9 deletions

View file

@ -19,13 +19,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
* *
*/ */
/** /**
* Bed Level Tools for Pro UI * Bed Level Tools for Pro UI
* Extended by: Miguel A. Risco-Castillo (MRISCOC) * Extended by: Miguel A. Risco-Castillo (MRISCOC)
* Version: 2.1.0 * Version: 2.1.0
* Date: 2022/08/27 * Date: 2022/08/27
* *
* Based on the original work of: Henri-J-Norden * Based on the original work of: Henri-J-Norden
* https://github.com/Jyers/Marlin/pull/126 * https://github.com/Jyers/Marlin/pull/126
* *

View file

@ -25,7 +25,7 @@
* Extended by: Miguel A. Risco-Castillo (MRISCOC) * Extended by: Miguel A. Risco-Castillo (MRISCOC)
* Version: 2.1.0 * Version: 2.1.0
* Date: 2022/08/27 * Date: 2022/08/27
* *
* Based on the original work of: Henri-J-Norden * Based on the original work of: Henri-J-Norden
* https://github.com/Jyers/Marlin/pull/126 * https://github.com/Jyers/Marlin/pull/126
* *

View file

@ -399,7 +399,7 @@ void MenuClass::onScroll(bool dir) {
} }
void MenuClass::onClick() { void MenuClass::onClick() {
if (MenuItems[selected]->onClick != nullptr) (*MenuItems[selected]->onClick)(); if (MenuItems[selected]->onClick != nullptr) (*MenuItems[selected]->onClick)();
} }
CustomMenuItemClass *MenuClass::SelectedItem() { CustomMenuItemClass *MenuClass::SelectedItem() {
@ -410,8 +410,8 @@ CustomMenuItemClass** MenuClass::Items() {
return MenuItems; return MenuItems;
} }
int8_t MenuClass::count() { int8_t MenuClass::count() {
return MenuItemCount; return MenuItemCount;
}; };
/* MenuItem Class ===========================================================*/ /* MenuItem Class ===========================================================*/
@ -510,7 +510,7 @@ MenuItemClass* MenuItemAdd(uint8_t cicon, uint8_t id, uint16_t x1, uint16_t y1,
return MenuItemAdd(menuitem); return MenuItemAdd(menuitem);
} }
else return nullptr; else return nullptr;
} }
MenuItemClass* EditItemAdd(uint8_t cicon, const char * const text, OnDrawItem ondraw, OnClickItem onclick, void* val) { MenuItemClass* EditItemAdd(uint8_t cicon, const char * const text, OnDrawItem ondraw, OnClickItem onclick, void* val) {
if (MenuItemCount < MenuItemTotal) { if (MenuItemCount < MenuItemTotal) {

View file

@ -81,9 +81,9 @@ void Goto_PrintStats() {
// Print Stats Reset popup // Print Stats Reset popup
void Popup_ResetStats() { DWIN_Popup_ConfirmCancel(ICON_Info_0, GET_TEXT_F(MSG_RESET_STATS)); } void Popup_ResetStats() { DWIN_Popup_ConfirmCancel(ICON_Info_0, GET_TEXT_F(MSG_RESET_STATS)); }
void OnClick_ResetStats() { void OnClick_ResetStats() {
if (HMI_flag.select_flag) PrintStatsClass::Reset(); if (HMI_flag.select_flag) PrintStatsClass::Reset();
HMI_ReturnScreen(); HMI_ReturnScreen();
} }
void PrintStatsReset() { Goto_Popup(Popup_ResetStats, OnClick_ResetStats); } void PrintStatsReset() { Goto_Popup(Popup_ResetStats, OnClick_ResetStats); }