From 77952782bb68a6c44230072191fad896242f351d Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Tue, 30 May 2023 02:33:00 +0200 Subject: [PATCH] Capped Zoom on Charter Fixed missing misses on bf pixel --- assets/data/characters/bf-pixel.xml | 5 +++++ source/funkin/editors/charter/Charter.hx | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/assets/data/characters/bf-pixel.xml b/assets/data/characters/bf-pixel.xml index c6e103b1..fe0231cb 100644 --- a/assets/data/characters/bf-pixel.xml +++ b/assets/data/characters/bf-pixel.xml @@ -7,4 +7,9 @@ + + + + + \ No newline at end of file diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 3baf3c0e..f39e1e5b 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -766,8 +766,14 @@ class Charter extends UIState { } } - var zoom:Float = 0; - var __camZoom:Float = 1; + var zoom(default, set):Float = 0; + var __camZoom(default, set):Float = 1; + function set_zoom(val:Float) { + return zoom = FlxMath.bound(val, -3.5, 1.75); // makes zooming not lag behind when continuing scrolling + } + function set___camZoom(val:Float) { + return __camZoom = FlxMath.bound(val, 0.1, 3); + } // TOP MENU OPTIONS #if REGION