Skip to content

Commit 3534b2f

Browse files
committed
swap function
#223 not tested yet
1 parent 9cbe7ea commit 3534b2f

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

examples/esp8266/WebMenu/platformio.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ build_flags =
3939
-DMENU_ASYNC
4040
-DMENU_FMT_WRAPS
4141
-DMENU_IDLE_BKGND
42-
-DNO_MENU_DEBUG
43-
-DNO_WEB_DEBUG
42+
-DMENU_DEBUG
43+
-DWEB_DEBUG
4444
-DMENU_SSID="\"r-site.net\"" -DMENU_PASS="\"rsite.2011\""
4545
src_build_flags = !echo "-Wno-write-strings -Wno-reorder -Wno-strict-aliasing -Wno-sign-compare -DLOC="$PLATFORMIO_LOC

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ArduinoMenu library
2-
version=4.15.2
2+
version=4.15.3
33
author=Rui Azevedo, [email protected]
44
maintainer=neu-rah, [email protected]
55
sentence=Generic menu/interactivity system

src/items.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@
246246
void clearChanged(const navNode &nav,const menuOut& out,bool sub) override;
247247
inline idx_t sz() const {return ((menuNodeShadow*)shadow)->_sz();}
248248
inline prompt* constMEM* data() const {return ((menuNodeShadow*)shadow)->_data();}
249+
#ifdef MENU_USERAM
250+
void swap(idx_t a,idx_t b) {
251+
auto ops=((menuNodeShadow*)shadow)->_data();
252+
auto tmp=ops[a];
253+
ops[a]=ops[b];
254+
ops[b]=tmp;
255+
}
256+
#endif
249257
// #ifdef MENU_ASYNC
250258
// prompt* seek(idx_t* uri,idx_t len) override;
251259
// #endif

0 commit comments

Comments
 (0)