Simulation Instruments

Home›All functions›Layer

Layer

Simulation Instrument Studio 1

layer_add

Simulation Instrument Studio 1

Definition

layer_id = layer_add(z_order, callback)

Remarks

Create a new layer. GUI nodes created inside the callback are added to this layer.

Example

No sample instrument calls this yet.

layer_add()
Photo slot: shots/layer_add.png

layer_mouse_cursor

Simulation Instrument Studio 1

Definition

layer_mouse_cursor(layer_id, cursor)

Remarks

Set the mouse cursor when hovering over the layer.

Parameters

NameDescription
layer_idTop position in instrument pixels.
cursorCursor shown over this layer. HAND, POINTER, or a 32×32 PNG.

Example

No sample instrument calls this yet.

layer_mouse_cursor(layer_id, cursor)

Example: a fixed cursor, and one that follows the mouse

layer_mouse_cursor(knob_layer, "CW")

function on_move(id, x, y)
    if x < 80 then
        layer_mouse_cursor(knob_layer, "LEFT")
    elseif x > 160 then
        layer_mouse_cursor(knob_layer, "RIGHT")
    else
        layer_mouse_cursor(knob_layer, "HAND")
    end
end
Photo slot: shots/layer_mouse_cursor.png

z_order

Simulation Instrument Studio 1

Definition

z_order(layout_id, order)

Remarks

Set the Z order of a layer (or instrument).

Parameters

NameDescription
layout_idTop position in instrument pixels.
orderDraw order. A higher number draws later.

Example

No sample instrument calls this yet.

z_order(layout_id, order)
Photo slot: shots/z_order.png