Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion arcade/examples/gui_scrollable_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
from arcade.gui import UIManager, UIInputText, UITextArea
from arcade.gui.nine_patch import NinePatchTexture

# This is a special "nine-patch" texture that will stretch in the middle, but
# always keep the corners the same size. This is useful for making panels that
# can be any size.
TEX_GREY_PANEL = load_texture(":resources:gui_basic_assets/window/grey_panel.png")

LOREM_IPSUM = (
Expand Down Expand Up @@ -38,12 +41,16 @@ def __init__(self):
super().__init__()
self.ui = UIManager()

# The specific configuration for grey_panel.png
# 5 x 5 pixel corners that won't be stretched.
bg_tex = NinePatchTexture(
left=5,
right=5,
top=5,
bottom=5,
texture=TEX_GREY_PANEL)
texture=TEX_GREY_PANEL,
)

text_area = UITextArea(
x=100,
y=400,
Expand Down