From c457dc0dd925af41390a978fbf1f4803230f1ffb Mon Sep 17 00:00:00 2001 From: Tanasart Date: Thu, 5 Sep 2024 08:50:28 +0700 Subject: [PATCH] [Draw Text] Fix font sharing AA property. --- scripts/globals/globals.gml | 2 +- .../gradients_function/gradients_function.gml | 3 ++- scripts/node_text/node_text.gml | 27 +++++++++---------- scripts/panel_graph/panel_graph.gml | 1 + 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index c539e91bc..4b08deefc 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -39,7 +39,7 @@ LATEST_VERSION = 1_16_00; VERSION = 1_17_11_0; SAVE_VERSION = 1_17_10_0; - VERSION_STRING = "1.17.12.002"; + VERSION_STRING = "1.17.12.004"; BUILD_NUMBER = 1_17_11_0; HOTKEYS = ds_map_create(); diff --git a/scripts/gradients_function/gradients_function.gml b/scripts/gradients_function/gradients_function.gml index c871e8dd3..35d736012 100644 --- a/scripts/gradients_function/gradients_function.gml +++ b/scripts/gradients_function/gradients_function.gml @@ -341,8 +341,9 @@ function shader_set_gradient(gradient, surface, range, junc) { } function evaluate_gradient_map(_x, gradient, surface, range, junc, fast = false) { - var use_map = junc.attributes.mapped; + if(!is_surface(surface)) return 0; + var use_map = junc.attributes.mapped; if(!use_map) return fast? gradient.evalFast(_x) : gradient.eval(_x); var _sw = surface_get_width(surface); diff --git a/scripts/node_text/node_text.gml b/scripts/node_text/node_text.gml index 78e5cb6e8..84e2c6b87 100644 --- a/scripts/node_text/node_text.gml +++ b/scripts/node_text/node_text.gml @@ -82,16 +82,13 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons _aa_current = false; seed = seed_random(); - static generateFont = function(_path, _size, _aa) { #region + static generateFont = function(_path, _size, _aa) { if(PROJECT.animator.is_playing) return; - if( font_exists(font) && - _path == _font_current && - _size == _size_current && - _aa == _aa_current) return; - - _font_current = _path; - _size_current = _size; - _aa_current = _aa; + if(font_exists(font) && _path == _font_current && _size == _size_current && _aa == _aa_current) return; + + _font_current = _path; + _size_current = _size; + _aa_current = _aa; if(!file_exists_empty(_path)) return; @@ -99,10 +96,10 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons font_delete(font); font_add_enable_aa(_aa); - font = _font_add(_path, _size,, true); - } #endregion + font = font_add(_path, _size, false, false, 0, 127); + } - static step = function() { #region + static step = function() { var _font = getSingleValue(1); var _dimt = getSingleValue(9); var _path = getSingleValue(13); @@ -120,9 +117,9 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[ 3].setVisible(_font != ""); inputs[11].setVisible(_font != ""); inputs[12].setVisible(_font != ""); - } #endregion + } - static waveGet = function(_ind) { #region + static waveGet = function(_ind) { var _x = __wave_phase + _ind * __wave_scale; var _sine = dsin(_x) * __wave_ampli; @@ -140,7 +137,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons else if(__wave_shape < 3) return abs(_x) % 360 > 360 * (0.5 - frac(__wave_shape) / 2)? -__wave_ampli : __wave_ampli; return random_range_seed(-1, 1, _x + seed) * __wave_ampli; - } #endregion + } static processData = function(_outSurf, _data, _output_index, _array_index) { var str = _data[0], strRaw = str; diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index 4f22b2166..0d9cc3c96 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -1333,6 +1333,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { if(mouse_press(mb_right, _focus)) { // node_hover = node_hovering; + __junction_hovering = noone; if(value_focus) { // print($"Right click value focus {value_focus}");