2024-02-01 08:38:21 +01:00
|
|
|
function Node_Project_Data(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
|
|
|
name = "Project Data";
|
2024-05-02 12:13:35 +02:00
|
|
|
setDimension(96, 48);;
|
2024-02-01 08:38:21 +01:00
|
|
|
|
2024-09-04 03:57:11 +02:00
|
|
|
newOutput(0, nodeValue_Output("Name", self, VALUE_TYPE.text, ""))
|
2024-02-01 08:38:21 +01:00
|
|
|
.setVisible(false);
|
|
|
|
|
2024-09-04 03:57:11 +02:00
|
|
|
newOutput(1, nodeValue_Output("Description", self, VALUE_TYPE.text, ""))
|
2024-02-01 08:38:21 +01:00
|
|
|
.setVisible(false);
|
|
|
|
|
2024-09-04 03:57:11 +02:00
|
|
|
newOutput(2, nodeValue_Output("Author", self, VALUE_TYPE.text, ""))
|
2024-02-01 08:38:21 +01:00
|
|
|
.setVisible(false);
|
|
|
|
|
2024-09-04 03:57:11 +02:00
|
|
|
newOutput(3, nodeValue_Output("Contact", self, VALUE_TYPE.text, ""))
|
2024-02-01 08:38:21 +01:00
|
|
|
.setVisible(false);
|
|
|
|
|
2024-09-04 03:57:11 +02:00
|
|
|
newOutput(4, nodeValue_Output("Path", self, VALUE_TYPE.path, ""))
|
2024-02-01 08:38:21 +01:00
|
|
|
.setVisible(false);
|
|
|
|
|
|
|
|
static update = function() {
|
2024-08-08 06:57:51 +02:00
|
|
|
outputs[0].setValue(filename_name_only(PROJECT.path));
|
|
|
|
outputs[1].setValue(PROJECT.meta.description);
|
|
|
|
outputs[2].setValue(PROJECT.meta.author);
|
|
|
|
outputs[3].setValue(PROJECT.meta.contact);
|
2024-02-01 08:38:21 +01:00
|
|
|
|
2024-08-08 06:57:51 +02:00
|
|
|
outputs[4].setValue(PROJECT.path);
|
2024-02-01 08:38:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
|
|
|
var bbox = drawGetBbox(xx, yy, _s);
|
2024-08-08 06:57:51 +02:00
|
|
|
var txt = outputs[0].getValue();
|
2024-02-01 08:38:21 +01:00
|
|
|
|
|
|
|
draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text);
|
|
|
|
draw_text_bbox(bbox, txt);
|
|
|
|
}
|
|
|
|
}
|