Skip to content

Commit

Permalink
8.2 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Elckarow authored Jan 30, 2024
1 parent 83acf1a commit fa701e6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions autofocus.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ python early in autofocus:
self.previous = UNFOCUSED
self.target = UNFOCUSED

renpy_display_scenelists = renpy.display.scenelists
renpy_display_core = renpy.display.core

layer_thing = renpy_display_scenelists if renpy.version_tuple >= ((7, 7) if renpy.compat.PY2 else (8, 2)) else renpy_display_core

class _ComputeFocus(renpy.Displayable):
def __init__(self, tag):
super(_ComputeFocus, self).__init__()
Expand All @@ -129,7 +132,7 @@ python early in autofocus:
current_time = time.time()

showing_tags = set()
for layer in renpy_display_core.layers:
for layer in layer_thing.layers:
showing_tags |= renpy.get_showing_tags(layer)

tag = self.tag
Expand Down Expand Up @@ -172,4 +175,4 @@ default autofocus._autofocus_map = { }
default autofocus._force_focus = set()
default autofocus._blocked = set()

default autofocus.zorder = True
default autofocus.zorder = True

0 comments on commit fa701e6

Please sign in to comment.