Skip to content

Commit

Permalink
Formatting is the least of the problems with this branch
Browse files Browse the repository at this point in the history
  • Loading branch information
pushfoo committed Jul 26, 2024
1 parent 95eb1fc commit f1690c3
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions arcade/gui/experimental/password_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@

import arcade.color
from arcade.gui import Surface, UIEvent, UIInputText, UITextInputEvent
from arcade.types import RGBOrA255, Color
from arcade.types import Color, RGBOrA255


class UIPasswordInput(UIInputText):
"""A password input field. The text is hidden with asterisks."""

def __init__(
self,
*,
x: float = 0,
y: float = 0,
width: float = 100,
height: float = 24,
text: str = "",
font_name=("Arial",),
font_size: float = 12,
text_color: RGBOrA255 = (0, 0, 0, 255),
multiline=False,
caret_color: RGBOrA255 = (0, 0, 0, 255),
size_hint=None,
size_hint_min=None,
size_hint_max=None,
**kwargs,
self,
*,
x: float = 0,
y: float = 0,
width: float = 100,
height: float = 24,
text: str = "",
font_name=("Arial",),
font_size: float = 12,
text_color: RGBOrA255 = (0, 0, 0, 255),
multiline=False,
caret_color: RGBOrA255 = (0, 0, 0, 255),
size_hint=None,
size_hint_min=None,
size_hint_max=None,
**kwargs,
):
replaced = '*' * len(text)
replaced = "*" * len(text)
super().__init__(
x=x,
y=y,
Expand All @@ -43,10 +43,10 @@ def __init__(
size_hint=size_hint,
size_hint_min=size_hint_min,
size_hint_max=size_hint_max,
**kwargs
**kwargs,
)
self._font_name=font_name
self._font_size=font_size
self._font_name = font_name
self._font_size = font_size
self._asterisk_color = Color.from_iterable(text_color)

@property
Expand Down Expand Up @@ -81,4 +81,3 @@ def do_render(self, surface: Surface):
color=self._asterisk_color,
)
super().do_render(surface)

0 comments on commit f1690c3

Please sign in to comment.