From e7fe2544b2c96b830e6fca07cb31d1342727083c Mon Sep 17 00:00:00 2001 From: GManon Date: Sat, 27 May 2023 00:06:16 -0300 Subject: [PATCH] Makes buttons smaller in PC --- game/src/draw.rpy | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/game/src/draw.rpy b/game/src/draw.rpy index 227afcd..68ce7a3 100644 --- a/game/src/draw.rpy +++ b/game/src/draw.rpy @@ -504,8 +504,9 @@ init 150 python in draw_logic: del(_circle) -transform tf_draw_moveindown(p=0.0): +transform tf_draw_moveindown(p=0.0, scale=0.8): subpixel True alpha 0.0 + zoom scale pause p ypos -50 parallel: @@ -513,8 +514,9 @@ transform tf_draw_moveindown(p=0.0): parallel: linear 0.25 alpha 1 -transform tf_draw_moveoutup(p=0.0): +transform tf_draw_moveoutup(p=0.0, scale=0.8): subpixel True alpha 1 + zoom scale pause p ypos 0 parallel: @@ -522,8 +524,9 @@ transform tf_draw_moveoutup(p=0.0): parallel: linear 0.5 alpha 0.0 -transform tf_draw_moveinright(p=0.0): +transform tf_draw_moveinright(p=0.0, scale=0.8): subpixel True alpha 0.0 + zoom scale pause p xpos -50 parallel: @@ -531,8 +534,9 @@ transform tf_draw_moveinright(p=0.0): parallel: linear 0.25 alpha 1 -transform tf_draw_moveoutleft(p=0.0): +transform tf_draw_moveoutleft(p=0.0, scale=0.8): subpixel True alpha 1.0 + zoom scale pause p xpos 0 parallel: @@ -601,10 +605,17 @@ screen _draw_screen(draw_object): # I can't believe there's not a less hacky way to stack images in renpy screen draw_tool_button(icon,is_eraser,showing, delay): - if showing: - $ animation = tf_draw_moveindown(delay) + + if renpy.android: + $ scale = 1.0 else: - $ animation = tf_draw_moveoutup(delay) + $ scale = 0.8 + + if showing: + $ animation = tf_draw_moveindown(delay,scale) + else: + $ animation = tf_draw_moveoutup(delay,scale) + vbox: spacing -1000 @@ -627,10 +638,15 @@ screen draw_menu_buttons(filename, showing, label_functions): screen draw_menu_button(filename, label, function, showing, delay): - if showing: - $ animation = tf_draw_moveinright(delay) + if renpy.android: + $ scale = 1.0 else: - $ animation = tf_draw_moveoutleft(delay) + $ scale = 0.8 + + if showing: + $ animation = tf_draw_moveinright(delay,scale) + else: + $ animation = tf_draw_moveoutleft(delay,scale) button at animation: sensitive showing