Play Glediator Files for WS2811 files from SDand add aButton

Hello
i have a WS2811 Led Stripe Pixel Matrix which i control via a Computer with Arduino and Glediator.
Now i am looking for a way to play the glediator files directly from SD card without the need of a computer.
i found this Sketch:

which works perfectly

in the description of the sketch the editor desribed that it would be easy to add a button to cycle trough different led patterns from the sd card, so i tought i give it a try

but i have no programming knowledge and tried to copy and paste some code together so that i can choose different patterns with the press of a button,but the code isn't working it's still showing the same animation without changing it

im pretty sure it's not how it is done so maybe someone can help me with the coding
here is how i modified the code from the website above

// Glediator Arduino UNO sketch by Jens Andrée / https://politisktinkorrektpappa.wordpress.com/
// 500k bauds with 80 pixels no problem
// sdcard stream for stand-alone operation.
// changed to WS2811 chip and a few small changes by Nils Gregersen / http://hamburgtech.de/

#include <FastLED.h>
#include <SPI.h>
#include <SD.h>

#define NUM_LEDS 25
#define DATA_PIN 6
#define CHIPSET WS2811
#define CMD_NEW_DATA 4
#define BAUD_RATE 115200

File fxdata;
CRGB leds[NUM_LEDS];

const int buttonPin = 2;
int buttonState = 0;

void setup()
{
FastLED.addLeds<CHIPSET, DATA_PIN>(leds, NUM_LEDS); //see doc for different LED strips
Serial.begin(BAUD_RATE);

for(int y = 0 ; y < NUM_LEDS ; y++)
{
leds[y] = CRGB::Black; // set all leds to black during setup
}
FastLED.show();

pinMode(10, OUTPUT); // CS/SS pin as output for SD library to work.
digitalWrite(10, HIGH); // workaround for sdcard failed error...

if (!SD.begin(4))
{
Serial.println("sdcard initialization failed!");
return;
}
Serial.println("sdcard initialization done.");

// test file open
fxdata = SD.open("myanim.dat"); // read only
if (fxdata)
{
Serial.println("file open ok");
fxdata.close();
}
pinMode(buttonPin, INPUT);
}

// List of patterns to cycle through. Each is defined as a separate function below.
typedef void (*SimplePatternList[])();
SimplePatternList gPatterns = { eins, zwei };
uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current

int serialGlediator ()
{
while (!Serial.available()) {}
return Serial.read();
}

void loop()
{
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == LOW) {

nextPattern();

} else {
// turn LED off:
gPatternsgCurrentPatternNumber;
}

}

#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))
void nextPattern()
{
// add one to the current pattern number, and wrap around at the end
gCurrentPatternNumber = (gCurrentPatternNumber + 1) % ARRAY_SIZE( gPatterns);
}

void eins ()
{

fxdata = SD.open("ai.dat"); // read only
if (fxdata)
{
Serial.println("file open ok");
}

while (fxdata.available())
{
fxdata.readBytes((char*)leds, NUM_LEDS*3);
FastLED.show();
delay(50); // set the speed of the animation. 20 is appx ~ 500k bauds
}

// close the file in order to prevent hanging IO or similar throughout time
fxdata.close();
}

void zwei ()
{

fxdata = SD.open("ai2.dat"); // read only
if (fxdata)
{
Serial.println("file open ok");
}

while (fxdata.available())
{
fxdata.readBytes((char*)leds, NUM_LEDS*3);
FastLED.show();
delay(50); // set the speed of the animation. 20 is appx ~ 500k bauds
}

// close the file in order to prevent hanging IO or similar throughout time
fxdata.close();
}

Hi,ime trying to do the same,do you have a file with annimation on it so i can try it for my self.thanks

Pleaase share your code if you have a soluion for this problem!