Print node

This commit is contained in:
Tanasart 2023-06-01 10:45:02 +02:00
parent db5b75a4c0
commit bb2874e67e
9 changed files with 132 additions and 0 deletions

View file

@ -708,6 +708,7 @@
{"name":"node_VFX_effect_turbulence","order":11,"path":"scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy",},
{"name":"sh_surface_replace_replace","order":1,"path":"shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy",},
{"name":"node_ase_file_read","order":14,"path":"scripts/node_ase_file_read/node_ase_file_read.yy",},
{"name":"s_node_print","order":30,"path":"sprites/s_node_print/s_node_print.yy",},
{"name":"sh_seperate_shape_counter","order":1,"path":"shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy",},
{"name":"s_node_stack","order":37,"path":"sprites/s_node_stack/s_node_stack.yy",},
{"name":"s_fade_up","order":3,"path":"sprites/s_fade_up/s_fade_up.yy",},
@ -1047,6 +1048,7 @@
{"name":"node_greyscale","order":5,"path":"scripts/node_greyscale/node_greyscale.yy",},
{"name":"s_node_cross_product_3d","order":11,"path":"sprites/s_node_cross_product_3d/s_node_cross_product_3d.yy",},
{"name":"node_color_adjustment","order":1,"path":"scripts/node_color_adjustment/node_color_adjustment.yy",},
{"name":"node_print","order":10,"path":"scripts/node_print/node_print.yy",},
{"name":"s_node_strandSim_force","order":6,"path":"sprites/s_node_strandSim_force/s_node_strandSim_force.yy",},
{"name":"s_node_array_reverse","order":8,"path":"sprites/s_node_array_reverse/s_node_array_reverse.yy",},
{"name":"sh_ani_noise","order":4,"path":"shaders/sh_ani_noise/sh_ani_noise.yy",},

View file

@ -1503,6 +1503,7 @@
{"id":{"name":"sh_surface_replace_replace","path":"shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy",},},
{"id":{"name":"node_ase_file_read","path":"scripts/node_ase_file_read/node_ase_file_read.yy",},},
{"id":{"name":"s_workshop_frame","path":"sprites/s_workshop_frame/s_workshop_frame.yy",},},
{"id":{"name":"s_node_print","path":"sprites/s_node_print/s_node_print.yy",},},
{"id":{"name":"sh_seperate_shape_counter","path":"shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy",},},
{"id":{"name":"s_node_stack","path":"sprites/s_node_stack/s_node_stack.yy",},},
{"id":{"name":"s_fade_up","path":"sprites/s_fade_up/s_fade_up.yy",},},
@ -1890,6 +1891,7 @@
{"id":{"name":"node_greyscale","path":"scripts/node_greyscale/node_greyscale.yy",},},
{"id":{"name":"s_node_cross_product_3d","path":"sprites/s_node_cross_product_3d/s_node_cross_product_3d.yy",},},
{"id":{"name":"node_color_adjustment","path":"scripts/node_color_adjustment/node_color_adjustment.yy",},},
{"id":{"name":"node_print","path":"scripts/node_print/node_print.yy",},},
{"id":{"name":"s_node_strandSim_force","path":"sprites/s_node_strandSim_force/s_node_strandSim_force.yy",},},
{"id":{"name":"s_node_array_reverse","path":"sprites/s_node_array_reverse/s_node_array_reverse.yy",},},
{"id":{"name":"sh_ani_noise","path":"shaders/sh_ani_noise/sh_ani_noise.yy",},},

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_outline",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,28 @@
function Node_Print(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Print";
w = 96;
min_h = 32 + 24 * 1;
draw_padding = 8;
inputs[| 0] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
inputs[| 1] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "");
//inputs[| 2] = nodeValue("Icon", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
static update = function() {
var act = inputs[| 0].getValue();
var txt = inputs[| 1].getValue();
if(act) noti_status(txt);
}
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
var bbox = drawGetBbox(xx, yy, _s);
var txt = inputs[| 1].getValue();
draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text);
draw_text_bbox(bbox, txt);
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_print",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "node",
"path": "folders/nodes/data/node.yy",
},
}

View file

@ -577,6 +577,9 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
ds_list_add(node, "Cache");
addNodeObject(node, "Cache", s_node_cache, "Node_Cache", [1, Node_Cache],, "Store current animation. Cache persisted between save.").setVersion(1134);
addNodeObject(node, "Cache Array", s_node_cache_array, "Node_Cache_Array", [1, Node_Cache_Array],, "Store current animation as array. Cache persisted between save.").setVersion(1130);
ds_list_add(node, "Debug");
addNodeObject(node, "Print", s_node_print, "Node_Print", [1, Node_Print], ["debug log"], "Display text to notification.").setVersion(1145);
var hid = ds_list_create();
addNodeCatagory("Hidden", hid, ["Hidden"]);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,74 @@
{
"resourceType": "GMSprite",
"resourceVersion": "1.0",
"name": "s_node_print",
"bbox_bottom": 61,
"bbox_left": 0,
"bbox_right": 63,
"bbox_top": 2,
"bboxMode": 0,
"collisionKind": 1,
"collisionTolerance": 0,
"DynamicTexturePage": false,
"edgeFiltering": false,
"For3D": false,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"6bd00b06-657f-4af0-8256-197cc121d0b7",},
],
"gridX": 0,
"gridY": 0,
"height": 64,
"HTile": false,
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"6a18fcf5-6192-46f7-9c24-871344f9d926","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
],
"nineSlice": null,
"origin": 4,
"parent": {
"name": "node",
"path": "folders/nodes/icons/node.yy",
},
"preMultiplyAlpha": false,
"sequence": {
"resourceType": "GMSequence",
"resourceVersion": "1.4",
"name": "s_node_print",
"autoRecord": true,
"backdropHeight": 768,
"backdropImageOpacity": 0.5,
"backdropImagePath": "",
"backdropWidth": 1366,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"eventStubScript": null,
"eventToFunction": {},
"length": 1.0,
"lockOrigin": false,
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"playback": 1,
"playbackSpeed": 30.0,
"playbackSpeedType": 0,
"showBackdrop": true,
"showBackdropImage": false,
"timeUnits": 1,
"tracks": [
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"6bd00b06-657f-4af0-8256-197cc121d0b7","path":"sprites/s_node_print/s_node_print.yy",},},},"Disabled":false,"id":"f8d0543e-7ebc-4c67-a7c2-a69fdf525531","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange": null,
"volume": 1.0,
"xorigin": 32,
"yorigin": 32,
},
"swatchColours": null,
"swfPrecision": 2.525,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"type": 0,
"VTile": false,
"width": 64,
}