File size: 1,697 Bytes
7afe4cc
 
 
 
 
 
 
 
 
 
 
a3b1b80
 
 
 
 
 
 
7afe4cc
 
 
 
 
 
 
 
 
 
 
 
 
a3b1b80
 
 
 
7afe4cc
a3b1b80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7afe4cc
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
'use client';

import { FC } from 'react';
import Image from 'next/image';

interface MenuSceneProps {
  language: 'fr' | 'en' | 'es';
  setLanguage: (lang: 'fr' | 'en' | 'es') => void;
  setNextScene: () => void;
}

const MenuScene: FC<MenuSceneProps> = ({ setLanguage, setNextScene }) => {

  const handleLanguageSelect = (language: 'fr' | 'en' | 'es') => {
    setLanguage(language);
    setNextScene();
  };

  return (
    <div className="relative w-screen h-screen">
      {/* Image de fond */}
      <Image
        src="https://ik.imagekit.io/z0tzxea0wgx/MistralGameJam/DD_start_P_osNnWmM.png?updatedAt=1737835883339"
        alt="Background"
        fill
        className="object-cover"
        priority
      />

      {/* Contenu du menu avec un fond semi-transparent */}
      <div className="relative z-10 flex flex-col items-end justify-center h-full w-full">
        <div className="flex flex-col gap-10 mr-[20vw]">
            <button
              onClick={() => handleLanguageSelect('fr')}
              className="text-8xl text-white roboto-slab hover:text-sky-500 transition-colors"
            >
              Français
            </button>
            <button
              onClick={() => handleLanguageSelect('en')}
              className="text-8xl text-white roboto-slab hover:text-sky-500 transition-colors"
            >
              English
            </button>
            <button
              onClick={() => handleLanguageSelect('es')}
              className="text-8xl text-white roboto-slab hover:text-sky-500 transition-colors"
            >
              Español
            </button>
        </div>
      </div>
    </div>
  );
};

export default MenuScene;