Skip to content

Commit fbf9660

Browse files
authored
fix(libsimu): move Menu wrapper methods to fix Windows build (#7015)
1 parent 6901c41 commit fbf9660

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

radio/src/gui/colorlcd/libui/menu.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,12 @@ void Menu::addLine(const MaskBitmap* icon_mask, const std::string& text,
400400
updatePosition();
401401
}
402402

403+
void Menu::addLine(const std::string &text, std::function<void()> onPress,
404+
std::function<bool()> isChecked)
405+
{
406+
addLine(nullptr, text, onPress, isChecked);
407+
}
408+
403409
void Menu::addLineBuffered(const MaskBitmap* icon_mask, const std::string& text,
404410
std::function<void()> onPress,
405411
std::function<bool()> isChecked)
@@ -408,6 +414,12 @@ void Menu::addLineBuffered(const MaskBitmap* icon_mask, const std::string& text,
408414
false);
409415
}
410416

417+
void Menu::addLineBuffered(const std::string &text, std::function<void()> onPress,
418+
std::function<bool()> isChecked)
419+
{
420+
addLineBuffered(nullptr, text, onPress, isChecked);
421+
}
422+
411423
void Menu::updateLines()
412424
{
413425
content->updateLines();

radio/src/gui/colorlcd/libui/menu.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,14 @@ class Menu : public ModalWindow
4949
std::function<bool()> isChecked = nullptr);
5050

5151
void addLine(const std::string &text, std::function<void()> onPress,
52-
std::function<bool()> isChecked = nullptr)
53-
{
54-
addLine(nullptr, text, onPress, isChecked);
55-
}
52+
std::function<bool()> isChecked = nullptr);
5653

5754
void addLineBuffered(const MaskBitmap *icon_mask, const std::string &text,
5855
std::function<void()> onPress,
5956
std::function<bool()> isChecked = nullptr);
6057

6158
void addLineBuffered(const std::string &text, std::function<void()> onPress,
62-
std::function<bool()> isChecked = nullptr)
63-
{
64-
addLineBuffered(nullptr, text, onPress, isChecked);
65-
}
59+
std::function<bool()> isChecked = nullptr);
6660

6761
void updateLines();
6862

0 commit comments

Comments
 (0)