-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added color blind mode - Added hard mode - Added letter hints - Added wordle infinite translation and row limit - Added wordle daily clean calendar button
- Loading branch information
1 parent
4a92a96
commit 855d0de
Showing
66 changed files
with
1,509 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<resources> | ||
<string name="app_name">NewQuiz</string> | ||
<string name="title_dynamicfeaturetest">DynamicFeatureTest</string> | ||
|
||
<!-- Facebook --> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 49 additions & 1 deletion
50
core/src/main/java/com/infinitepower/newquiz/core/common/dataStore/SettingsCommon.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,65 @@ | ||
package com.infinitepower.newquiz.core.common.dataStore | ||
|
||
import android.content.Context | ||
import androidx.annotation.Keep | ||
import androidx.annotation.RawRes | ||
import androidx.annotation.StringRes | ||
import androidx.datastore.core.DataStore | ||
import androidx.datastore.preferences.core.Preferences | ||
import androidx.datastore.preferences.core.booleanPreferencesKey | ||
import androidx.datastore.preferences.core.intPreferencesKey | ||
import androidx.datastore.preferences.core.stringPreferencesKey | ||
import androidx.datastore.preferences.preferencesDataStore | ||
import com.infinitepower.newquiz.core.R | ||
import com.infinitepower.newquiz.core.dataStore.manager.PreferenceRequest | ||
import java.util.Locale | ||
|
||
val Context.settingsDataStore: DataStore<Preferences> by preferencesDataStore(name = "settings") | ||
|
||
object SettingsCommon { | ||
object ShowLoginCard : PreferenceRequest<Boolean>(booleanPreferencesKey("showLoginCard"), true) | ||
|
||
object QuickQuizQuestionsSize : PreferenceRequest<Int>(intPreferencesKey("quickQuizQuestionsSize"), 5) | ||
object QuickQuizQuestionsSize : | ||
PreferenceRequest<Int>(intPreferencesKey("quickQuizQuestionsSize"), 5) | ||
|
||
object InfiniteWordleQuizLanguage : PreferenceRequest<String>( | ||
stringPreferencesKey("infiniteWordleQuizLanguage"), | ||
getInfiniteWordleDefaultLang() | ||
) | ||
|
||
object WordleInfiniteRowsLimited : PreferenceRequest<Boolean>(booleanPreferencesKey("wordleInfiniteRowsLimited"), false) | ||
|
||
object WordleInfiniteRowsLimit : PreferenceRequest<Int>(intPreferencesKey("wordleInfiniteRowsLimit"), 6) | ||
|
||
object WordleHardMode : PreferenceRequest<Boolean>(booleanPreferencesKey("wordleHardMode"), false) | ||
|
||
object WordleColorBlindMode : PreferenceRequest<Boolean>(booleanPreferencesKey("wordleColorBlindMode"), false) | ||
|
||
object WordleLetterHints : PreferenceRequest<Boolean>(booleanPreferencesKey("wordleLetterHints"), false) | ||
} | ||
|
||
@Keep | ||
data class SettingsWordleLang( | ||
val key: String, | ||
@StringRes val languageId: Int, | ||
@RawRes val rawListId: Int | ||
) | ||
|
||
val infiniteWordleSupportedLang = listOf( | ||
SettingsWordleLang( | ||
key = "en", | ||
languageId = R.string.english, | ||
rawListId = R.raw.wordle_list | ||
), | ||
SettingsWordleLang( | ||
key = "pt", | ||
languageId = R.string.portuguese, | ||
rawListId = R.raw.wordle_list_pt | ||
), | ||
) | ||
|
||
private fun getInfiniteWordleDefaultLang(): String { | ||
val localeLanguage = Locale.getDefault().language | ||
val langKeys = infiniteWordleSupportedLang.map { it.key } | ||
return if (localeLanguage in langKeys) localeLanguage else "en" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="quick_quiz">Quiz rápido</string> | ||
<string name="back">Voltar</string> | ||
<string name="saved_questions">Perguntas guardadas</string> | ||
<string name="wordle">Wordle</string> | ||
<string name="wordle_infinite">Wordle infinito</string> | ||
<string name="wordle_daily">Wordle diário</string> | ||
<string name="verify">Verificar</string> | ||
<string name="play_again">Jogar novamente</string> | ||
<string name="close">Fechar</string> | ||
<string name="watch_ad">Ver anúncio</string> | ||
<string name="loading_rewarded_ad">A carregar o anúncio</string> | ||
<string name="game_over">Fim de jogo</string> | ||
<string name="you_lost_the_game_watch_ad_q">Você perdeu o jogo.\\n Quer assistir um anúncio para poder adicionar mais uma linha?</string> | ||
<string name="item_empty">Item vazio</string> | ||
<string name="item_i_none">Item %1$s nada</string> | ||
<string name="item_i_present">Item %1$s present</string> | ||
<string name="item_i_correct">Item %1$s correto</string> | ||
<string name="four_letters">4 Letras</string> | ||
<string name="five_letters">5 Letras</string> | ||
<string name="six_letters">6 Letras</string> | ||
<string name="back_month">Voltar o mês</string> | ||
<string name="next_month">Próximo mês</string> | ||
<string name="settings">Opções</string> | ||
<string name="general">Geral</string> | ||
<string name="quiz">Quiz</string> | ||
<string name="quiz_language">Idioma do quiz</string> | ||
<string name="english">Inglês</string> | ||
<string name="portuguese">Português</string> | ||
<string name="normal_quiz">Quiz normal</string> | ||
<string name="color_blind_mode">Modo daltónico</string> | ||
<string name="high_contrast_colors">Cores com alto contraste</string> | ||
<string name="info">Informações</string> | ||
<string name="letter_hints">Ajudas da letra</string> | ||
<string name="hint_above_the_letter_that_it_appears_twice_or_more_in_the_hidden_word">Ajuda sobre a letra presente que aparece duas ou mais vezes.</string> | ||
<string name="hard_mode">Modo difícil</string> | ||
<string name="any_revealed_hints_must_be_used_in_subsequest_guesses">Todas as dicas usadas têm de ser usadas na próxima linha</string> | ||
<string name="wordle_infinite_row_limited">Linhas limitadas no wordle infinito</string> | ||
<string name="row_limit">Limite das linhas</string> | ||
<string name="wordle_infinite_row_limit_value">Limite das linhas do wordle infinito.</string> | ||
<string name="clean_calendar_data">Limpar os dados do calendário</string> | ||
<string name="clean_saved_calendar_wins_losses">Limpar todas vitórias/derrotas do calendário.</string> | ||
<string name="rows_limited">Linhas limitadas</string> | ||
<string name="clear_settings">Apagar Definições</string> | ||
<string name="remove_all_saved_settings">Remova todas as definições guardadas</string> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,47 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="normal_quiz">Normal Quiz</string> | ||
<string name="quick_quiz">Quick Quiz</string> | ||
<string name="back">Back</string> | ||
<string name="saved_questions">Saved questions</string> | ||
<string name="wordle">Wordle</string> | ||
<string name="wordle_infinite">Wordle infinite</string> | ||
<string name="wordle_daily">Daily wordle</string> | ||
<string name="verify">Verify</string> | ||
<string name="play_again">Play again</string> | ||
<string name="close">Close</string> | ||
<string name="watch_ad">Watch ad</string> | ||
<string name="loading_rewarded_ad">Loading rewarded ad</string> | ||
<string name="game_over">Game Over</string> | ||
<string name="you_lost_the_game_watch_ad_q">You lost the game.\nDo you want to watch one ad to try one more row?</string> | ||
<string name="item_empty">Item empty</string> | ||
<string name="item_i_none">Item %1$s none</string> | ||
<string name="item_i_present">Item %1$s present</string> | ||
<string name="item_i_correct">Item %1$s correct</string> | ||
<string name="four_letters">4 Letters</string> | ||
<string name="five_letters">5 Letters</string> | ||
<string name="six_letters">6 Letters</string> | ||
<string name="back_month">Back month</string> | ||
<string name="next_month">Next month</string> | ||
<string name="settings">Settings</string> | ||
<string name="general">General</string> | ||
<string name="quiz">Quiz</string> | ||
<string name="quiz_language">Quiz language</string> | ||
<string name="english">English</string> | ||
<string name="portuguese">Portuguese</string> | ||
<string name="color_blind_mode">Color blind mode</string> | ||
<string name="high_contrast_colors" >High contrast colors</string> | ||
<string name="info">Info</string> | ||
<string name="letter_hints">Letter hints</string> | ||
<string name="hint_above_the_letter_that_it_appears_twice_or_more_in_the_hidden_word">Hint above the letter that it appears twice or more in the hidden word</string> | ||
<string name="hard_mode">Hard mode</string> | ||
<string name="any_revealed_hints_must_be_used_in_subsequest_guesses">Any revealed hints must be used in subsequent guesses</string> | ||
<string name="rows_limited">Rows limited</string> | ||
<string name="wordle_infinite_row_limited">Wordle infinite row limited.</string> | ||
<string name="row_limit">Row limit</string> | ||
<string name="wordle_infinite_row_limit_value">Wordle infinite row limit value.</string> | ||
<string name="clean_calendar_data">Clean calendar data</string> | ||
<string name="clean_saved_calendar_wins_losses">Cleans all saved calendar wins/losses.</string> | ||
<string name="clear_settings">Clear Preferences</string> | ||
<string name="remove_all_saved_settings">Remove all saved settings</string> | ||
</resources> |
Oops, something went wrong.