2024-08-02 14:30:35 +02:00
|
|
|
function Node_Slideshow(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
|
|
|
name = "Slideshow";
|
|
|
|
project = PROJECT;
|
|
|
|
|
|
|
|
is_controller = true;
|
|
|
|
|
|
|
|
setDimension(128, 32);
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(0, nodeValue_Int("Order", self, 0));
|
2024-08-02 14:30:35 +02:00
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(1, nodeValue_Text("Title", self, ""));
|
2024-08-02 14:30:35 +02:00
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(2, nodeValue_Enum_Scroll("Anchor", self, 0, [ "Center", "Top left" ]));
|
2024-08-02 14:30:35 +02:00
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(3, nodeValue_Float("Arrival Speed", self, 4));
|
2024-08-14 05:28:46 +02:00
|
|
|
|
2024-08-02 14:30:35 +02:00
|
|
|
slide_title = "";
|
|
|
|
slide_anchor = 0;
|
2024-08-14 05:28:46 +02:00
|
|
|
slide_speed = 32;
|
2024-08-02 14:30:35 +02:00
|
|
|
|
|
|
|
static step = function() {
|
2024-08-08 06:57:51 +02:00
|
|
|
var _ord = inputs[0].getValue();
|
2024-08-02 14:30:35 +02:00
|
|
|
project.slideShow[$ _ord] = self;
|
|
|
|
|
2024-08-08 06:57:51 +02:00
|
|
|
slide_title = inputs[1].getValue();
|
|
|
|
slide_anchor = inputs[2].getValue();
|
2024-08-14 05:28:46 +02:00
|
|
|
slide_speed = max(1, 100 / inputs[3].getValue());
|
2024-08-02 14:30:35 +02:00
|
|
|
|
|
|
|
setDisplayName($"Slide-{slide_title}");
|
|
|
|
}
|
|
|
|
}
|