2023-12-02 14:30:27 +01:00
|
|
|
function Node_MK_Cable(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
|
|
|
name = "MK Cable";
|
|
|
|
|
2024-08-07 11:48:39 +02:00
|
|
|
inputs[| 0] = nodeValue_Dimension(self);
|
2023-12-02 14:30:27 +01:00
|
|
|
|
2024-08-07 13:20:45 +02:00
|
|
|
inputs[| 1] = nodeValue_Vector("Point 1", self, [ 0, 0 ]);
|
2023-12-02 14:30:27 +01:00
|
|
|
|
2024-08-07 13:20:45 +02:00
|
|
|
inputs[| 2] = nodeValue_Vector("Point 2", self, [ 16, 16 ]);
|
2023-12-02 14:30:27 +01:00
|
|
|
|
2023-12-11 09:59:58 +01:00
|
|
|
input_display_list = [ new Inspector_Sprite(s_MKFX), 0,
|
2023-12-02 14:30:27 +01:00
|
|
|
["Saber", false], 1, 2,
|
|
|
|
];
|
|
|
|
|
2024-08-07 13:20:45 +02:00
|
|
|
outputs[| 0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone);
|
2023-12-02 14:30:27 +01:00
|
|
|
|
2024-07-02 12:18:32 +02:00
|
|
|
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
|
|
|
var _hov = false;
|
|
|
|
var hv = inputs[| 1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv;
|
|
|
|
var hv = inputs[| 2].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); active &= hv; _hov |= hv;
|
|
|
|
|
|
|
|
return _hov;
|
|
|
|
}
|
2023-12-02 14:30:27 +01:00
|
|
|
|
|
|
|
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
|
|
|
var _dim = _data[0];
|
|
|
|
var _pnt1 = _data[1];
|
|
|
|
var _pnt2 = _data[2];
|
|
|
|
|
|
|
|
surface_set_target(_outSurf);
|
|
|
|
DRAW_CLEAR
|
|
|
|
|
|
|
|
surface_reset_target();
|
|
|
|
|
|
|
|
return _outSurf;
|
|
|
|
}
|
|
|
|
}
|