Compare commits
No commits in common. "3d1d2d5acd460301eb66bb89231e7da8aa52cd78" and "58455be58a884373d68f075d5fc1eebcfc99726e" have entirely different histories.
3d1d2d5acd
...
58455be58a
|
@ -68,11 +68,10 @@ class CliMenuTheme:
|
|||
CYAN = CliMenuStyle('cyan', 'lightcyan', 'cyan')
|
||||
BLUE = CliMenuStyle('ansiblue', 'ansired', 'ansiblue')
|
||||
ANSI_CYAN = CliMenuStyle('ansicyan', 'ansibrightcyan', 'ansicyan')
|
||||
BOLD_HIGHLIGHT = CliMenuStyle(header_style='bold', highlight_style='bold fg:black bg:white')
|
||||
|
||||
|
||||
class CliMenu:
|
||||
default_style = CliMenuTheme.BASIC
|
||||
default_stye = CliMenuTheme.BASIC
|
||||
default_cursor = CliMenuCursor.TRIANGLE
|
||||
|
||||
def __init__(self, options=None, header=None, cursor=None, style=None,
|
||||
|
@ -92,7 +91,7 @@ class CliMenu:
|
|||
|
||||
self._style = style
|
||||
if not self._style:
|
||||
self._style = self.default_style
|
||||
self._style = self.default_stye
|
||||
|
||||
if header:
|
||||
self.add_header(header, indent=False)
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
from clintermission import CliMenu, CliMenuTheme
|
||||
|
||||
|
||||
def main():
|
||||
q = ["Foo", "Bar", "Baz baz baz baz baz"]
|
||||
m = CliMenu(q, "Time to choose:\n", style=CliMenuTheme.BOLD_HIGHLIGHT)
|
||||
|
||||
if m.success:
|
||||
print("You selected", m.get_selection())
|
||||
else:
|
||||
print("You aborted the selection")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in New Issue