lint and tidying

This commit is contained in:
Eric Froemling 2020-07-21 23:50:10 -07:00
parent 90651d00d8
commit 78bfd1241c
2 changed files with 13 additions and 56 deletions

View File

@ -12,8 +12,8 @@
- Default widget 'show_buffer' is now 20 instead of 0 (causes scrolling to stay slightly ahead of widget selection). This can be overridden with the ba.widget() call if anything breaks.
- Relocated ba.app.uiscale to ba.app.ui.uiscale
- Top level settings window now properly saves/restores its state again.
- BombSquad now has its own Exclusive Emojis in the Internal Game Keyboard.
- Added continuos CAPITAL letters typing feature in the Internal Game Keyboard.
- Added Emojis to the Internal Game Keyboard.
- Added continuous CAPITAL letters typing feature in the Internal Game Keyboard.
### 1.5.22 (20139)
- Button and key names now display correctly again on Android (and are cleaned up on other platforms too).

View File

@ -38,6 +38,7 @@ class OnScreenKeyboardWindow(ba.Window):
def __init__(self, textwidget: ba.Widget, label: str, max_chars: int):
# pylint: disable=too-many-locals
# pylint: disable=too-many-statements
self._target_text = textwidget
self._width = 700
self._height = 400
@ -261,63 +262,19 @@ class OnScreenKeyboardWindow(ba.Window):
elif self._mode in ['emoji', 'emoji2']:
chars = [
'💣',
'💥',
'🙂',
'😄',
'😆',
'😅',
'😂',
'',
'😀',
'😉',
'😇',
'😎',
'😰',
'😠',
'😈',
'😨',
'😛',
'😜',
'😝',
'😐',
'😑',
'😵',
'😬',
'😡',
'😌',
'😍']
'💣', '💥', '🙂', '😄', '😆', '😅', '😂', '', '😀', '😉', '😇', '😎',
'😰', '😠', '😈', '😨', '😛', '😜', '😝', '😐', '😑', '😵', '😬', '😡',
'😌', '😍'
]
if self._mode == 'emoji2':
chars = [
'😔',
'😥',
'😭',
'😖',
'😓',
'😉',
'😴',
'😷',
'👋',
'💯',
'🙏',
'💪',
'👀',
'💬',
'💀',
'',
'💩',
'👻',
'👽',
'👾',
'',
'💛',
'💚',
'💙',
'💜',
'💔']
'😔', '😥', '😭', '😖', '😓', '😉', '😴', '😷', '👋', '💯', '🙏', '💪',
'👀', '💬', '💀', '', '💩', '👻', '👽', '👾', '', '💛', '💚', '💙',
'💜', '💔'
]
ba.buttonwidget(edit=self._shift_button,
color=self._key_color_lit
if self._mode == 'emoji2' else self._key_color_dark,
color=self._key_color_lit if self._mode == 'emoji2'
else self._key_color_dark,
label=charstr(SpCh.SHIFT),
on_activate_call=self._emoji_mode_2)
ba.buttonwidget(edit=self._emoji_button,