MAj menu option

This commit is contained in:
Sehl Aylane
2026-03-23 12:12:26 +01:00
parent fa9e587a7e
commit c0d7a6d3d7
2 changed files with 3 additions and 32 deletions
@@ -13,9 +13,7 @@ public class OptionsActivity extends Activity
implements CompoundButton.OnCheckedChangeListener, View.OnClickListener {
private SharedPreferences prefs;
private CheckBox checkDaltonien;
private CheckBox checkHard;
private Button btnRetour;
@@ -26,23 +24,20 @@ public class OptionsActivity extends Activity
prefs = getSharedPreferences("chuzzle_prefs", MODE_PRIVATE);
checkDaltonien = findViewById(R.id.checkDaltonien);
checkHard = findViewById(R.id.checkHard);
btnRetour = findViewById(R.id.btnBack);
checkDaltonien.setChecked(prefs.getBoolean("daltonien", false));
checkHard.setChecked(prefs.getBoolean("hard_mode", false));
checkDaltonien.setOnCheckedChangeListener(this);
checkHard.setOnCheckedChangeListener(this);
btnRetour.setOnClickListener(this);
}
@Override
public void onCheckedChanged(CompoundButton bouton, boolean estCoche) {
if (bouton == checkDaltonien) {
prefs.edit().putBoolean("daltonien", estCoche).apply();
} else if (bouton == checkHard) {
if (bouton == checkHard) {
prefs.edit().putBoolean("hard_mode", estCoche).apply();
}
}