1
Scripting / Re: shuffle module Q: regards animation
« on: Yesterday at 08:38:07 PM »
Feel free to send me an updated copy and I work off that.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
// ---------- List
class ShuffleList extends Shuffle
function select(slot) {
slot.set_rgb (200,160,0);
}
function deselect(slot) {
slot.set_rgb (200,160,0); // set to another color?
}
}
local list = []
list.push(); // add objects
local shuffleList = ShuffleList(list, "text");
// ---------- Pow
class ShufflePow extends Shuffle
function select(slot) {
slot.visible = true;
}
function deselect(slot) {
slot.visible = false;
}
}
local pow = [];
pow.push(fe.add_image("art/icon.png", x1, fly*0.118, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.173, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.228, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.283, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.338, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.393, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.448, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.503, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.558, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.613, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.668, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.723, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.778, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.833, w1, h1));
pow.push(fe.add_image("art/icon.png", x1, fly*0.888, w1, h1));
local powAnimation = {
when = Transition.ToNewSelection,
property = "scale",
start = 1.0,
end = size,
time = 0500,
}
for (local i=0; i<pow.len(); i++) {
pow[i].mipmap = true;
animation.add(PropertyAnimation(pow[i], powAnimation));
}
local shufflePow = ShufflePow(pow, "image");
I wrote a function to "re-sanitize" titles when using magic tokens:Code: [Select]function getTitle (ioffset = 0) {
// Working from the raw title, we have to cut away any extra junk:
local _t = fe.game_info( Info.Title, ioffset );
// Ignore anything after the first (, [, or /:
local _i = null;
_i = _t.find( "(" );
_t = _i ? _t.slice( 0, _i ) : _t;
_i = _t.find( "[" );
_t = _i ? _t.slice( 0, _i ) : _t;
_i = _t.find( "/" );
_t = _i ? _t.slice( 0, _i ) : _t;
return strip(_t).toupper();
}
What distro are you using?
Ubuntu Server 18.04 LTS
Not sure what a screen blank is.
or a console-blanking, when the screen turns off - a screensaver.
as I said I already went for the grub-option but it's not working.
RetroArch has some kind of disabling that works a charm...
Is there a opposite method for add_x? Like remove_image and remove_artwork?
Also, I see that the base for positioning a video is top/left. Could it be that this is different for images?
When I doCode: [Select]fe.add_image("myImage.extension", 0, 0, layout_with/2, layout_height/2);
it looks like the horizontal center is off to the left...
I'm still struggeling to disable the screen blank in AttractMode.