include(Resources.id("jsblock:scripts/pids_util.js"));

function create(ctx, state, pids) {
    print("Hello World ^^");
}

let LEDColors = {
    red: 0xFF0000,
    yellow: 0xFCA103,
    green: 0xA9D130
};

function render(ctx, state, pids) {
    Texture.create("background")
    .texture("jsblock:textures/led_bg.png")
    .size(96, 14)
    .pos(20, 28)
    .draw(ctx);

    Text.create("Arrival destination")
    .text(pids.station().getName().replace("|", "    "))
    .color(LEDColors.yellow)
    .pos(20, 30)
    .scale(1.3)
    .centerAlign()
    .marquee()
    .size(69, 100)
    .draw(ctx);
}

function dispose(ctx, state, pids) {
    print("Goodbye World ^^;");
}