Attract-Mode Support > Scripting

Shuffle v2.2.0 - Loop feature now added

(1/9) > >>

keilmillerjr:
Looping of the list can be enabled or disabled. This feature works as intended, but there is some what if scenarios that might have to be covered in future bug fixe releases.

https://github.com/keilmillerjr/shuffle-module/releases/tag/v2.2.0

jedione:
So with the with the new script
Does this alow one to use a favorits
Script and if so,  could you show how..
Thanks...

keilmillerjr:

--- Quote from: jedione on June 09, 2019, 11:47:50 AM ---So with the with the new script
Does this alow one to use a favorits
Script and if so,  could you show how..
Thanks...

--- End quote ---

Yes, you always could. Will modify your theme in the am or tonight if not too tired. If i don't have your latest, be sure to send it to me and ill send you back a copy. On a mission few hours away to get a super cool and rare crt.

rand0m:
Thanks for the rework Keil, shuffle v2.0 is working as expected after updating the code (as listed in readme). No errors encountered atm. Any chance to get an additional feature since you are updating the code? An option to switch between default behavior (loop) and stop scrolling at end of list (No loop).

rand0m:
By the way I updated the following codes if anyone is having difficulty, only listing the parts changed:

Old (Shuffle v1.0)

--- Code: ---// Extend the Shuffle class
class ShuffleList extends Shuffle {
function update() {
base.update();
}

// Overwrite the select function
function select(slot) {
slot.font="TulpenOne-Regular-Caps.ttf";

// Overwrite the deselect function
function deselect(slot) {
slot.font="TulpenOne-Regular-Caps.ttf";

//Shufffle Pow Extend the Shuffle class
class ShufflePow extends Shuffle {
function update() {
base.update();
}

// Overwrite the select function
function select(slot) {
slot.visible = true;
}

// Overwrite the select function
function deselect(slot) {
slot.visible = false;
}
}

// Create an instance of the extended class
local list = ShuffleList(list, "text");
local pow = ShufflePow(pow, "image");
--- End code ---

New/ Updated (Shuffle 2.0)

--- Code: ---// Extend the Shuffle class
class ShuffleList extends Shuffle {
function refresh() {
base.refresh();
}

// Overwrite the _refreshSelected function
function _refreshSelected(slot) {
slot.font="TulpenOne-Regular-Caps.ttf";

// Overwrite the _refreshDeselected function
function _refreshDeselected(slot) {
slot.font="TulpenOne-Regular-Caps.ttf";

//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;
}
}

// Create an instance of the extended class
local list = ShuffleList({ slots=list });
local pow = ShufflePow({ slots=pow});
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version