Skip to content

Instantly share code, notes, and snippets.

@ZeikJT
Last active May 13, 2024 05:07
Show Gist options
  • Save ZeikJT/3856920953088f3e7bb1ad551fc6e4a4 to your computer and use it in GitHub Desktop.
Save ZeikJT/3856920953088f3e7bb1ad551fc6e4a4 to your computer and use it in GitHub Desktop.
default persistent.brightness = 1.0
screen preferences():
# Add these somewhere inside
label _("Brightness")
bar value VariableValue("persistent.brightness", 1.0)
image bg white = "#FFF"
image bg red = "#F00"
transform brightness_transform():
matrixcolor BrightnessMatrix(persistent.brightness - 1.0)
init python:
def brightness_changer(child, **properties):
return At(child, brightness_transform())
init python:
renpy.add_layer("background", above="master")
define config.tag_layer['bg'] = 'background'
define config.layer_transforms["background"] = [
brightness_changer
]
label start:
scene bg white
"Is white now"
scene bg red
"Is red now"
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment