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/seoul_metro_psd_old.png")
    .size(76, 25)
    .pos(30, 27)
    .draw(ctx);

    Text.create("Arrival destination")
    .text(TextUtil.cycleString(pids.station().getName()))
    .color(LEDColors.yellow)
    .pos(68, 32)
    .scale(1.9)
    .centerAlign()
    .stretchXY()
    .size(36, 100)
    .draw(ctx);
}

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