From f1790952879406fbd53d4ba03bca7fcfa533c572 Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Sat, 11 Nov 2023 20:49:53 +0100 Subject: [PATCH] Simplify some transforms --- game/scripts/utility/common_functions.rpy | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/game/scripts/utility/common_functions.rpy b/game/scripts/utility/common_functions.rpy index b6f8d03a..9c4b4d15 100644 --- a/game/scripts/utility/common_functions.rpy +++ b/game/scripts/utility/common_functions.rpy @@ -67,22 +67,19 @@ init python early: def clamp(n, smallest, largest): return max(smallest, min(n, largest)) - def white_tint(image): - return Transform( image, matrixcolor=TintMatrix((1.1, 1.1, 1.1)) ) + white_tint = Transform(image, matrixcolor=TintMatrix((1.1, 1.1, 1.1))) - def gray_tint(image): - return Transform( image, matrixcolor=SaturationMatrix(0.0) ) + gray_tint = Transform(image, matrixcolor=SaturationMatrix(0.0)) - def yellow_tint(image): - return Transform( image, matrixcolor=TintMatrix((1.2, 1.1, 0.7)) ) + yellow_tint = Transform(image, matrixcolor=TintMatrix((1.2, 1.1, 0.7))) def image_hover(image, brightness=0.12): """Returns slightly brighter image used during hover events""" - return Transform( image, matrixcolor=BrightnessMatrix(brightness) ) + return Transform(image, matrixcolor=BrightnessMatrix(brightness)) def image_alpha(image, alpha=0.5): """Returns an image with changed alpha 0 - fully transparent 1 - fully visible""" - return Transform( image, matrixcolor=OpacityMatrix(alpha) ) + return Transform(image, matrixcolor=OpacityMatrix(alpha)) def set_clipboard(txt): txt = str(txt)