Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change WORDWRAP to WORD_WRAP

  • Loading branch information...
commit 50a4a177eda9ba5a87784d8e4980a6092fb500ca 1 parent 95f2a64
Brian Hammond authored
2  pygameui/alert.py
View
@@ -22,7 +22,7 @@ def __init__(self, title, message, buttons=0xFF):
message_label = label.Label(pygame.Rect(
padding, 0, buttons_width, 1),
- message, wrap_mode=label.WORDWRAP)
+ message, wrap_mode=label.WORD_WRAP)
message_label.shrink_wrap()
size = (buttons_width,
padding * 6 + theme.label_height +
8 pygameui/label.py
View
@@ -11,7 +11,7 @@
TOP = 3
BOTTOM = 4
-WORDWRAP = 0
+WORD_WRAP = 0
CLIP = 1
@@ -23,7 +23,7 @@ class Label(view.View):
halign -- CENTER, LEFT, or RIGHT. Horizontal alignment of text.
valign -- CENTER, TOP, or BOTTOM. Vertical alignment of text.
- wrap_mode -- WORDWRAP or CLIP. Determines how text is wrapped to
+ wrap_mode -- WORD_WRAP or CLIP. Determines how text is wrapped to
fit within the label's frame width-wise. Text that is
wrapped to multiple rendered lines is clipped at the
bottom of the frame. After setting the text attribute,
@@ -55,7 +55,7 @@ def __init__(self, frame, text,
self.valign = CENTER
self.auto_resize_font = False
self.wrap_mode = wrap_mode
- assert wrap_mode in (WORDWRAP, CLIP)
+ assert wrap_mode in (WORD_WRAP, CLIP)
self._text_color = text_color
self.shadow_color = text_shadow_color
self.shadow_offset = (0, 1)
@@ -169,7 +169,7 @@ def _render(self, text):
self._resize_font_to_fit()
self.text_size = self._render_line(self._text, wants_shadows)
- elif self.wrap_mode == WORDWRAP:
+ elif self.wrap_mode == WORD_WRAP:
self._render_word_wrapped(text, wants_shadows)
def shrink_wrap(self):
2  pygameui/notification.py
View
@@ -29,7 +29,7 @@ def __init__(self, msg):
(0, 0), (window.rect.w // 3, window.rect.h // 2)),
msg, text_color=theme.dark_gray_color,
font=theme.default_font,
- wrap_mode=label.WORDWRAP)
+ wrap_mode=label.WORD_WRAP)
message_label.shrink_wrap()
text_size = message_label.text_size
Please sign in to comment.
Something went wrong with that request. Please try again.