Author Topic: Shuffle v2.2.0 - Loop feature now added  (Read 32437 times)

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #30 on: September 30, 2019, 01:14:00 PM »
I have visited arcademvs.org, and it will be because of my poor command of the English language, but i have no idea what you intend to do on that site... Sorry  :-[
Nacer a los 15 años Una novela de iOtero

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #31 on: September 30, 2019, 09:52:01 PM »
I have visited arcademvs.org, and it will be because of my poor command of the English language, but i have no idea what you intend to do on that site... Sorry  :-[

Guides for creating MAME machines. I have a guide how to fully hide windows 10, how to create a mame setup from scratch on the raspberry pi, unix commands, how to compile mame on different operating systems. These are things a lot of people struggle with or just haven't a clue to do and instead seek “images” and end up in the same position of not knowing how to do something. The namespace also now houses my attract layouts/modules/plugins. Guides might be at a standstill until I fix my flyback transformer.

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #32 on: October 17, 2019, 10:07:53 PM »
Good find iOtero. I have logic for new list, but not filters. Currently working on a new project. Transferring everything to gitlab group and started a wiki. Will put this on my list to do afterwards. Thank you!

Wiki is http://arcademvs.org if you want to check it out. Going to have an attract section for setting up filters and displays eventually. I think a few people here could help me with the displays section.

Hiya Keil, Filter info update on display change has been fixed > https://github.com/mickelson/attract/commit/7dc5c88ca15d756f53ff28e427f8b6be019a1db7
If I understand it correctly jumping from one filter to next should behave similarly to new display as filter array is reloaded

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #33 on: October 24, 2019, 05:40:55 AM »
Well nothing... To compile Attract-Mode again... thanks for the info Rand0m...
Nacer a los 15 años Una novela de iOtero

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #34 on: October 24, 2019, 10:08:38 AM »
Well nothing... To compile Attract-Mode again... thanks for the info Rand0m...

The filter issue still persists, just checked.

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #35 on: December 10, 2019, 10:00:07 AM »
Keil, i know that you are very busy with other things, but are you going to someday end this plugin? It doesn't work properly.
Thanks.
Nacer a los 15 años Una novela de iOtero

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #36 on: December 11, 2019, 02:48:10 AM »
Keil, i know that you are very busy with other things, but are you going to someday end this plugin? It doesn't work properly.
Thanks.

I will try to continue it soon. Latest attract commits will be good for this. However, my financial standing may impact my time with attract for a while.

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #37 on: December 11, 2019, 06:58:43 AM »
Keil, i know that you are very busy with other things, but are you going to someday end this plugin? It doesn't work properly.
Thanks.

I will try to continue it soon. Latest attract commits will be good for this. However, my financial standing may impact my time with attract for a while.

Ok, thanks.
Nacer a los 15 años Una novela de iOtero

iOtero

  • Sr. Member
  • ****
  • Posts: 414
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #38 on: January 03, 2020, 04:37:58 AM »
Well, since I needed Shuffle to work correctly when changing filters, I made this modification to your code. I hope it doesn't bother you.
I guess it's not the right modification you would make, but for now it works for me. And it has been easier than I thought, I've only added five lines of code.

Your original code:

Code: [Select]
function _signals(signal_str)
{
switch(signal_str)
{
// ignore signals at start or end of list when looping is false
case "prev_game":

if(this._loop == false && fe.list.index == 0) return true;
break;

case "next_game":

if(this._loop == false && fe.list.index == fe.list.size-1) return true;
break;

// do not update selection for these signals
case "prev_letter":
case "next_letter":
case "random_game":
case "add_favourite":
case "prev_favourite":
case "next_favorite":
this._ignoreNewSelection = true;
break;
}

return false;
}

Modified code:

Code: [Select]
function _signals(signal_str)
{
switch(signal_str)
{
// ignore signals at start or end of list when looping is false
case "prev_game":

if(this._loop == false && fe.list.index == 0) return true;
break;

case "next_game":

if(this._loop == false && fe.list.index == fe.list.size-1) return true;
break;

case "prev_filter":

case "next_filter":
this._selected = 0;
fe.list.index = 0;
break;

// do not update selection for these signals
case "prev_letter":
case "next_letter":
case "random_game":
case "add_favourite":
case "prev_favourite":
case "next_favorite":
this._ignoreNewSelection = true;
break;
}

return false;
}

This fixes the problem with the filter change, but not with the letter change... which is not going well either.
« Last Edit: January 05, 2020, 10:10:30 AM by iOtero »
Nacer a los 15 años Una novela de iOtero

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #39 on: January 30, 2020, 10:11:47 AM »
This fixes the problem with the filter change, but not with the letter change... which is not going well either.

Tested your solution on my layout and it works :D experimented some more and if we change "reset" to true in following part (your might be different):

Code: [Select]
local list = ShuffleList({ save="retrodiction", hide=true, loop=false, reset=true, slots=list });
local pow = ShufflePow({ save="retrodiction", hide=true, loop=false, reset=true, slots=pow});

We won't need additional instructions and original code will work. IMHO "save=layout_name" and "reset=true" operates in most optimal fashion and takes care of anyother function(s) we might use like "search_results" and  "filter_menu" without adding additional instructions for them.

Kudos to Keil, shuffle is working really great now!

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #40 on: June 02, 2020, 12:54:36 AM »
Keil, i know that you are very busy with other things, but are you going to someday end this plugin? It doesn't work properly.
Thanks.

I will try to continue it soon. Latest attract commits will be good for this. However, my financial standing may impact my time with attract for a while.

Hiya Keil, I want to keep "reset" to off for all functions but search result. If number of search-returned item is lower then position of selector/ selected when search is initiated, it gets stuck. Don't want to  turn of reset because it resets on everything then like after starting/ exiting a game we are at start of list. Is there anyway to create an exception for "reset" so it ignores search results?

"reset" as in following code >
Code: [Select]
local list = ShuffleList({ save="retrodiction", hide=true, loop=false, reset=false, slots=list });
local pow = ShufflePow({ save="retrodiction", hide=true, loop=false, reset=false, slots=pow});

rand0m

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #41 on: June 02, 2020, 01:26:40 AM »
I am using "custom3" to initiate search. Adding the following code:
Code: [Select]
// update selection for these signals
case "custom3":
this._reset = true;
break;

after "do not update for these selections" part does result in selection being reset to first item on list - BUT this happens on button press (custom3) not on search results. In this case even If there are no search results, that is you don't go to search result list but stay on original list, the selection will reset to item 1 on list.

Looked at all the signals, I don't think there is any signal specifically for search or search_results. Checking now if something like next_display etc can be used.

kent79

  • Hero Member
  • *****
  • Posts: 856
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #42 on: April 13, 2021, 12:33:18 AM »
Hello keilmillerjr

May I know is it possible to do it with my idea, Thanks.

http://forum.attractmode.org/index.php?topic=3957.0

Daniel Arcade

  • Full Member
  • ***
  • Posts: 25
    • View Profile
Re: Shuffle v2.1.0 - Refactoring and bug fixes
« Reply #43 on: March 09, 2024, 10:10:44 AM »

I would like to do something like this with the gender images so that their image appears on each line instead of repeating the same image in all slots as in this attached image

Daniel Arcade

  • Full Member
  • ***
  • Posts: 25
    • View Profile
Re: Shuffle v2.2.0 - Loop feature now added
« Reply #44 on: March 09, 2024, 10:15:26 AM »
I would like it to stay like this