forked from genewildish/Mainline
feat(core): add Camera abstraction for viewport scrolling
- Add Camera class with modes: vertical, horizontal, omni, floating - Refactor scroll.py and demo to use Camera abstraction - Add vis_offset for horizontal scrolling support - Add camera_x to EffectContext for effects - Add pygame window resize handling - Add HUD effect plugin for demo mode - Add --demo flag to run demo mode - Add tests for Camera and vis_offset
This commit is contained in:
@@ -87,10 +87,26 @@ class TestRenderTickerZone:
|
||||
|
||||
def test_returns_list(self):
|
||||
"""Returns a list of strings."""
|
||||
result, cache = layers.render_ticker_zone([], 0, 10, 80, {}, 0.0)
|
||||
result, cache = layers.render_ticker_zone(
|
||||
[],
|
||||
scroll_cam=0,
|
||||
camera_x=0,
|
||||
ticker_h=10,
|
||||
w=80,
|
||||
noise_cache={},
|
||||
grad_offset=0.0,
|
||||
)
|
||||
assert isinstance(result, list)
|
||||
|
||||
def test_returns_dict_for_cache(self):
|
||||
"""Returns a dict for the noise cache."""
|
||||
result, cache = layers.render_ticker_zone([], 0, 10, 80, {}, 0.0)
|
||||
result, cache = layers.render_ticker_zone(
|
||||
[],
|
||||
scroll_cam=0,
|
||||
camera_x=0,
|
||||
ticker_h=10,
|
||||
w=80,
|
||||
noise_cache={},
|
||||
grad_offset=0.0,
|
||||
)
|
||||
assert isinstance(cache, dict)
|
||||
|
||||
Reference in New Issue
Block a user