Skip to content

Commit bed6837

Browse files
committed
Add: onFocusLoop function.
1 parent a758925 commit bed6837

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dependencies": {
1515
"name": "M5Stack"
1616
},
17-
"version": "0.2.7",
17+
"version": "0.2.8",
1818
"framework": "arduino",
1919
"platforms": "espressif32",
2020
"build": {

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=M5Stack_TreeView
2-
version=0.2.7
2+
version=0.2.8
33
author=lovyan03
44
maintainer=Lovyan <[email protected]>
55
sentence=TreeView Menu UI for M5Stack

src/M5TreeView.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ MenuItem* M5TreeView::update(bool redraw) {
170170
if (oldFocus != focusItem) {
171171
scrollTarget(focusItem);
172172
}
173+
focusItem->onFocusLoop();
174+
173175
return res;
174176
}
175177

src/MenuItem.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class MenuItem {
6565
virtual void onEnter();
6666
virtual void onExit() { }
6767
virtual void onFocus() { }
68+
virtual void onFocusLoop() { }
6869
virtual void onDefocus() { }
6970
virtual void onAfterDraw();
7071

0 commit comments

Comments
 (0)