Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text #443

Merged
merged 28 commits into from
Apr 26, 2020
Merged

Text #443

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9b9c905
assetlib.py: Add DelayedThreadExecutor
AstraLuma Apr 18, 2020
44eef0e
assets: Add test for DelayedThreadExecutor
AstraLuma Apr 18, 2020
00749f2
assetlib: start using DelayedThreadExecutor
AstraLuma Apr 18, 2020
c55b613
assets: Fix up how accounting is done.
AstraLuma Apr 18, 2020
05bd8bd
assets: add BackgroundAsset and Asset
AstraLuma Apr 18, 2020
0bc2cf6
assets: Some refactoring
AstraLuma Apr 18, 2020
445227f
test_assets.py: Re-add the clean_assets fixture
AstraLuma Apr 18, 2020
7c2811e
assets: Keep load() and is_loaded() documented.
AstraLuma Apr 18, 2020
0c860cd
assetlib.py: Remove unused import
AstraLuma Apr 18, 2020
5bdadaf
assetlib.py: Add MockFuture
AstraLuma Apr 18, 2020
574d913
assetlib.py: Rewrite MockFuture to be based on Future
AstraLuma Apr 18, 2020
d69e22e
assetlib.py: Add ChainingMixin
AstraLuma Apr 18, 2020
9ee8f63
assetlib.py: update __all__
AstraLuma Apr 19, 2020
de570d8
assetlib.py: remove unused force_background_thread
AstraLuma Apr 19, 2020
7401145
assets: Add chaining test
AstraLuma Apr 19, 2020
228f5bc
Move all SDL calling code to _sdl_utils
AstraLuma Apr 21, 2020
418608e
getting-started.rst: Add libsdl2-ttf to installation instructions
AstraLuma Apr 21, 2020
a67d5f7
_sdl_utils.py: Add ttf calling
AstraLuma Apr 21, 2020
8abe515
renderer.py: Initialize SDL2_ttf
AstraLuma Apr 21, 2020
a15ec68
cirrus: install libsdl2-ttf
AstraLuma Apr 21, 2020
fa8ce44
Add ppb.systems.text and Font
AstraLuma Apr 21, 2020
d2cf780
Implement Text
AstraLuma Apr 21, 2020
dca98ef
text: keep the font RW object around, freetype needs it.
AstraLuma Apr 21, 2020
b7394b4
assetlib.py: rewrite how chaining works
AstraLuma Apr 21, 2020
df30409
Got SDL_ttf to stop crashing
AstraLuma Apr 21, 2020
dbf81d5
Merge remote-tracking branch 'mine/chained-assets' into text
AstraLuma Apr 21, 2020
05d223c
text.py: Fix up some reprs
AstraLuma Apr 21, 2020
e818ece
Add text viztest
AstraLuma Apr 21, 2020
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
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ task:
fi
- >-
apt-get update || true;
apt-get install -qq -y libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0
apt-get install -qq -y libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0 libsdl2-ttf-2.0-0

script:
- command -v pypy3 >/dev/null && export PY=pypy3
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Additionally, on Linux only you must install the SDL library:

Debian, Ubuntu::

sudo apt install libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0
sudo apt install libsdl2-2.0-0 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-gfx-1.0-0 libsdl2-ttf-2.0-0

You should see a few libraries get put together in your terminal, and when
you have a prompt again, we're ready to go!
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ system and the data logistics.

Called in the background thread.

.. automethod:: load(timeout: float = None)

.. automethod:: is_loaded()


Subclassing
~~~~~~~~~~~
Expand Down
4 changes: 3 additions & 1 deletion ppb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
from ppb.sprites import Sprite
from ppb.systems import Image
from ppb.systems import Sound
from ppb.systems import Font
from ppb.systems import Text

__all__ = (
# Shortcuts
'Vector', 'BaseScene', 'BaseSprite', 'Circle', 'Image', 'Sprite',
'Square', 'Sound', 'Triangle', 'events',
'Square', 'Sound', 'Triangle', 'events', 'Font', 'Text',
# Local stuff
'run', 'make_engine',
)
Expand Down
Loading