Skip to main content

set

static set = list_l

Scrollbar.set looks for Object defined in Scrollbar.scroll_bar and fills dock element with a widget from items due to pos index.

It also has a wheel event, that refreshes scrollbar every time it's scrolled with holded Shift.

Example from demo:

var scroll_list = { 
"pos" : 0,
"items" : [
weather_time,
player_holder,
]
}

Scrollbar.set(scroll_list);

It sets internal widgets list with the given list to use it in window.js via get independent from the initial variable and origin.

Scrollbar scrolling just changes pos and recreates scrollbar.