File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class Label(displayio.Group):
58
58
:param int color: Color of all text in RGB hex
59
59
:param double line_spacing: Line spacing of text to display"""
60
60
61
- # pylint: disable=too-many-instance-attributes
61
+ # pylint: disable=too-many-instance-attributes, too-many-locals
62
62
# This has a lot of getters/setters, maybe it needs cleanup.
63
63
64
64
def __init__ (
@@ -77,6 +77,8 @@ def __init__(
77
77
padding_bottom = 0 ,
78
78
padding_left = 0 ,
79
79
padding_right = 0 ,
80
+ anchor_point = None ,
81
+ anchored_position = None ,
80
82
** kwargs
81
83
):
82
84
if "scale" in kwargs .keys ():
@@ -93,7 +95,10 @@ def __init__(
93
95
self .width = max_glyphs
94
96
self ._font = font
95
97
self ._text = None
96
- self ._anchor_point = (0 , 0 )
98
+ if anchor_point is None :
99
+ self ._anchor_point = (0 , 0 )
100
+ else :
101
+ self ._anchor_point = anchor_point
97
102
self .x = x
98
103
self .y = y
99
104
@@ -121,6 +126,8 @@ def __init__(
121
126
122
127
if text is not None :
123
128
self ._update_text (str (text ))
129
+ if anchored_position is not None :
130
+ self .anchored_position = anchored_position
124
131
125
132
def _create_background_box (self , lines , y_offset ):
126
133
You can’t perform that action at this time.
0 commit comments