Skip to content

Commit

Permalink
Implemented numeric mask input (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Apr 20, 2020
1 parent e20619b commit 3001282
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions resources/lib/kodi/ui/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def ask_for_pin(message):
args = {'heading': message,
'type': 0,
'defaultt': ''}
if not g.KODI_VERSION.is_major_ver('18'): # Kodi => 19.x support mask input
args['bHiddenInput'] = True
return xbmcgui.Dialog().numeric(**args) or None


Expand Down
3 changes: 2 additions & 1 deletion tests/xbmcgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def input(self, heading, defaultt='', type=0, option=0, autoclose=0): # pylint:
return 'Foobar'

@staticmethod
def numeric(type, heading, defaultt=''): # pylint: disable=redefined-builtin
# def numeric(type, heading, defaultt=''): # Kodi 18
def numeric(type, heading, defaultt='', bHiddenInput=False): # pylint: disable=redefined-builtin
"""A stub implementation for the xbmcgui Dialog class numeric() method"""
return

Expand Down

0 comments on commit 3001282

Please sign in to comment.