From 1a6149c3ce669b5e55728e2e0309cc1215df8e7d Mon Sep 17 00:00:00 2001 From: Tanasart Date: Thu, 13 Jun 2024 07:38:14 +0700 Subject: [PATCH] - Fix bug when editing area in two point mode. --- scripts/globals/globals.gml | 2 +- scripts/node_mk_fracture/node_mk_fracture.gml | 1 + scripts/panel_preview/panel_preview.gml | 2 +- .../preview_overlay_area.gml | 16 ++++++++++++---- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index b53c4cbba..45801576e 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -38,7 +38,7 @@ LATEST_VERSION = 11700; VERSION = 11740; SAVE_VERSION = 11700; - VERSION_STRING = "1.17.4.001"; + VERSION_STRING = "1.17.4.002"; BUILD_NUMBER = 11740; globalvar HOTKEYS, HOTKEY_CONTEXT; diff --git a/scripts/node_mk_fracture/node_mk_fracture.gml b/scripts/node_mk_fracture/node_mk_fracture.gml index 2da2add32..1a68d9769 100644 --- a/scripts/node_mk_fracture/node_mk_fracture.gml +++ b/scripts/node_mk_fracture/node_mk_fracture.gml @@ -22,6 +22,7 @@ function Node_MK_Fracture(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou surface_set_target(_outSurf); DRAW_CLEAR + surface_reset_target(); return _outSurf; diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index 88f0ea3b7..7ec89f8f2 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -1401,7 +1401,7 @@ function Panel_Preview() : PanelContent() constructor { _hv = true; draw_circle_ui(_d3x, _d3y, d3_view_wz, _hv? 0 : 0.04, COLORS._main_icon, 0.3); - draw_sprite_ext(THEME.view_zoom, 0, _d3x, _d3y, 1, 1, 0, view_zoom_tool? COLORS._main_accent : COLORS._main_icon, 1); + draw_sprite_ui(THEME.view_zoom, 0, _d3x, _d3y, 1, 1, 0, view_zoom_tool? COLORS._main_accent : COLORS._main_icon, 1); } } diff --git a/scripts/preview_overlay_area/preview_overlay_area.gml b/scripts/preview_overlay_area/preview_overlay_area.gml index 3fd4624e0..e951af324 100644 --- a/scripts/preview_overlay_area/preview_overlay_area.gml +++ b/scripts/preview_overlay_area/preview_overlay_area.gml @@ -53,8 +53,7 @@ function preview_overlay_area_padding(interact, active, _x, _y, _s, _mx, _my, _s else if(drag_type == 4) _b = value_snap(drag_sy - (_my - drag_my) / _s, _sny); if(drag_type) { - var _svl = showValue(); - var _sval = array_clone(_svl); + var _sval = array_clone(showValue()); if(unit.mode == VALUE_UNIT.reference) { var _ref = unit.reference(); _sval[0] *= _ref[0]; @@ -170,11 +169,21 @@ function preview_overlay_area_two_point(interact, active, _x, _y, _s, _mx, _my, var _hov = [ 0, 0, 0 ]; var _r = 10; + if(drag_type) { + var _sval = array_clone(showValue()); + if(unit.mode == VALUE_UNIT.reference) { + var _ref = unit.reference(); + _sval[0] *= _ref[0]; + _sval[1] *= _ref[1]; + _sval[2] *= _ref[0]; + _sval[3] *= _ref[1]; + } + } + if(drag_type == 1) { var _xx = value_snap(drag_sx + (_mx - drag_mx) / _s, _snx); var _yy = value_snap(drag_sy + (_my - drag_my) / _s, _sny); - var _sval = array_clone(showValue()); _sval[0] = _xx; _sval[1] = _yy; @@ -189,7 +198,6 @@ function preview_overlay_area_two_point(interact, active, _x, _y, _s, _mx, _my, var _xx = value_snap(drag_sx + (_mx - drag_mx) / _s, _snx); var _yy = value_snap(drag_sy + (_my - drag_my) / _s, _sny); - var _sval = array_clone(showValue()); _sval[2] = _xx; _sval[3] = _yy;