aboutsummaryrefslogtreecommitdiff
path: root/client/render.py
diff options
context:
space:
mode:
authorBilly Brown2017-12-02 16:29:14 +0000
committerBilly Brown2017-12-02 16:29:14 +0000
commit93429038e04b0084e44aff089b412277c69fc064 (patch)
tree578962af41b28aa22a7a8ddacd790451de7413db /client/render.py
parentCan render fullscreen, with relative offsets (diff)
downloadlongpong-93429038e04b0084e44aff089b412277c69fc064.tar.gz
longpong-93429038e04b0084e44aff089b412277c69fc064.zip

Renderer has rightmost edge measure

Diffstat (limited to 'client/render.py')
-rw-r--r--client/render.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/render.py b/client/render.py
index 3cc1d62..b501cfe 100644
--- a/client/render.py
+++ b/client/render.py
@@ -76,6 +76,12 @@ class Renderer:
sdl2.SDL_SetWindowSize(window.window, rect.w, rect.h)
sdl2.SDL_SetWindowFullscreen(window.window, sdl2.SDL_WINDOW_FULLSCREEN)
+ def get_rightmost_edge(self):
+ """
+ Get the relative coordinate of the rightmost edge.
+ """
+ return self.offset + sum(self.get_screen_widths())
+
def get_screen_widths(self):
"""
Get the relative screen widths in screen order.