2023-06-01 10:45:02 +02:00
|
|
|
function Node_Print(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
2024-02-11 13:22:20 +01:00
|
|
|
name = "Print";
|
2024-03-28 14:18:02 +01:00
|
|
|
setDimension(96, 32 + 24 * 1);
|
2024-02-11 13:22:20 +01:00
|
|
|
|
2023-06-01 10:45:02 +02:00
|
|
|
draw_padding = 8;
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(0, nodeValue_Bool("Active", self, true));
|
2023-06-01 10:45:02 +02:00
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(1, nodeValue_Text("Text", self, ""));
|
2023-06-01 10:45:02 +02:00
|
|
|
|
|
|
|
static update = function() {
|
2023-10-02 08:57:44 +02:00
|
|
|
var act = getInputData(0);
|
|
|
|
var txt = getInputData(1);
|
2023-06-01 10:45:02 +02:00
|
|
|
|
|
|
|
if(act) noti_status(txt);
|
|
|
|
}
|
|
|
|
|
|
|
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
|
|
|
var bbox = drawGetBbox(xx, yy, _s);
|
2023-10-02 08:57:44 +02:00
|
|
|
var txt = getInputData(1);
|
2023-06-01 10:45:02 +02:00
|
|
|
|
|
|
|
draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text);
|
|
|
|
draw_text_bbox(bbox, txt);
|
|
|
|
}
|
|
|
|
}
|