jwlodek / py_cui

A python library for intuitively creating CUI/TUI interfaces with widgets, inspired by gocui.
https://jwlodek.github.io/py_cui-docs
BSD 3-Clause "New" or "Revised" License
752 stars 42 forks source link

Check whether a menu is empty elegantly #142

Closed lenormf closed 2 years ago

lenormf commented 3 years ago

Is your feature request related to a problem? Please describe. I currently have to rely on get() returning None to check whether a menu is empty, which is inelegant. I can't check the index of the currently selected item either because of #139.

Describe the solution you'd like An implementation of empty() on menu classes.

jwlodek commented 2 years ago

This is now fixed on the v0.1.5 branch with a new is_empty function for menus.