452
« on: June 10, 2019, 10:55:05 AM »
any help..
i get an error on last line, last column
C:\auraAM\layouts/bionic/scripts/shuffle-list.nut line = (90) column = (1) : error expression expected
Script Error in C:\auraAM\layouts/bionic/scripts/shuffle-list.nut - expression expected
ohh.. here is the code...
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;
fe.load_module("shuffle");
local x = flx*0.054
## fly*
local w = flw*0.305
local h = flh*0.120
local x1 = flx*0.000
## fly*
local w1 = flw*0.490
local h1 = flh*0.130
// Extend the Shuffle class
class ShuffleList extends Shuffle {
function refresh() {
base.refresh();
}
// Overwrite the _refreshSelected function
function _refreshSelected(slot) {
slot.font="BebasNeue Regular.ttf";
// Overwrite the _refreshDeselected function
function _refreshDeselected(slot) {
slot.font="BebasNeue Regular.ttf";
local list = [];
list.push(fe.add_text("[Title]", x, fly*0.080, w, h));
list.push(fe.add_text("[Title]", x, fly*0.145, w, h));
list.push(fe.add_text("[Title]", x, fly*0.210, w, h));
list.push(fe.add_text("[Title]", x, fly*0.275, w, h));
list.push(fe.add_text("[Title]", x, fly*0.340, w, h));
list.push(fe.add_text("[Title]", x, fly*0.405, w, h));
list.push(fe.add_text("[Title]", x, fly*0.470, w, h));
list.push(fe.add_text("[Title]", x, fly*0.535, w, h));
list.push(fe.add_text("[Title]", x, fly*0.600, w, h));
list.push(fe.add_text("[Title]", x, fly*0.665, w, h));
list.push(fe.add_text("[Title]", x, fly*0.730, w, h));
list.push(fe.add_text("[Title]", x, fly*0.795, w, h));
/////////////////////////////////////////////////////////
//Shufffle Pow Extend the Shuffle class
class ShufflePow extends Shuffle {
function refresh() {
base.refresh();
}
// Overwrite the _refreshSelected function
function _refreshSelected(slot) {
slot.visible = true;
}
// Overwrite the _refreshDeselected function
function _refreshDeselected(slot) {
slot.visible = false;
}
}
local pow = [];
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.090, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.156, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.222, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.286, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.352, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.416, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.482, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.546, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.612, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.678, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.744, w1, h1));
pow.push(fe.add_image("artwork/favourite-off.png", x1, fly*0.810, w1, h1));
// Create an instance of the extended class
local list = ShuffleList({ slots=list });
local pow = ShufflePow({ slots=pow});