aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/display/display.py
diff options
context:
space:
mode:
authorJanar Sööt <janar.soot@gmail.com>2018-12-20 21:09:19 +0200
committerKevin O'Connor <kevin@koconnor.net>2019-01-07 21:39:50 -0500
commit0cbe8517772ddeb70b90e887bcf170164dbf74cd (patch)
tree95ad118009b7a404abeacc16b1beaf3ff4cc6138 /klippy/extras/display/display.py
parent005cbe157ac74e79043a55cf31bd04e67f7e1707 (diff)
downloadkutter-0cbe8517772ddeb70b90e887bcf170164dbf74cd.tar.gz
kutter-0cbe8517772ddeb70b90e887bcf170164dbf74cd.tar.xz
kutter-0cbe8517772ddeb70b90e887bcf170164dbf74cd.zip
menu: enhancements
- changes that make easier to use menu as module UI - new helper method for delayed callbacks - method for getting the menu instance from display - new action for sending menu:action events - allow_without_selection option for cards Signed-off-by: Janar Sööt <janar.soot@gmail.com>
Diffstat (limited to 'klippy/extras/display/display.py')
-rw-r--r--klippy/extras/display/display.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/klippy/extras/display/display.py b/klippy/extras/display/display.py
index 7f880016..8e05cd2d 100644
--- a/klippy/extras/display/display.py
+++ b/klippy/extras/display/display.py
@@ -49,6 +49,9 @@ class PrinterLCD:
self.gcode.register_command('M117', self.cmd_M117)
# Start screen update timer
self.reactor.update_timer(self.screen_update_timer, self.reactor.NOW)
+ # Get menu instance
+ def get_menu(self):
+ return self.menu
# Graphics drawing
def animate_glyphs(self, eventtime, x, y, glyph_name, do_animate):
frame = do_animate and int(eventtime) & 1