This commit is contained in:
lalBi94 2023-04-09 17:53:44 +02:00
parent 3790fd1d93
commit 0acd9e45e2
10 changed files with 86 additions and 68 deletions

View File

@ -1,39 +0,0 @@
plugins {
id 'com.android.application'
}
android {
namespace 'com.example.jmastermind'
compileSdk 33
defaultConfig {
applicationId "com.example.jmastermind"
minSdk 19
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.preference:preference:1.2.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}

View File

@ -2,11 +2,11 @@ package com.example.jmastermind.Events;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.graphics.Color; import android.graphics.Color;
import android.preference.PreferenceManager;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.preference.PreferenceManager;
import com.example.jmastermind.Deck.Deck; import com.example.jmastermind.Deck.Deck;
import com.example.jmastermind.Deck.DeckCheck; import com.example.jmastermind.Deck.DeckCheck;
import com.example.jmastermind.Deck.DeckLambda; import com.example.jmastermind.Deck.DeckLambda;

View File

@ -0,0 +1,26 @@
package com.example.jmastermind.Events;
import android.content.Intent;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import com.example.jmastermind.Menu.Menu;
public class RulesEvent implements View.OnClickListener {
private AppCompatActivity context;
/**
* L'evenement pour cliquer sur les regles et retourner directement au menu
* @param context Le contexte.
* */
public RulesEvent(AppCompatActivity context) {
this.context = context;
}
@Override
public void onClick(View view) {
Intent i = new Intent(this.context, Menu.class);
this.context.startActivity(i);
}
}

View File

@ -4,6 +4,8 @@ import android.media.MediaPlayer;
import android.os.Bundle; import android.os.Bundle;
import android.widget.Button; import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.LinearLayout;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.example.jmastermind.Events.CanVoidEvent; import com.example.jmastermind.Events.CanVoidEvent;

View File

@ -2,8 +2,12 @@ package com.example.jmastermind.Rules;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.widget.LinearLayout;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.example.jmastermind.Events.RulesEvent;
import com.example.jmastermind.Menu.Menu; import com.example.jmastermind.Menu.Menu;
import com.example.jmastermind.R; import com.example.jmastermind.R;
@ -16,6 +20,8 @@ public class Rules extends AppCompatActivity {
protected void onCreate(@Nullable Bundle savedInstanceState) { protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.rules); setContentView(R.layout.rules);
LinearLayout rulescont = findViewById(R.id.rulescontainer);
rulescont.setOnClickListener(new RulesEvent(this));
} }
@Override @Override

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -9,6 +9,13 @@
android:orientation="vertical" android:orientation="vertical"
> >
<LinearLayout
android:id="@+id/rulescontainer"
android:gravity="center"
android:orientation="vertical"
android:layout_width="wrap_content"
android:scrollbars="vertical"
android:layout_height="wrap_content">
<TextView <TextView
android:gravity="center" android:gravity="center"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -31,7 +38,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/black" android:background="@color/black"
android:src="@drawable/rulesone" android:src="@drawable/solomode"
/> />
<TextView <TextView
@ -43,4 +50,20 @@
android:textSize="40sp" android:textSize="40sp"
android:text="Mode Multi"/> android:text="Mode Multi"/>
<TextView
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/black"
android:textColor="@color/white"
android:textSize="20sp"
android:text="2. Selectionner le mode Joueur Contre Joueur"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/black"
android:src="@drawable/multimode"
/>
</LinearLayout>
</LinearLayout> </LinearLayout>