diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 65bccb1b024c3e652fce0a3c3e66d7484a64dad2..2977a79ec75c314ada6eb1fc5bedd05f416a111e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -20,24 +20,24 @@ <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> - <activity android:name=".AuthActivity" android:exported="true"/> - <activity android:name=".MapActivity" android:exported="true"/> - <activity android:name=".LeaderboardActivity" android:exported="true"/> - <activity android:name=".minijuego1.Minijuego1" android:exported="true"/> - <activity android:name=".minijuego2.Minijuego2" android:exported="true"/> - <activity android:name=".minijuego3.Minijuego3" android:exported="true"/> - <activity android:name=".minijuego1.FinMinijuego1" android:exported="true"/> - <activity android:name=".exploradoresDePintia.ExploradoresDePintia" android:exported="true"/> - <activity android:name=".minijuego1.InicioMinijuego1" android:exported="true"/> - <activity android:name=".ListaMinijuegos" android:exported="true"/> - <activity android:name=".minijuegoInvestigacion.MinijuegoInvestigar" android:exported="true"/> - <activity android:name=".ruleta.Ruleta" android:exported="true"/> - <activity android:name=".minijuegoReparacion.MinijuegoReparacion" android:exported="true"/> - <activity android:name=".exploradoresDePintia.Resumen" android:exported="true"/> - <activity android:name=".TabernaActivity" android:exported="true"/> - <activity android:name=".TiendaActivity" android:exported="true"/> - <activity android:name=".ArmeriaActivity" android:exported="true"/> - <activity android:name=".minijuego4.Minijuego4" android:exported="true"/> + <activity android:name=".AuthActivity" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".MapActivity" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".LeaderboardActivity" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".minijuego1.Minijuego1" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".minijuego2.Minijuego2" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".minijuego3.Minijuego3" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".minijuego1.FinMinijuego1" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".exploradoresDePintia.ExploradoresDePintia" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".minijuego1.InicioMinijuego1" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".ListaMinijuegos" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".minijuegoInvestigacion.MinijuegoInvestigar" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".ruleta.Ruleta" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".minijuegoReparacion.MinijuegoReparacion" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".exploradoresDePintia.Resumen" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".TabernaActivity" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".TiendaActivity" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".ArmeriaActivity" android:exported="true" android:screenOrientation="portrait"/> + <activity android:name=".minijuego4.Minijuego4" android:exported="true" android:screenOrientation="portrait"/> </application> </manifest> \ No newline at end of file diff --git a/app/src/main/java/com/example/ellegadodepintia/minijuego3/Minijuego3.kt b/app/src/main/java/com/example/ellegadodepintia/minijuego3/Minijuego3.kt index 92b0d8bb8fbc083a93909da35ceba75d60143894..45e97d40f305dc4df0dc2ca671eab946c2b4dbd3 100644 --- a/app/src/main/java/com/example/ellegadodepintia/minijuego3/Minijuego3.kt +++ b/app/src/main/java/com/example/ellegadodepintia/minijuego3/Minijuego3.kt @@ -18,7 +18,12 @@ import android.animation.AnimatorListenerAdapter import android.animation.ValueAnimator import android.graphics.ColorMatrix import android.graphics.ColorMatrixColorFilter +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.DialogFragment import com.example.ellegadodepintia.R +import com.example.ellegadodepintia.minijuego3.ModalFragment import com.example.ellegadodepintia.soundManager.SoundManager class Minijuego3 : AppCompatActivity() { @@ -53,6 +58,12 @@ class Minijuego3 : AppCompatActivity() { gridLayout = findViewById(R.id.gridLayout) cronometroTextView = findViewById(R.id.cronometro) botonVolver = findViewById(R.id.btn_volver) + val tutorialButton = findViewById<ImageView>(R.id.descripcion) + tutorialButton.setOnClickListener { + // Mostrar el modal + val modal = ModalFragment() + modal.show(supportFragmentManager, "ModalFragment") + } } private fun setupBotonStart() { @@ -275,3 +286,21 @@ class Minijuego3 : AppCompatActivity() { soundManager.stopSound() } } +class ModalFragment : DialogFragment() { + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // Inflar el diseño del modal + val view = inflater.inflate(R.layout.modal_minijuego3_tutorial, container, false) + + // Configurar el botón de cerrar + val closeButton = view.findViewById<Button>(R.id.cerrar) + closeButton.setOnClickListener { + dismiss() // Cierra el modal + } + + return view + } +} diff --git a/app/src/main/res/drawable/tutorial_minijuego3_bien.jpeg b/app/src/main/res/drawable/tutorial_minijuego3_bien.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f1478504b1e63c6060bd619f9df564a8a64fa594 Binary files /dev/null and b/app/src/main/res/drawable/tutorial_minijuego3_bien.jpeg differ diff --git a/app/src/main/res/drawable/tutorial_minijuego3_mal.jpeg b/app/src/main/res/drawable/tutorial_minijuego3_mal.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0a6b270b258cfe3294f23f433d64851caa3e1328 Binary files /dev/null and b/app/src/main/res/drawable/tutorial_minijuego3_mal.jpeg differ diff --git a/app/src/main/res/layout/activity_minijuego3.xml b/app/src/main/res/layout/activity_minijuego3.xml index d51fdf06bae2a5ebde0d0a4d097c63056b476472..e4948c894310af2958e1f197615ce8e660aac5e8 100644 --- a/app/src/main/res/layout/activity_minijuego3.xml +++ b/app/src/main/res/layout/activity_minijuego3.xml @@ -24,12 +24,13 @@ <!-- Botón para iniciar el juego --> <ImageView + android:id="@+id/descripcion" android:layout_width="wrap_content" android:layout_height="175dp" android:layout_marginTop="-10dp" android:layout_marginBottom="40dp" android:paddingBottom="40dp" - android:src="@drawable/texto_minijuego_3_descripcion" /> + android:src="@drawable/asi_boton_tutorial" /> <ImageView android:id="@+id/btn_jugar" diff --git a/app/src/main/res/layout/modal_minijuego3_tutorial.xml b/app/src/main/res/layout/modal_minijuego3_tutorial.xml new file mode 100644 index 0000000000000000000000000000000000000000..24ebcdcd0ef7168ddf97b044151c76442de75972 --- /dev/null +++ b/app/src/main/res/layout/modal_minijuego3_tutorial.xml @@ -0,0 +1,115 @@ +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@drawable/style_background_gradiente" + android:padding="10dp" + tools:ignore="HardcodedText, UseCompoundDrawables,ButtonStyle"> + + <ScrollView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:fillViewport="true" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <LinearLayout + android:id="@+id/mainArea" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:gravity="center" + android:orientation="vertical"> + + <TextView + android:id="@+id/nombreTitulo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:layout_marginBottom="10dp" + android:fontFamily="@font/pixeled" + android:shadowColor="#000000" + android:shadowDx="2" + android:shadowDy="2" + android:shadowRadius="4" + android:text="Minijuego 3" + android:textAlignment="center" + android:textColor="#6A0000" + android:textSize="24sp" + android:textStyle="bold" /> + + <View + android:layout_width="match_parent" + android:layout_height="1dp" + android:layout_marginBottom="10dp" + android:background="#000000" /> + + + <androidx.cardview.widget.CardView + android:id="@+id/foto1" + android:layout_width="150dp" + android:layout_height="150dp" + android:layout_margin="5dp" + android:elevation="0dp" + app:cardCornerRadius="10dp"> + + <ImageView + android:id="@+id/imagenBien" + android:layout_width="150dp" + android:layout_height="150dp" + android:contentDescription="Slot de equipo 1" + android:scaleType="centerCrop" + android:scaleX="1" + android:src="@drawable/tutorial_minijuego3_bien"/> + + </androidx.cardview.widget.CardView><androidx.cardview.widget.CardView + android:id="@+id/foto2" + android:layout_width="150dp" + android:layout_height="150dp" + android:layout_margin="5dp" + android:elevation="0dp" + app:cardCornerRadius="10dp"> + + <ImageView + android:id="@+id/imagenBomba" + android:layout_width="150dp" + android:layout_height="150dp" + android:contentDescription="Slot de equipo 1" + android:scaleType="centerCrop" + android:scaleX="1" + android:src="@drawable/tutorial_minijuego3_mal"/> + + </androidx.cardview.widget.CardView> + + + + + <TextView + android:id="@+id/textoDescripcion" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="3dp" + android:fontFamily="@font/pixeled" + android:padding="8dp" + android:text="Busca las parejas de cada reliquia haciendo click en las cartas, por cada pareja que encuentres se suma mas tiempo." + android:textAlignment="center" + android:textColor="#000000" + android:textSize="20sp" /> + + + <Button + android:id="@+id/cerrar" + android:layout_width="135dp" + android:layout_height="wrap_content" + android:layout_marginTop="20dp" + android:backgroundTint="@color/pintiaButton" + android:fontFamily="@font/pixeled" + android:text="Cerrar" + android:textColor="@color/pintiaButtonText" + android:textStyle="bold" /> + + </LinearLayout> + </ScrollView> + +</androidx.constraintlayout.widget.ConstraintLayout>