mirror of
https://github.com/kalarina-bit/Matewave.git
synced 2026-11-22 08:06:09 +00:00
Compare commits
1
Commits
v1.0.49
...
77c438ff66
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77c438ff66 |
@@ -13,8 +13,8 @@ android {
|
|||||||
applicationId = "cc.skysparkle.matewave"
|
applicationId = "cc.skysparkle.matewave"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 9
|
versionCode = 10
|
||||||
versionName = "1.0.49"
|
versionName = "1.0.50"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ class MainActivity : ComponentActivity() {
|
|||||||
runCatching { cc.skysparkle.matewave.puzzles.PuzzleRepository.load(appContext) }
|
runCatching { cc.skysparkle.matewave.puzzles.PuzzleRepository.load(appContext) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cc.skysparkle.matewave.ui.theme.AppThemeState.load(this)
|
||||||
setContent {
|
setContent {
|
||||||
MatewaveTheme {
|
MatewaveTheme {
|
||||||
androidx.compose.foundation.layout.Box(
|
androidx.compose.foundation.layout.Box(
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import androidx.compose.ui.layout.ContentScale
|
|||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import cc.skysparkle.matewave.R
|
import cc.skysparkle.matewave.R
|
||||||
import cc.skysparkle.matewave.ui.theme.AppBackground
|
import cc.skysparkle.matewave.ui.theme.AppBackground
|
||||||
|
import cc.skysparkle.matewave.ui.theme.AppThemeState
|
||||||
import cc.skysparkle.matewave.ui.theme.ChessGreen
|
import cc.skysparkle.matewave.ui.theme.ChessGreen
|
||||||
import cc.skysparkle.matewave.ui.theme.Lime
|
import cc.skysparkle.matewave.ui.theme.Lime
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
@@ -73,6 +74,9 @@ private val ForestTint = ColorFilter.colorMatrix(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/** For the other styles the forest turns almost grey, so it never fights their colours. */
|
||||||
|
private val NeutralForestTint = ColorFilter.colorMatrix(ColorMatrix().apply { setToSaturation(0.12f) })
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The misty forest artwork, deeply darkened so it reads as texture: the mist stays
|
* The misty forest artwork, deeply darkened so it reads as texture: the mist stays
|
||||||
* visible behind the headings at the top and fades into near-black lower down.
|
* visible behind the headings at the top and fades into near-black lower down.
|
||||||
@@ -95,7 +99,7 @@ fun AppBackdrop() {
|
|||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
contentScale = ContentScale.Crop,
|
contentScale = ContentScale.Crop,
|
||||||
colorFilter = ForestTint
|
colorFilter = if (AppThemeState.palette.greenBackdrop) ForestTint else NeutralForestTint
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Box(
|
Box(
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ import androidx.compose.ui.graphics.Color
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.window.Dialog
|
import androidx.compose.ui.window.Dialog
|
||||||
|
|
||||||
val DialogSurface = cc.skysparkle.matewave.ui.theme.Surface1
|
val DialogSurface: Color get() = cc.skysparkle.matewave.ui.theme.Surface1
|
||||||
val DialogAccent = cc.skysparkle.matewave.ui.theme.ChessGreen
|
val DialogAccent: Color get() = cc.skysparkle.matewave.ui.theme.ChessGreen
|
||||||
val DialogShape = RoundedCornerShape(28.dp)
|
val DialogShape = RoundedCornerShape(28.dp)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ fun GlassButton(
|
|||||||
onClick = onClick
|
onClick = onClick
|
||||||
) else Modifier
|
) else Modifier
|
||||||
)
|
)
|
||||||
.padding(horizontal = 22.dp, vertical = 15.dp),
|
.padding(horizontal = 16.dp, vertical = 15.dp),
|
||||||
horizontalArrangement = Arrangement.Center,
|
horizontalArrangement = Arrangement.Center,
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
content = content
|
content = content
|
||||||
@@ -186,7 +186,7 @@ fun GlassOutlinedButton(
|
|||||||
onClick = onClick
|
onClick = onClick
|
||||||
) else Modifier
|
) else Modifier
|
||||||
)
|
)
|
||||||
.padding(horizontal = 22.dp, vertical = 15.dp),
|
.padding(horizontal = 16.dp, vertical = 15.dp),
|
||||||
horizontalArrangement = Arrangement.Center,
|
horizontalArrangement = Arrangement.Center,
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
content = content
|
content = content
|
||||||
|
|||||||
@@ -12,6 +12,13 @@ import androidx.compose.foundation.layout.Row
|
|||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.Spacer
|
||||||
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
|
import cc.skysparkle.matewave.ui.theme.AppPalette
|
||||||
|
import cc.skysparkle.matewave.ui.theme.AppStyle
|
||||||
|
import cc.skysparkle.matewave.ui.theme.AppThemeState
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.Switch
|
import androidx.compose.material3.Switch
|
||||||
@@ -25,7 +32,6 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.graphics.Color
|
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
@@ -51,6 +57,13 @@ fun AppearanceScreen(onBack: () -> Unit) {
|
|||||||
var openingBar by remember { mutableStateOf(appearance.showOpening) }
|
var openingBar by remember { mutableStateOf(appearance.showOpening) }
|
||||||
|
|
||||||
GlassScaffold(title = stringResource(R.string.appearance_title), onBack = onBack) {
|
GlassScaffold(title = stringResource(R.string.appearance_title), onBack = onBack) {
|
||||||
|
Text(
|
||||||
|
stringResource(R.string.app_style_title),
|
||||||
|
color = ink,
|
||||||
|
style = MaterialTheme.typography.titleMedium
|
||||||
|
)
|
||||||
|
StylePicker()
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
stringResource(R.string.appearance_board_theme),
|
stringResource(R.string.appearance_board_theme),
|
||||||
color = ink,
|
color = ink,
|
||||||
@@ -77,7 +90,7 @@ fun AppearanceScreen(onBack: () -> Unit) {
|
|||||||
)
|
)
|
||||||
if (candidate == theme) {
|
if (candidate == theme) {
|
||||||
cc.skysparkle.matewave.ui.components.AppIcon(
|
cc.skysparkle.matewave.ui.components.AppIcon(
|
||||||
R.drawable.ic_check_box, size = 20.dp, tint = Color(0xFF7BE495)
|
R.drawable.ic_check_box, size = 20.dp, tint = cc.skysparkle.matewave.ui.theme.ChessGreen
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,6 +140,85 @@ fun AppearanceScreen(onBack: () -> Unit) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** App colour styles as swatches, three per row; the device style follows the wallpaper. */
|
||||||
|
@Composable
|
||||||
|
private fun StylePicker() {
|
||||||
|
val context = LocalContext.current
|
||||||
|
val selected = AppThemeState.style
|
||||||
|
val styles = remember { AppStyle.available }
|
||||||
|
Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||||
|
styles.chunked(3).forEach { row ->
|
||||||
|
Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||||
|
row.forEach { style ->
|
||||||
|
StyleSwatch(
|
||||||
|
style = style,
|
||||||
|
palette = remember(style) { AppThemeState.paletteFor(context, style) },
|
||||||
|
selected = style == selected,
|
||||||
|
modifier = Modifier.weight(1f),
|
||||||
|
onClick = { AppThemeState.select(context, style) }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
repeat(3 - row.size) { Spacer(Modifier.weight(1f)) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (selected == AppStyle.DEVICE) {
|
||||||
|
Text(
|
||||||
|
stringResource(R.string.app_style_device_hint),
|
||||||
|
color = ink.copy(alpha = 0.6f),
|
||||||
|
style = MaterialTheme.typography.bodySmall
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
private fun StyleSwatch(
|
||||||
|
style: AppStyle,
|
||||||
|
palette: AppPalette,
|
||||||
|
selected: Boolean,
|
||||||
|
modifier: Modifier = Modifier,
|
||||||
|
onClick: () -> Unit
|
||||||
|
) {
|
||||||
|
val shape = RoundedCornerShape(18.dp)
|
||||||
|
Column(
|
||||||
|
modifier = modifier
|
||||||
|
.clip(shape)
|
||||||
|
.background(palette.surface1)
|
||||||
|
.border(if (selected) 2.dp else 1.dp, if (selected) palette.accent else PanelBorder, shape)
|
||||||
|
.clickable(onClick = onClick)
|
||||||
|
.padding(vertical = 12.dp, horizontal = 6.dp),
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
|
) {
|
||||||
|
Box(contentAlignment = Alignment.BottomEnd) {
|
||||||
|
Box(
|
||||||
|
modifier = Modifier.size(44.dp).clip(CircleShape).background(palette.accent),
|
||||||
|
contentAlignment = Alignment.Center
|
||||||
|
) {
|
||||||
|
if (selected) {
|
||||||
|
cc.skysparkle.matewave.ui.components.AppIcon(
|
||||||
|
R.drawable.ic_check_box, size = 20.dp, tint = palette.onAccent
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.size(20.dp)
|
||||||
|
.clip(CircleShape)
|
||||||
|
.background(palette.action)
|
||||||
|
.border(2.dp, palette.surface1, CircleShape)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
Spacer(Modifier.height(8.dp))
|
||||||
|
Text(
|
||||||
|
stringResource(style.titleRes),
|
||||||
|
color = ink,
|
||||||
|
style = MaterialTheme.typography.labelLarge,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
private fun ThemePreview(theme: BoardTheme, showPieces: Boolean) {
|
private fun ThemePreview(theme: BoardTheme, showPieces: Boolean) {
|
||||||
val shape = RoundedCornerShape(6.dp)
|
val shape = RoundedCornerShape(6.dp)
|
||||||
|
|||||||
@@ -179,12 +179,14 @@ fun GameScreen(viewModel: GameViewModel, onExit: () -> Unit) {
|
|||||||
Text(
|
Text(
|
||||||
if (state.drawOfferSentByMe) stringResource(R.string.draw_offer_waiting) else stringResource(R.string.offer_draw),
|
if (state.drawOfferSentByMe) stringResource(R.string.draw_offer_waiting) else stringResource(R.string.offer_draw),
|
||||||
color = ink,
|
color = ink,
|
||||||
maxLines = 1
|
style = MaterialTheme.typography.labelLarge,
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = androidx.compose.ui.text.style.TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
GlassOutlinedButton(onClick = { confirmResign = true }, modifier = Modifier.weight(1f)) {
|
GlassOutlinedButton(onClick = { confirmResign = true }, modifier = Modifier.weight(1f)) {
|
||||||
ButtonIcon(R.drawable.ic_flag)
|
ButtonIcon(R.drawable.ic_flag)
|
||||||
Text(stringResource(R.string.resign), color = ink, maxLines = 1)
|
Text(stringResource(R.string.resign), color = ink, style = MaterialTheme.typography.labelLarge, maxLines = 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ChatButton(
|
ChatButton(
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ fun MainMenuScreen(
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clip(RoundedCornerShape(50))
|
.clip(RoundedCornerShape(50))
|
||||||
.background(Surface2)
|
.background(Surface2)
|
||||||
.clickable { showStats = true }
|
|
||||||
.padding(start = 10.dp, end = 14.dp, top = 8.dp, bottom = 8.dp),
|
.padding(start = 10.dp, end = 14.dp, top = 8.dp, bottom = 8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -0,0 +1,144 @@
|
|||||||
|
package cc.skysparkle.matewave.ui.theme
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.os.Build
|
||||||
|
import androidx.compose.material3.dynamicDarkColorScheme
|
||||||
|
import androidx.compose.runtime.getValue
|
||||||
|
import androidx.compose.runtime.mutableStateOf
|
||||||
|
import androidx.compose.runtime.setValue
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import cc.skysparkle.matewave.R
|
||||||
|
|
||||||
|
/** The colours every screen is drawn with. The app stays dark in every style. */
|
||||||
|
data class AppPalette(
|
||||||
|
/** Highlights, selected states, progress. */
|
||||||
|
val accent: Color,
|
||||||
|
/** The one main action on a screen. */
|
||||||
|
val action: Color,
|
||||||
|
/** Text and icons on top of [accent] or [action]. */
|
||||||
|
val onAccent: Color,
|
||||||
|
val background: Color,
|
||||||
|
val surface1: Color,
|
||||||
|
val surface2: Color,
|
||||||
|
/** The forest backdrop keeps its green cast only with the original colours. */
|
||||||
|
val greenBackdrop: Boolean = false
|
||||||
|
)
|
||||||
|
|
||||||
|
enum class AppStyle(val titleRes: Int) {
|
||||||
|
MATEWAVE(R.string.app_style_matewave),
|
||||||
|
LAVENDER(R.string.app_style_lavender),
|
||||||
|
PEACH(R.string.app_style_peach),
|
||||||
|
MINT(R.string.app_style_mint),
|
||||||
|
SKY(R.string.app_style_sky),
|
||||||
|
DEVICE(R.string.app_style_device);
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
/** Wallpaper colours exist from Android 12. */
|
||||||
|
val deviceSupported: Boolean get() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S
|
||||||
|
|
||||||
|
val available: List<AppStyle> get() = entries.filter { it != DEVICE || deviceSupported }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val MatewavePalette = AppPalette(
|
||||||
|
accent = Color(0xFF35E07E),
|
||||||
|
action = Color(0xFFE3F84B),
|
||||||
|
onAccent = Color(0xFF0B1610),
|
||||||
|
background = Color(0xFF0C0F0E),
|
||||||
|
surface1 = Color(0xFF161B19),
|
||||||
|
surface2 = Color(0xFF1F2623),
|
||||||
|
greenBackdrop = true
|
||||||
|
)
|
||||||
|
|
||||||
|
private val LavenderPalette = AppPalette(
|
||||||
|
accent = Color(0xFFC8B6FF),
|
||||||
|
action = Color(0xFFFFC6E5),
|
||||||
|
onAccent = Color(0xFF1E1630),
|
||||||
|
background = Color(0xFF0F0E14),
|
||||||
|
surface1 = Color(0xFF1A1822),
|
||||||
|
surface2 = Color(0xFF25222F)
|
||||||
|
)
|
||||||
|
|
||||||
|
private val PeachPalette = AppPalette(
|
||||||
|
accent = Color(0xFFFFB59E),
|
||||||
|
action = Color(0xFFFFE08A),
|
||||||
|
onAccent = Color(0xFF2A1710),
|
||||||
|
background = Color(0xFF12100E),
|
||||||
|
surface1 = Color(0xFF1D1A17),
|
||||||
|
surface2 = Color(0xFF28231F)
|
||||||
|
)
|
||||||
|
|
||||||
|
private val MintPalette = AppPalette(
|
||||||
|
accent = Color(0xFF9EE7C8),
|
||||||
|
action = Color(0xFFD8F5A8),
|
||||||
|
onAccent = Color(0xFF0F231B),
|
||||||
|
background = Color(0xFF0D110F),
|
||||||
|
surface1 = Color(0xFF171C1A),
|
||||||
|
surface2 = Color(0xFF202724)
|
||||||
|
)
|
||||||
|
|
||||||
|
private val SkyPalette = AppPalette(
|
||||||
|
accent = Color(0xFFA5CBFF),
|
||||||
|
action = Color(0xFFB8F1EE),
|
||||||
|
onAccent = Color(0xFF0F1A2A),
|
||||||
|
background = Color(0xFF0D1014),
|
||||||
|
surface1 = Color(0xFF171B21),
|
||||||
|
surface2 = Color(0xFF20252D)
|
||||||
|
)
|
||||||
|
|
||||||
|
/** The selected style, kept in compose state so every screen recolours at once. */
|
||||||
|
object AppThemeState {
|
||||||
|
private const val PREFS = "app_theme"
|
||||||
|
private const val KEY_STYLE = "style"
|
||||||
|
|
||||||
|
var style by mutableStateOf(AppStyle.MATEWAVE)
|
||||||
|
private set
|
||||||
|
|
||||||
|
var palette by mutableStateOf(MatewavePalette)
|
||||||
|
private set
|
||||||
|
|
||||||
|
/** Reads the saved style; call once before the first frame. */
|
||||||
|
fun load(context: Context) {
|
||||||
|
val saved = context.applicationContext
|
||||||
|
.getSharedPreferences(PREFS, Context.MODE_PRIVATE)
|
||||||
|
.getString(KEY_STYLE, null)
|
||||||
|
val style = AppStyle.entries.firstOrNull { it.name == saved } ?: AppStyle.MATEWAVE
|
||||||
|
applyStyle(context, style)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun select(context: Context, style: AppStyle) {
|
||||||
|
context.applicationContext
|
||||||
|
.getSharedPreferences(PREFS, Context.MODE_PRIVATE)
|
||||||
|
.edit().putString(KEY_STYLE, style.name).apply()
|
||||||
|
applyStyle(context, style)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun applyStyle(context: Context, requested: AppStyle) {
|
||||||
|
val style = if (requested == AppStyle.DEVICE && !AppStyle.deviceSupported) AppStyle.MATEWAVE else requested
|
||||||
|
this.style = style
|
||||||
|
palette = paletteFor(context, style)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Preview colours for the style picker. */
|
||||||
|
fun paletteFor(context: Context, style: AppStyle): AppPalette = when (style) {
|
||||||
|
AppStyle.MATEWAVE -> MatewavePalette
|
||||||
|
AppStyle.LAVENDER -> LavenderPalette
|
||||||
|
AppStyle.PEACH -> PeachPalette
|
||||||
|
AppStyle.MINT -> MintPalette
|
||||||
|
AppStyle.SKY -> SkyPalette
|
||||||
|
AppStyle.DEVICE -> devicePalette(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun devicePalette(context: Context): AppPalette {
|
||||||
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) return MatewavePalette
|
||||||
|
val scheme = dynamicDarkColorScheme(context)
|
||||||
|
return AppPalette(
|
||||||
|
accent = scheme.primary,
|
||||||
|
action = scheme.tertiary,
|
||||||
|
onAccent = scheme.onPrimary,
|
||||||
|
background = scheme.background,
|
||||||
|
surface1 = scheme.surfaceContainer,
|
||||||
|
surface2 = scheme.surfaceContainerHigh
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ import androidx.compose.ui.graphics.Color
|
|||||||
import androidx.compose.ui.graphics.Shape
|
import androidx.compose.ui.graphics.Shape
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
|
||||||
val PanelFill = Surface1
|
val PanelFill: Color get() = Surface1
|
||||||
val PanelBorder = Color.White.copy(alpha = 0.06f)
|
val PanelBorder = Color.White.copy(alpha = 0.06f)
|
||||||
|
|
||||||
val UiCornerRadius = 22.dp
|
val UiCornerRadius = 22.dp
|
||||||
@@ -22,4 +22,4 @@ fun Modifier.glass(): Modifier = this
|
|||||||
|
|
||||||
val DialogScrimColor = Color.Black.copy(alpha = 0.70f)
|
val DialogScrimColor = Color.Black.copy(alpha = 0.70f)
|
||||||
|
|
||||||
val FloatingBarFill = Surface2
|
val FloatingBarFill: Color get() = Surface2
|
||||||
|
|||||||
@@ -15,35 +15,27 @@ import androidx.compose.ui.text.font.FontWeight
|
|||||||
import cc.skysparkle.matewave.R
|
import cc.skysparkle.matewave.R
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
|
|
||||||
/** Neon green: the brand accent for highlights, selected states and progress. */
|
// The interface colours follow the selected style (see AppPalette); reading them in
|
||||||
val ChessGreen = Color(0xFF35E07E)
|
// composition subscribes the screen, so a new style recolours everything at once.
|
||||||
val ChessGreenDark = Color(0xFF123D25)
|
|
||||||
|
|
||||||
/** Lime: the one colour for the main action on a screen. */
|
/** Accent: highlights, selected states and progress. Neon green in the original style. */
|
||||||
val Lime = Color(0xFFE3F84B)
|
val ChessGreen: Color get() = AppThemeState.palette.accent
|
||||||
|
|
||||||
|
/** The one colour for the main action on a screen. Lime in the original style. */
|
||||||
|
val Lime: Color get() = AppThemeState.palette.action
|
||||||
|
|
||||||
/** Text and icons on top of [ChessGreen] or [Lime]. */
|
/** Text and icons on top of [ChessGreen] or [Lime]. */
|
||||||
val OnAccent = Color(0xFF0B1610)
|
val OnAccent: Color get() = AppThemeState.palette.onAccent
|
||||||
|
|
||||||
val AppBackground = Color(0xFF0C0F0E)
|
val AppBackground: Color get() = AppThemeState.palette.background
|
||||||
val Surface1 = Color(0xFF161B19)
|
val Surface1: Color get() = AppThemeState.palette.surface1
|
||||||
val Surface2 = Color(0xFF1F2623)
|
val Surface2: Color get() = AppThemeState.palette.surface2
|
||||||
|
|
||||||
val HighlightMove = Color(0x8858A6FF)
|
val HighlightMove = Color(0x8858A6FF)
|
||||||
val HighlightCheck = Color(0x88E53935)
|
val HighlightCheck = Color(0x88E53935)
|
||||||
val HighlightLastMove = Color(0x664FC3F7)
|
val HighlightLastMove = Color(0x664FC3F7)
|
||||||
val HighlightHint = Color(0x88FFC107)
|
val HighlightHint = Color(0x88FFC107)
|
||||||
|
|
||||||
private val DarkScheme = darkColorScheme(
|
|
||||||
primary = ChessGreen,
|
|
||||||
onPrimary = OnAccent,
|
|
||||||
secondary = Lime,
|
|
||||||
onSecondary = OnAccent,
|
|
||||||
background = AppBackground,
|
|
||||||
surface = Surface1,
|
|
||||||
surfaceVariant = Surface2
|
|
||||||
)
|
|
||||||
|
|
||||||
/** Wide display face for the big headings: the brand voice of the app. */
|
/** Wide display face for the big headings: the brand voice of the app. */
|
||||||
val DisplayFont = FontFamily(
|
val DisplayFont = FontFamily(
|
||||||
Font(R.font.unbounded_semibold, FontWeight.SemiBold),
|
Font(R.font.unbounded_semibold, FontWeight.SemiBold),
|
||||||
@@ -95,7 +87,16 @@ val HeroTextStyle = TextStyle(
|
|||||||
/** The app has a single dark theme; system bars are set up in MainActivity. */
|
/** The app has a single dark theme; system bars are set up in MainActivity. */
|
||||||
@Composable
|
@Composable
|
||||||
fun MatewaveTheme(content: @Composable () -> Unit) {
|
fun MatewaveTheme(content: @Composable () -> Unit) {
|
||||||
MaterialTheme(colorScheme = DarkScheme, typography = AppTypography) {
|
val scheme = darkColorScheme(
|
||||||
|
primary = ChessGreen,
|
||||||
|
onPrimary = OnAccent,
|
||||||
|
secondary = Lime,
|
||||||
|
onSecondary = OnAccent,
|
||||||
|
background = AppBackground,
|
||||||
|
surface = Surface1,
|
||||||
|
surfaceVariant = Surface2
|
||||||
|
)
|
||||||
|
MaterialTheme(colorScheme = scheme, typography = AppTypography) {
|
||||||
// Text and icons without their own colour are light, so nothing turns black on the dark background
|
// Text and icons without their own colour are light, so nothing turns black on the dark background
|
||||||
CompositionLocalProvider(LocalContentColor provides Color.White, content = content)
|
CompositionLocalProvider(LocalContentColor provides Color.White, content = content)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,8 +113,16 @@
|
|||||||
<string name="rating_gate_text">Die Wertung wird gebraucht, um einen passenden Gegner zu wählen und dich anderen Spielern zu zeigen. Es dauert nur ein paar Sekunden.</string>
|
<string name="rating_gate_text">Die Wertung wird gebraucht, um einen passenden Gegner zu wählen und dich anderen Spielern zu zeigen. Es dauert nur ein paar Sekunden.</string>
|
||||||
<string name="rating_gate_open">Niveau angeben</string>
|
<string name="rating_gate_open">Niveau angeben</string>
|
||||||
<string name="about_section">Über die App</string>
|
<string name="about_section">Über die App</string>
|
||||||
<string name="appearance_title">Aussehen des Bretts</string>
|
<string name="appearance_title">Darstellung</string>
|
||||||
<string name="appearance_subtitle">Brettfarben, Koordinaten, Figurenstil</string>
|
<string name="appearance_subtitle">App-Farben, Brett, Figuren</string>
|
||||||
|
<string name="app_style_title">App-Farben</string>
|
||||||
|
<string name="app_style_matewave">Matewave</string>
|
||||||
|
<string name="app_style_lavender">Lavendel</string>
|
||||||
|
<string name="app_style_peach">Pfirsich</string>
|
||||||
|
<string name="app_style_mint">Minze</string>
|
||||||
|
<string name="app_style_sky">Himmel</string>
|
||||||
|
<string name="app_style_device">Gerät</string>
|
||||||
|
<string name="app_style_device_hint">Die Farben kommen aus deinem Hintergrundbild (Material You) und ändern sich mit ihm.</string>
|
||||||
<string name="appearance_board_theme">Brettfarben</string>
|
<string name="appearance_board_theme">Brettfarben</string>
|
||||||
<string name="appearance_coordinates">Buchstaben und Zahlen auf dem Brett</string>
|
<string name="appearance_coordinates">Buchstaben und Zahlen auf dem Brett</string>
|
||||||
<string name="appearance_coordinates_hint">Feldbeschriftung an den Rändern: a–h und 1–8</string>
|
<string name="appearance_coordinates_hint">Feldbeschriftung an den Rändern: a–h und 1–8</string>
|
||||||
|
|||||||
@@ -113,8 +113,16 @@
|
|||||||
<string name="rating_gate_text">レーティングは、適切な相手の選択と他のプレイヤーへの表示に必要です。数秒で完了します。</string>
|
<string name="rating_gate_text">レーティングは、適切な相手の選択と他のプレイヤーへの表示に必要です。数秒で完了します。</string>
|
||||||
<string name="rating_gate_open">レベルを指定</string>
|
<string name="rating_gate_open">レベルを指定</string>
|
||||||
<string name="about_section">このアプリについて</string>
|
<string name="about_section">このアプリについて</string>
|
||||||
<string name="appearance_title">盤の見た目</string>
|
<string name="appearance_title">外観</string>
|
||||||
<string name="appearance_subtitle">盤の色、座標、駒のスタイル</string>
|
<string name="appearance_subtitle">アプリの色、盤、駒</string>
|
||||||
|
<string name="app_style_title">アプリの色</string>
|
||||||
|
<string name="app_style_matewave">Matewave</string>
|
||||||
|
<string name="app_style_lavender">ラベンダー</string>
|
||||||
|
<string name="app_style_peach">ピーチ</string>
|
||||||
|
<string name="app_style_mint">ミント</string>
|
||||||
|
<string name="app_style_sky">スカイ</string>
|
||||||
|
<string name="app_style_device">端末</string>
|
||||||
|
<string name="app_style_device_hint">色は壁紙から取得され(Material You)、壁紙に合わせて変わります。</string>
|
||||||
<string name="appearance_board_theme">盤の色</string>
|
<string name="appearance_board_theme">盤の色</string>
|
||||||
<string name="appearance_coordinates">盤上の文字と数字</string>
|
<string name="appearance_coordinates">盤上の文字と数字</string>
|
||||||
<string name="appearance_coordinates_hint">盤の端のマス目ラベル: a〜h と 1〜8</string>
|
<string name="appearance_coordinates_hint">盤の端のマス目ラベル: a〜h と 1〜8</string>
|
||||||
|
|||||||
@@ -113,8 +113,16 @@
|
|||||||
<string name="rating_gate_text">Reitingas reikalingas tinkamam varžovui parinkti ir kitiems žaidėjams jus parodyti. Tai užtrunka porą sekundžių.</string>
|
<string name="rating_gate_text">Reitingas reikalingas tinkamam varžovui parinkti ir kitiems žaidėjams jus parodyti. Tai užtrunka porą sekundžių.</string>
|
||||||
<string name="rating_gate_open">Nurodyti lygį</string>
|
<string name="rating_gate_open">Nurodyti lygį</string>
|
||||||
<string name="about_section">Apie programą</string>
|
<string name="about_section">Apie programą</string>
|
||||||
<string name="appearance_title">Lentos išvaizda</string>
|
<string name="appearance_title">Išvaizda</string>
|
||||||
<string name="appearance_subtitle">Lentos spalvos, koordinatės, figūrų stilius</string>
|
<string name="appearance_subtitle">Programėlės spalvos, lenta, figūros</string>
|
||||||
|
<string name="app_style_title">Programėlės spalvos</string>
|
||||||
|
<string name="app_style_matewave">Matewave</string>
|
||||||
|
<string name="app_style_lavender">Levanda</string>
|
||||||
|
<string name="app_style_peach">Persikas</string>
|
||||||
|
<string name="app_style_mint">Mėta</string>
|
||||||
|
<string name="app_style_sky">Dangus</string>
|
||||||
|
<string name="app_style_device">Įrenginys</string>
|
||||||
|
<string name="app_style_device_hint">Spalvos paimamos iš ekrano fono („Material You“) ir keičiasi kartu su juo.</string>
|
||||||
<string name="appearance_board_theme">Lentos spalvos</string>
|
<string name="appearance_board_theme">Lentos spalvos</string>
|
||||||
<string name="appearance_coordinates">Raidės ir skaičiai ant lentos</string>
|
<string name="appearance_coordinates">Raidės ir skaičiai ant lentos</string>
|
||||||
<string name="appearance_coordinates_hint">Langelių žymos pakraščiuose: a–h ir 1–8</string>
|
<string name="appearance_coordinates_hint">Langelių žymos pakraščiuose: a–h ir 1–8</string>
|
||||||
|
|||||||
@@ -118,8 +118,16 @@
|
|||||||
<string name="rating_gate_text">Рейтинг нужен, чтобы подобрать сложность соперника и показать вас другим игрокам. Это займёт пару секунд.</string>
|
<string name="rating_gate_text">Рейтинг нужен, чтобы подобрать сложность соперника и показать вас другим игрокам. Это займёт пару секунд.</string>
|
||||||
<string name="rating_gate_open">Указать уровень</string>
|
<string name="rating_gate_open">Указать уровень</string>
|
||||||
<string name="about_section">О программе</string>
|
<string name="about_section">О программе</string>
|
||||||
<string name="appearance_title">Внешний вид доски</string>
|
<string name="appearance_title">Оформление</string>
|
||||||
<string name="appearance_subtitle">Цвета доски, координаты, вид фигур</string>
|
<string name="appearance_subtitle">Цвета приложения, доска, фигуры</string>
|
||||||
|
<string name="app_style_title">Цвета приложения</string>
|
||||||
|
<string name="app_style_matewave">Matewave</string>
|
||||||
|
<string name="app_style_lavender">Лаванда</string>
|
||||||
|
<string name="app_style_peach">Персик</string>
|
||||||
|
<string name="app_style_mint">Мята</string>
|
||||||
|
<string name="app_style_sky">Небо</string>
|
||||||
|
<string name="app_style_device">Устройство</string>
|
||||||
|
<string name="app_style_device_hint">Цвета берутся из обоев (Material You) и меняются вместе с ними.</string>
|
||||||
<string name="appearance_board_theme">Цвета доски</string>
|
<string name="appearance_board_theme">Цвета доски</string>
|
||||||
<string name="appearance_coordinates">Буквы и цифры на доске</string>
|
<string name="appearance_coordinates">Буквы и цифры на доске</string>
|
||||||
<string name="appearance_coordinates_hint">Подписи полей по краям: a–h и 1–8</string>
|
<string name="appearance_coordinates_hint">Подписи полей по краям: a–h и 1–8</string>
|
||||||
|
|||||||
@@ -113,8 +113,16 @@
|
|||||||
<string name="rating_gate_text">需要等级分来匹配合适的对手,并向其他玩家展示你。只需几秒钟。</string>
|
<string name="rating_gate_text">需要等级分来匹配合适的对手,并向其他玩家展示你。只需几秒钟。</string>
|
||||||
<string name="rating_gate_open">设置水平</string>
|
<string name="rating_gate_open">设置水平</string>
|
||||||
<string name="about_section">关于</string>
|
<string name="about_section">关于</string>
|
||||||
<string name="appearance_title">棋盘外观</string>
|
<string name="appearance_title">外观</string>
|
||||||
<string name="appearance_subtitle">棋盘颜色、坐标、棋子样式</string>
|
<string name="appearance_subtitle">应用配色、棋盘、棋子</string>
|
||||||
|
<string name="app_style_title">应用配色</string>
|
||||||
|
<string name="app_style_matewave">Matewave</string>
|
||||||
|
<string name="app_style_lavender">薰衣草</string>
|
||||||
|
<string name="app_style_peach">蜜桃</string>
|
||||||
|
<string name="app_style_mint">薄荷</string>
|
||||||
|
<string name="app_style_sky">天空</string>
|
||||||
|
<string name="app_style_device">设备</string>
|
||||||
|
<string name="app_style_device_hint">颜色取自壁纸(Material You),并随壁纸变化。</string>
|
||||||
<string name="appearance_board_theme">棋盘颜色</string>
|
<string name="appearance_board_theme">棋盘颜色</string>
|
||||||
<string name="appearance_coordinates">棋盘上的字母和数字</string>
|
<string name="appearance_coordinates">棋盘上的字母和数字</string>
|
||||||
<string name="appearance_coordinates_hint">边缘的格子标注:a–h 和 1–8</string>
|
<string name="appearance_coordinates_hint">边缘的格子标注:a–h 和 1–8</string>
|
||||||
|
|||||||
@@ -113,8 +113,16 @@
|
|||||||
<string name="rating_gate_text">Your rating is needed to pick a suitable opponent and to show you to other players. It takes a couple of seconds.</string>
|
<string name="rating_gate_text">Your rating is needed to pick a suitable opponent and to show you to other players. It takes a couple of seconds.</string>
|
||||||
<string name="rating_gate_open">Set level</string>
|
<string name="rating_gate_open">Set level</string>
|
||||||
<string name="about_section">About</string>
|
<string name="about_section">About</string>
|
||||||
<string name="appearance_title">Board appearance</string>
|
<string name="appearance_title">Appearance</string>
|
||||||
<string name="appearance_subtitle">Board colors, coordinates, piece style</string>
|
<string name="appearance_subtitle">App colors, board, pieces</string>
|
||||||
|
<string name="app_style_title">App colors</string>
|
||||||
|
<string name="app_style_matewave">Matewave</string>
|
||||||
|
<string name="app_style_lavender">Lavender</string>
|
||||||
|
<string name="app_style_peach">Peach</string>
|
||||||
|
<string name="app_style_mint">Mint</string>
|
||||||
|
<string name="app_style_sky">Sky</string>
|
||||||
|
<string name="app_style_device">Device</string>
|
||||||
|
<string name="app_style_device_hint">Colors are taken from your wallpaper (Material You) and change with it.</string>
|
||||||
<string name="appearance_board_theme">Board colors</string>
|
<string name="appearance_board_theme">Board colors</string>
|
||||||
<string name="appearance_coordinates">Letters and numbers on the board</string>
|
<string name="appearance_coordinates">Letters and numbers on the board</string>
|
||||||
<string name="appearance_coordinates_hint">Square labels along the edges: a–h and 1–8</string>
|
<string name="appearance_coordinates_hint">Square labels along the edges: a–h and 1–8</string>
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
• Darstellung: App-Farben wählbar — Matewave, die Pastelltöne Lavendel, Pfirsich, Minze und Himmel oder Gerätefarben aus dem Hintergrundbild (Material You, Android 12+)
|
||||||
|
• Die Wertung auf dem Startbildschirm öffnet keine Statistik mehr
|
||||||
|
• Die Beschriftungen von Remis- und Aufgabe-Schaltfläche werden nicht mehr abgeschnitten
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
• Appearance: choose the app colors — Matewave, pastel Lavender, Peach, Mint and Sky, or Device colors from your wallpaper (Material You, Android 12+)
|
||||||
|
• The rating on the home screen no longer opens statistics
|
||||||
|
• Labels on the draw and resign buttons are no longer cut off
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
• 外観:アプリの色を選択可能に — Matewave、パステルのラベンダー・ピーチ・ミント・スカイ、または壁紙から取得する端末の色(Material You、Android 12 以降)
|
||||||
|
• ホーム画面のレーティングをタップしても統計が開かなくなりました
|
||||||
|
• 引き分け・投了ボタンの文字が切れにくくなりました
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
• Išvaizda: galima pasirinkti programėlės spalvas — Matewave, pastelines Levandą, Persiką, Mėtą ir Dangų arba įrenginio spalvas iš ekrano fono („Material You“, Android 12+)
|
||||||
|
• Reitingas pagrindiniame ekrane nebeatidaro statistikos
|
||||||
|
• Lygiųjų ir pasidavimo mygtukų užrašai nebenukerpami
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
• Оформление: выбор цветов приложения — Matewave, пастельные Лаванда, Персик, Мята и Небо или цвета устройства из обоев (Material You, Android 12+)
|
||||||
|
• Рейтинг на главном экране больше не открывает статистику
|
||||||
|
• Подписи на кнопках ничьей и сдачи больше не обрезаются
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
• 外观:可选择应用配色 — Matewave、柔和的薰衣草、蜜桃、薄荷和天空,或取自壁纸的设备颜色(Material You,Android 12 及以上)
|
||||||
|
• 点击主页上的等级分不再打开统计
|
||||||
|
• 提议和棋与认输按钮的文字不再被截断
|
||||||
Reference in New Issue
Block a user