9 Commits
Author SHA1 Message Date
kalarina 34e02314fd Changelog 1.0.52: the support card is only in Settings 2026-11-18 21:35:43 +02:00
kalarina 95f638a373 Remove Gitea templates and links
The project lives on GitHub: drop the .gitea issue templates, the Gitea
option in the bug report template and the Gitea links in old changelogs.
2026-11-18 21:29:50 +02:00
kalarina 7a4d300220 Remove the duplicate donation link from the About dialog 2026-11-18 18:06:42 +02:00
kalarina eae878db09 Use a heart instead of the logo on the support plaque 2026-11-18 17:59:19 +02:00
kalarina c5587e9418 Support landscape and tablets
Remove the portrait lock: Android 16 ignores it on large screens anyway.
Board screens (game, puzzle, opening trainer, spectator) put the board on
the left and the players, moves and buttons on the right in landscape.
Rotation no longer recreates the activity, so games and connections keep
their state, and content stays clear of the cutout and side navigation bar.
2026-11-17 21:09:52 +02:00
kalarina 438f06bce2 Add a first-launch guide
New users get a short swipeable tour on first launch; people who used the
app before are not shown it. It can be opened again from Settings.
2026-11-17 20:55:13 +02:00
kalarina 21b39cbc80 Bump version to 1.0.52 2026-11-17 20:33:29 +02:00
kalarina 05d4936c90 Add donation card and move repository links to GitHub 2026-11-17 09:41:25 +02:00
kalarina 8a40e86d73 README: point Obtainium link to GitHub 2026-11-14 19:23:24 +02:00
43 changed files with 839 additions and 244 deletions
-27
View File
@@ -1,27 +0,0 @@
---
name: Bug report
about: Something doesn't work as expected
title: "[Bug] "
---
**What happened**
**Steps to reproduce**
1.
2.
3.
**What you expected**
**Environment**
- App version:
- Installed from: Gitea / F-Droid
- Device and Android version:
- Mode: vs AI / puzzles / openings / Bluetooth / LAN
**Screenshots or logs** (optional)
-18
View File
@@ -1,18 +0,0 @@
---
name: Feature request
about: Suggest an idea that fits the app
title: "[Feature] "
---
<!-- Please check the "Out of scope" list in CONTRIBUTING.md before opening this. -->
**What problem does this solve**
**Proposed solution**
**Alternatives you considered**
- [ ] I'd like to implement this myself
@@ -1,10 +0,0 @@
---
name: Puzzle or opening issue
about: Report a wrong puzzle solution or opening line
title: "[Content] "
---
- Puzzle or opening name:
- Position (describe or attach a screenshot):
- What the app expects:
- What you think is correct, and why:
-12
View File
@@ -1,12 +0,0 @@
---
name: Translation fix
about: Report a wrong or awkward translation
title: "[Translation] "
---
<!-- Supported languages: English, Russian, German, Japanese, Lithuanian, Chinese. New languages are not accepted. -->
- Language:
- Screen or place in the app:
- Current text:
- Suggested text:
-17
View File
@@ -1,17 +0,0 @@
## What does this change
## Related issue
Closes #
## Checklist
- [ ] Discussed in an issue first (not needed for small fixes)
- [ ] `./gradlew assembleDebug` and `./gradlew testDebugUnitTest` pass
- [ ] Tested on a device or emulator (Android version: )
- [ ] Multiplayer changes tested on two physical devices
- [ ] No ads, analytics, trackers or Google Play Services / Firebase dependencies
- [ ] New strings added to `values/strings.xml` (missing translations noted below)
- [ ] Screenshots added for UI changes
- [ ] I agree that my contribution is licensed under GPL-3.0-or-later
+1
View File
@@ -0,0 +1 @@
ko_fi: skysparkle
+1 -1
View File
@@ -19,7 +19,7 @@ title: "[Bug] "
**Environment** **Environment**
- App version: - App version:
- Installed from: Gitea / GitHub / F-Droid / Google Play - Installed from: GitHub / F-Droid / Google Play
- Device and Android version: - Device and Android version:
- Mode: vs AI / puzzles / openings / Bluetooth / LAN - Mode: vs AI / puzzles / openings / Bluetooth / LAN
+3 -3
View File
@@ -1,5 +1,5 @@
blank_issues_enabled: true blank_issues_enabled: true
contact_links: contact_links:
- name: Main repository on git.skysparkle.cc - name: Support the project on Ko-fi
url: https://git.skysparkle.cc/kalarina/Matewave url: https://ko-fi.com/skysparkle
about: This GitHub repository is a mirror. Issues are welcome here and on Gitea. about: Donations keep the apps and the Skysparkle server running.
+1 -1
View File
@@ -4,7 +4,7 @@ Thanks for wanting to help! This guide explains where to contribute, what fits t
## Where to contribute ## Where to contribute
Issues and pull requests go to the repository on [Gitea](https://git.skysparkle.cc/kalarina/Matewave). Issues and pull requests go to the repository on [GitHub](https://github.com/kalarina-bit/Matewave).
## Ways to help ## Ways to help
+15 -6
View File
@@ -9,8 +9,12 @@
Play against the AI, solve puzzles, learn openings, or play friends nearby over Bluetooth and Wi-Fi/LAN. Play against the AI, solve puzzles, learn openings, or play friends nearby over Bluetooth and Wi-Fi/LAN.
</p> </p>
<p align="center">
<a href="https://ko-fi.com/skysparkle"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support me on Ko-fi"></a>
</p>
> [!IMPORTANT] > [!IMPORTANT]
> **Matewave is coming to Google Play!** The app is now in closed testing there ahead of the public release. Ideas, wishes and suggestions for improvement are very welcome — send them wherever is easiest for you: an issue on [Gitea](https://git.skysparkle.cc/kalarina/Matewave/issues) or [GitHub](https://github.com/kalarina-bit/Matewave/issues), or an email to [cuken107@proton.me](mailto:cuken107@proton.me). > **Matewave is coming to Google Play!** The app is now in closed testing there ahead of the public release. Ideas, wishes and suggestions for improvement are very welcome — send them wherever is easiest for you: an [issue on GitHub](https://github.com/kalarina-bit/Matewave/issues), or an email to [cuken107@proton.me](mailto:cuken107@proton.me).
> [!NOTE] > [!NOTE]
> **Looking for designers!** Matewave is looking for volunteer designers to help with icons, logos, animations, cover art (store graphics) and UI design. This is unpaid help for an open-source project. If you're interested, write to [cuken107@proton.me](mailto:cuken107@proton.me). > **Looking for designers!** Matewave is looking for volunteer designers to help with icons, logos, animations, cover art (store graphics) and UI design. This is unpaid help for an open-source project. If you're interested, write to [cuken107@proton.me](mailto:cuken107@proton.me).
@@ -21,9 +25,8 @@
<p align="center"> <p align="center">
<a href="https://f-droid.org/packages/cc.skysparkle.matewave/"><img src="assets/get-it-on%20(1).png" height="56" alt="Get it on F-Droid"></a> <a href="https://f-droid.org/packages/cc.skysparkle.matewave/"><img src="assets/get-it-on%20(1).png" height="56" alt="Get it on F-Droid"></a>
<a href="https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://git.skysparkle.cc/kalarina/Matewave"><img src="assets/badge_obtainium.png" height="56" alt="Get it on Obtainium"></a> <a href="https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://github.com/kalarina-bit/Matewave"><img src="assets/badge_obtainium.png" height="56" alt="Get it on Obtainium"></a>
<a href="https://github.com/kalarina-bit/Matewave/releases/latest"><img src="assets/get-it-on-github.png" height="56" alt="Get it on GitHub"></a> <a href="https://github.com/kalarina-bit/Matewave/releases/latest"><img src="assets/get-it-on-github.png" height="56" alt="Get it on GitHub"></a>
<a href="https://git.skysparkle.cc/kalarina/Matewave/releases"><img src="assets/get-it-on-gitea.png" height="56" alt="Get it on Gitea"></a>
</p> </p>
<p align="center"> <p align="center">
@@ -50,8 +53,8 @@
## <img src="assets/icon-install.png" width="32" alt=""> Installation ## <img src="assets/icon-install.png" width="32" alt=""> Installation
- **[F-Droid](https://f-droid.org/packages/cc.skysparkle.matewave/)** — install and update through the F-Droid client. - **[F-Droid](https://f-droid.org/packages/cc.skysparkle.matewave/)** — install and update through the F-Droid client.
- **[Obtainium](https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://git.skysparkle.cc/kalarina/Matewave)** — installs the APK straight from Gitea releases and keeps it up to date. - **[Obtainium](https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://github.com/kalarina-bit/Matewave)** — installs the APK straight from GitHub releases and keeps it up to date.
- **Manually** — download the latest APK from [GitHub](https://github.com/kalarina-bit/Matewave/releases/latest) or [Gitea](https://git.skysparkle.cc/kalarina/Matewave/releases), allow installs from unknown sources for the app you open it with (Settings → Apps → Special access → Install unknown apps), then open the `.apk` and confirm. - **Manually** — download the latest APK from [GitHub Releases](https://github.com/kalarina-bit/Matewave/releases/latest), allow installs from unknown sources for the app you open it with (Settings → Apps → Special access → Install unknown apps), then open the `.apk` and confirm.
## <img src="assets/icon-verify.png" width="32" alt=""> Verifying a download ## <img src="assets/icon-verify.png" width="32" alt=""> Verifying a download
@@ -82,7 +85,13 @@ Nearby multiplayer needs two physical devices — the emulator has no real Bluet
## 🤝 Contributing ## 🤝 Contributing
Bug reports, puzzle and opening fixes, translation fixes and pull requests are welcome in the [issue tracker](https://git.skysparkle.cc/kalarina/Matewave/issues). Please read [CONTRIBUTING.md](CONTRIBUTING.md) first — it explains what fits the project and how to send changes. To open an issue or a pull request, [create an account](https://git.skysparkle.cc/user/sign_up) on this Gitea. Bug reports, puzzle and opening fixes, translation fixes and pull requests are welcome in the [issue tracker](https://github.com/kalarina-bit/Matewave/issues). Please read [CONTRIBUTING.md](CONTRIBUTING.md) first — it explains what fits the project and how to send changes.
## ☕ Support
Matewave is free, open source and has no ads. If it is useful to you, you can support the project on [Ko-fi](https://ko-fi.com/skysparkle) — donations pay for the Skysparkle server and the time spent on the apps.
<a href="https://ko-fi.com/skysparkle"><img src="https://ko-fi.com/img/githubbutton_sm.svg" alt="Support me on Ko-fi"></a>
## 📄 License ## 📄 License
+2 -2
View File
@@ -12,8 +12,8 @@ android {
applicationId = "cc.skysparkle.matewave" applicationId = "cc.skysparkle.matewave"
minSdk = 26 minSdk = 26
targetSdk = 36 targetSdk = 36
versionCode = 11 versionCode = 12
versionName = "1.0.51" versionName = "1.0.52"
} }
buildTypes { buildTypes {
+1 -1
View File
@@ -45,7 +45,7 @@
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
android:launchMode="singleTop" android:launchMode="singleTop"
android:screenOrientation="portrait"> android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
@@ -121,9 +121,12 @@ private fun AppNavHost() {
onDispose { PresenceHub.release(context) } onDispose { PresenceHub.release(context) }
} }
// New players start with the guide; everyone else goes straight to the menu
val startRoute = remember { if (cc.skysparkle.matewave.ui.screens.Onboarding.needed(context)) "onboarding" else "menu" }
NavHost( NavHost(
navController = navController, navController = navController,
startDestination = "menu", startDestination = startRoute,
enterTransition = { enterTransition = {
if (isTabSwitch(initialState.destination.route, targetState.destination.route)) fadeThroughIn() if (isTabSwitch(initialState.destination.route, targetState.destination.route)) fadeThroughIn()
else sharedAxisIn(forward = true) else sharedAxisIn(forward = true)
@@ -141,6 +144,22 @@ private fun AppNavHost() {
else sharedAxisOut(forward = false) else sharedAxisOut(forward = false)
} }
) { ) {
composable("onboarding") {
cc.skysparkle.matewave.ui.screens.OnboardingScreen(
replay = false,
onDone = {
navController.navigate("menu") { popUpTo("onboarding") { inclusive = true } }
}
)
}
composable("guide") {
cc.skysparkle.matewave.ui.screens.OnboardingScreen(
replay = true,
onDone = { navController.popBackStack() }
)
}
composable("menu") { composable("menu") {
MainMenuScreen( MainMenuScreen(
viewModel = viewModel, viewModel = viewModel,
@@ -194,7 +213,8 @@ private fun AppNavHost() {
onOpenPermissions = { navController.navigate("permissions") }, onOpenPermissions = { navController.navigate("permissions") },
onOpenAppearance = { navController.navigate("appearance") }, onOpenAppearance = { navController.navigate("appearance") },
onOpenLicenses = { navController.navigate("licenses") }, onOpenLicenses = { navController.navigate("licenses") },
onOpenShare = { navController.navigate("shareApk") } onOpenShare = { navController.navigate("shareApk") },
onOpenGuide = { navController.navigate("guide") }
) )
} }
@@ -6,8 +6,9 @@ import android.net.Uri
/** External links of the app, kept in one place. */ /** External links of the app, kept in one place. */
object AppLinks { object AppLinks {
const val REPOSITORY = "https://git.skysparkle.cc/kalarina/Matewave" const val REPOSITORY = "https://github.com/kalarina-bit/Matewave"
const val REPOSITORY_LABEL = "git.skysparkle.cc/kalarina/Matewave" const val REPOSITORY_LABEL = "github.com/kalarina-bit/Matewave"
const val DONATE = "https://ko-fi.com/skysparkle"
const val PRIVACY_POLICY = "https://skysparkle.cc/privacy?lang=en" const val PRIVACY_POLICY = "https://skysparkle.cc/privacy?lang=en"
/** Opens a link in the browser; does nothing if no app can open it. */ /** Opens a link in the browser; does nothing if no app can open it. */
@@ -53,19 +53,41 @@ import cc.skysparkle.matewave.ui.theme.GlassShape
import cc.skysparkle.matewave.ui.theme.PanelBorder import cc.skysparkle.matewave.ui.theme.PanelBorder
import cc.skysparkle.matewave.ui.theme.TabletMaxContentWidth import cc.skysparkle.matewave.ui.theme.TabletMaxContentWidth
import cc.skysparkle.matewave.ui.theme.glass import cc.skysparkle.matewave.ui.theme.glass
import androidx.compose.foundation.layout.BoxWithConstraints
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.WindowInsetsSides
import androidx.compose.foundation.layout.displayCutout
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.only
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.union
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.runtime.ReadOnlyComposable
import androidx.compose.ui.platform.LocalConfiguration
import androidx.compose.ui.unit.min
import cc.skysparkle.matewave.ui.theme.LandscapeMaxContentWidth
/** Landscape: a phone on its side or a tablet held wide. Board screens then put the board on the left. */
@Composable
@ReadOnlyComposable
fun isLandscape(): Boolean {
val config = LocalConfiguration.current
return config.screenWidthDp > config.screenHeightDp
}
/** Side insets in landscape: the camera cutout and a 3-button navigation bar sit on the left or right. */
@Composable
fun Modifier.horizontalSafePadding(): Modifier =
windowInsetsPadding(WindowInsets.displayCutout.union(WindowInsets.navigationBars).only(WindowInsetsSides.Horizontal))
@Composable @Composable
fun GlassScaffold( private fun ScaffoldTopBar(
title: String, title: String,
onBack: (() -> Unit)? = null, onBack: (() -> Unit)?,
actions: @Composable RowScope.() -> Unit = {}, actions: @Composable RowScope.() -> Unit,
bottomBar: (@Composable () -> Unit)? = null, titleContent: (@Composable RowScope.() -> Unit)?
/** Replaces the plain title, e.g. with the opening name and its status badge. */
titleContent: (@Composable RowScope.() -> Unit)? = null,
content: @Composable ColumnScope.() -> Unit
) { ) {
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.TopCenter) {
Column(modifier = Modifier.fillMaxSize().widthIn(max = TabletMaxContentWidth)) {
Row( Row(
modifier = Modifier.fillMaxWidth().statusBarsPadding().padding(start = 4.dp, end = 4.dp, top = 8.dp, bottom = 8.dp), modifier = Modifier.fillMaxWidth().statusBarsPadding().padding(start = 4.dp, end = 4.dp, top = 8.dp, bottom = 8.dp),
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
@@ -96,6 +118,21 @@ fun GlassScaffold(
} }
actions() actions()
} }
}
@Composable
fun GlassScaffold(
title: String,
onBack: (() -> Unit)? = null,
actions: @Composable RowScope.() -> Unit = {},
bottomBar: (@Composable () -> Unit)? = null,
/** Replaces the plain title, e.g. with the opening name and its status badge. */
titleContent: (@Composable RowScope.() -> Unit)? = null,
content: @Composable ColumnScope.() -> Unit
) {
Box(modifier = Modifier.fillMaxSize().horizontalSafePadding(), contentAlignment = Alignment.TopCenter) {
Column(modifier = Modifier.fillMaxSize().widthIn(max = TabletMaxContentWidth)) {
ScaffoldTopBar(title, onBack, actions, titleContent)
val scrollState = rememberScrollState() val scrollState = rememberScrollState()
@@ -120,6 +157,65 @@ fun GlassScaffold(
} }
} }
/**
* A screen with a chess board. Portrait: [above], the board and [below] in one scrolling column,
* as before. Landscape: the board on the left as large as the height allows, [above] and [below]
* in a scrolling column on the right. [board] gets the modifier that sizes it.
*/
@Composable
fun BoardScaffold(
title: String,
onBack: (() -> Unit)? = null,
actions: @Composable RowScope.() -> Unit = {},
titleContent: (@Composable RowScope.() -> Unit)? = null,
above: @Composable ColumnScope.() -> Unit = {},
board: (@Composable (Modifier) -> Unit)?,
below: @Composable ColumnScope.() -> Unit = {}
) {
if (!isLandscape()) {
GlassScaffold(title = title, onBack = onBack, actions = actions, titleContent = titleContent) {
above()
if (board != null) {
Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) { board(Modifier) }
}
below()
}
return
}
Box(modifier = Modifier.fillMaxSize().horizontalSafePadding(), contentAlignment = Alignment.TopCenter) {
Column(modifier = Modifier.fillMaxSize().widthIn(max = LandscapeMaxContentWidth)) {
ScaffoldTopBar(title, onBack, actions, titleContent)
Row(
modifier = Modifier
.fillMaxWidth()
.weight(1f)
.navigationBarsPadding()
.padding(start = 16.dp, end = 16.dp, bottom = 12.dp),
horizontalArrangement = Arrangement.spacedBy(20.dp)
) {
if (board != null) {
BoxWithConstraints(
modifier = Modifier.weight(1f).fillMaxHeight(),
contentAlignment = Alignment.Center
) {
board(Modifier.size(min(maxWidth, maxHeight)))
}
}
Column(
modifier = Modifier
.weight(1f)
.fillMaxHeight()
.verticalScroll(rememberScrollState()),
verticalArrangement = Arrangement.spacedBy(14.dp)
) {
above()
below()
}
}
}
}
}
@Composable @Composable
private fun Modifier.pressScale(interactionSource: MutableInteractionSource): Modifier { private fun Modifier.pressScale(interactionSource: MutableInteractionSource): Modifier {
val pressed by interactionSource.collectIsPressedAsState() val pressed by interactionSource.collectIsPressedAsState()
@@ -102,7 +102,14 @@ fun GameScreen(viewModel: GameViewModel, onExit: () -> Unit) {
else -> null else -> null
} }
GlassScaffold( val material = remember(state.board) { cc.skysparkle.matewave.engine.Material.balance(state.board) }
val bottomColor = state.myColor
val topColor = if (bottomColor == PieceColor.WHITE) PieceColor.BLACK else PieceColor.WHITE
val kingInCheckSquare = remember(state.board) { ChessEngine.checkedKingSquare(state.board) }
// Portrait: opponent, board, you and the controls one under another.
// Landscape: the board on the left, players and controls on the right.
cc.skysparkle.matewave.ui.components.BoardScaffold(
title = "", title = "",
onBack = requestExit, onBack = requestExit,
actions = { actions = {
@@ -112,19 +119,15 @@ fun GameScreen(viewModel: GameViewModel, onExit: () -> Unit) {
}, },
titleContent = if (showOpening && opening != null) { titleContent = if (showOpening && opening != null) {
{ OpeningTitle("${opening.eco} · ${opening.name}", bookStatus, inBook) } { OpeningTitle("${opening.eco} · ${opening.name}", bookStatus, inBook) }
} else null } else null,
) { above = {
if (state.mode == GameMode.VS_PLAYER_NETWORK) ConnectionBanner(state) if (state.mode == GameMode.VS_PLAYER_NETWORK) ConnectionBanner(state)
TrustBanners(state) TrustBanners(state)
val material = remember(state.board) { cc.skysparkle.matewave.engine.Material.balance(state.board) }
val bottomColor = state.myColor
val topColor = if (bottomColor == PieceColor.WHITE) PieceColor.BLACK else PieceColor.WHITE
val kingInCheckSquare = remember(state.board) { ChessEngine.checkedKingSquare(state.board) }
PlayerRow(state, topColor, isMe = false, material = material, clock = viewModel.clockState) PlayerRow(state, topColor, isMe = false, material = material, clock = viewModel.clockState)
},
board = { boardModifier ->
ChessBoardView( ChessBoardView(
modifier = boardModifier,
board = state.board, board = state.board,
selectedSquare = state.selectedSquare, selectedSquare = state.selectedSquare,
legalTargets = state.legalTargetsFromSelected, legalTargets = state.legalTargetsFromSelected,
@@ -137,7 +140,8 @@ fun GameScreen(viewModel: GameViewModel, onExit: () -> Unit) {
(state.connectionState == ConnectionState.CONNECTED && (state.connectionState == ConnectionState.CONNECTED &&
state.handshake == cc.skysparkle.matewave.viewmodel.HandshakeState.PLAYING)) state.handshake == cc.skysparkle.matewave.viewmodel.HandshakeState.PLAYING))
) )
}
) {
PlayerRow(state, bottomColor, isMe = true, material = material, clock = viewModel.clockState) PlayerRow(state, bottomColor, isMe = true, material = material, clock = viewModel.clockState)
// The move ribbon: only moves here, the opening name lives in the top bar. // The move ribbon: only moves here, the opening name lives in the top bar.
@@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import cc.skysparkle.matewave.ui.components.horizontalSafePadding
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.navigationBarsPadding
@@ -98,7 +99,7 @@ fun MainMenuScreen(
var showRatingGate by remember { mutableStateOf(false) } var showRatingGate by remember { mutableStateOf(false) }
var showStats by remember { mutableStateOf(false) } var showStats by remember { mutableStateOf(false) }
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.TopCenter) { Box(modifier = Modifier.fillMaxSize().horizontalSafePadding(), contentAlignment = Alignment.TopCenter) {
Column(modifier = Modifier.fillMaxSize().widthIn(max = TabletMaxContentWidth)) { Column(modifier = Modifier.fillMaxSize().widthIn(max = TabletMaxContentWidth)) {
Row( Row(
modifier = Modifier modifier = Modifier
@@ -0,0 +1,365 @@
package cc.skysparkle.matewave.ui.screens
import android.content.Context
import androidx.activity.compose.BackHandler
import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import cc.skysparkle.matewave.R
import cc.skysparkle.matewave.data.ProfileStore
import cc.skysparkle.matewave.network.Transports
import cc.skysparkle.matewave.ui.components.AppIcon
import cc.skysparkle.matewave.ui.components.GlassButton
import cc.skysparkle.matewave.ui.components.horizontalSafePadding
import cc.skysparkle.matewave.ui.theme.ChessGreen
import cc.skysparkle.matewave.ui.theme.PanelBorder
import cc.skysparkle.matewave.ui.theme.Surface2
import cc.skysparkle.matewave.ui.theme.TabletMaxContentWidth
import cc.skysparkle.matewave.ui.theme.ink
import cc.skysparkle.matewave.ui.theme.whiteOutlinedTextFieldColors
import kotlinx.coroutines.launch
/**
* First-launch guide. New players see it once; Settings → «Show the guide» opens it again.
* Anyone who already played before this version (a name, a chosen level or games against the
* AI on record) is treated as having seen it.
*/
object Onboarding {
private const val PREFS = "onboarding_prefs"
private const val KEY_DONE = "done"
fun needed(context: Context): Boolean {
val prefs = context.getSharedPreferences(PREFS, Context.MODE_PRIVATE)
if (prefs.getBoolean(KEY_DONE, false)) return false
val profile = context.getSharedPreferences("chess_profile_prefs", Context.MODE_PRIVATE)
val stats = context.getSharedPreferences("chess_stats_prefs", Context.MODE_PRIVATE)
val playedBefore = profile.contains("name") || profile.getBoolean("level_chosen", false) || stats.all.isNotEmpty()
if (playedBefore) {
markDone(context)
return false
}
return true
}
fun markDone(context: Context) {
context.getSharedPreferences(PREFS, Context.MODE_PRIVATE).edit().putBoolean(KEY_DONE, true).apply()
}
}
private data class GuidePage(
@param:DrawableRes val iconRes: Int,
@param:StringRes val titleRes: Int,
@param:StringRes val textRes: Int
)
private val PAGES = listOf(
GuidePage(R.drawable.ic_launcher_card, R.string.guide_welcome_title, R.string.guide_welcome_text),
GuidePage(R.drawable.ic_puzzle, R.string.guide_play_title, R.string.guide_play_text),
GuidePage(R.drawable.ic_bluetooth, R.string.guide_nearby_title, R.string.guide_nearby_text),
// the last page asks for a name and a level
GuidePage(R.drawable.ic_default_avatar, R.string.guide_you_title, R.string.guide_you_text)
)
private data class GuideLevel(@param:StringRes val labelRes: Int, val elo: Int)
// The same levels as in the account screen
private val LEVELS = listOf(
GuideLevel(R.string.skill_novice, 800),
GuideLevel(R.string.skill_amateur, 1200),
GuideLevel(R.string.skill_pro, 1800),
GuideLevel(R.string.skill_master, 2200)
)
private const val MAX_NAME_LENGTH = 20
/**
* @param replay opened from Settings: back on the first page closes it, and the level is not
* asked again once chosen.
*/
@Composable
fun OnboardingScreen(replay: Boolean, onDone: () -> Unit) {
val context = LocalContext.current
val scope = rememberCoroutineScope()
val pager = rememberPagerState(pageCount = { PAGES.size })
val last = pager.currentPage == PAGES.lastIndex
val profile = remember { ProfileStore.get() }
val defaultName = stringResource(R.string.player_default_name)
var name by rememberSaveable { mutableStateOf(if (profile.name == defaultName) "" else profile.name) }
var level by rememberSaveable { mutableStateOf<Int?>(null) }
val askLevel = !profile.levelChosen
val finish = {
val trimmed = name.trim()
var changed = false
if (trimmed.isNotEmpty() && trimmed != profile.name) {
ProfileStore.setName(trimmed)
changed = true
}
val elo = level
if (askLevel && elo != null) {
ProfileStore.setStartingElo(elo)
changed = true
}
// Nearby players see the new name and rating right away
if (changed) {
Transports.lan(context).republishProfile()
Transports.ble(context).republishProfile()
}
Onboarding.markDone(context)
onDone()
}
BackHandler(enabled = pager.currentPage > 0 || replay) {
if (pager.currentPage > 0) scope.launch { pager.animateScrollToPage(pager.currentPage - 1) } else onDone()
}
Box(
modifier = Modifier
.fillMaxSize()
.horizontalSafePadding()
.testTag("onboarding"),
contentAlignment = Alignment.TopCenter
) {
Column(
modifier = Modifier
.fillMaxSize()
.widthIn(max = TabletMaxContentWidth)
.statusBarsPadding()
.navigationBarsPadding()
.imePadding()
) {
Box(
modifier = Modifier
.fillMaxWidth()
.height(56.dp)
.padding(horizontal = 12.dp),
contentAlignment = Alignment.CenterEnd
) {
if (!last) {
Text(
text = stringResource(R.string.guide_skip),
color = ink.copy(alpha = 0.7f),
style = MaterialTheme.typography.labelLarge,
modifier = Modifier
.clip(CircleShape)
// Skipping still lands on the last page: the name and level are asked there
.clickable(role = Role.Button) { scope.launch { pager.animateScrollToPage(PAGES.lastIndex) } }
.padding(horizontal = 14.dp, vertical = 10.dp)
.testTag("onboarding_skip")
)
}
}
HorizontalPager(
state = pager,
modifier = Modifier
.weight(1f)
.fillMaxWidth()
) { index ->
val page = PAGES[index]
PageColumn {
PageIcon(page, isLogo = index == 0)
Spacer(Modifier.height(32.dp))
Text(
text = stringResource(page.titleRes),
color = ink,
style = MaterialTheme.typography.headlineSmall.copy(fontWeight = FontWeight.Bold),
textAlign = TextAlign.Center
)
Spacer(Modifier.height(12.dp))
Text(
text = stringResource(page.textRes),
color = ink.copy(alpha = 0.7f),
style = MaterialTheme.typography.bodyLarge.copy(lineHeight = 24.sp),
textAlign = TextAlign.Center
)
if (index == PAGES.lastIndex) {
Spacer(Modifier.height(24.dp))
AboutYou(
name = name,
onName = { if (it.length <= MAX_NAME_LENGTH) name = it },
askLevel = askLevel,
level = level,
onLevel = { level = it }
)
}
}
}
Dots(count = PAGES.size, current = pager.currentPage)
GlassButton(
onClick = { if (last) finish() else scope.launch { pager.animateScrollToPage(pager.currentPage + 1) } },
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 24.dp, vertical = 20.dp)
.testTag("onboarding_next")
) {
Text(
text = stringResource(if (last) R.string.guide_start else R.string.guide_next),
style = MaterialTheme.typography.titleMedium.copy(fontWeight = FontWeight.Bold)
)
}
}
}
}
@Composable
private fun PageColumn(content: @Composable () -> Unit) {
Column(
modifier = Modifier
.fillMaxSize()
.verticalScroll(rememberScrollState())
.padding(horizontal = 28.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
content()
}
}
@Composable
private fun PageIcon(page: GuidePage, isLogo: Boolean) {
if (isLogo) {
// The app icon picture, not a glyph
Image(
painter = painterResource(page.iconRes),
contentDescription = null,
contentScale = ContentScale.Crop,
modifier = Modifier
.size(120.dp)
.clip(RoundedCornerShape(32.dp))
.border(1.dp, PanelBorder, RoundedCornerShape(32.dp))
)
} else {
Box(
modifier = Modifier
.size(120.dp)
.clip(CircleShape)
.background(Surface2)
.border(1.dp, PanelBorder, CircleShape),
contentAlignment = Alignment.Center
) {
AppIcon(page.iconRes, size = 52.dp, tint = ChessGreen)
}
}
}
@Composable
private fun AboutYou(
name: String,
onName: (String) -> Unit,
askLevel: Boolean,
level: Int?,
onLevel: (Int) -> Unit
) {
Column(modifier = Modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(10.dp)) {
Text(stringResource(R.string.account_name), color = ink.copy(alpha = 0.7f), style = MaterialTheme.typography.labelLarge)
OutlinedTextField(
value = name,
onValueChange = onName,
singleLine = true,
placeholder = { Text(stringResource(R.string.player_default_name), color = ink.copy(alpha = 0.4f)) },
colors = whiteOutlinedTextFieldColors(),
modifier = Modifier
.fillMaxWidth()
.testTag("onboarding_name")
)
if (askLevel) {
Spacer(Modifier.height(6.dp))
Text(stringResource(R.string.account_level_dialog_title), color = ink.copy(alpha = 0.7f), style = MaterialTheme.typography.labelLarge)
LEVELS.forEach { option ->
val selected = option.elo == level
val shape = RoundedCornerShape(16.dp)
Row(
modifier = Modifier
.fillMaxWidth()
.clip(shape)
.background(Surface2)
.border(if (selected) 2.dp else 1.dp, if (selected) ChessGreen else PanelBorder, shape)
.clickable(role = Role.RadioButton) { onLevel(option.elo) }
.padding(horizontal = 16.dp, vertical = 14.dp),
horizontalArrangement = Arrangement.SpaceBetween
) {
Text(stringResource(option.labelRes), color = ink, style = MaterialTheme.typography.titleMedium)
Text("~${option.elo}", color = if (selected) ChessGreen else ink.copy(alpha = 0.7f), style = MaterialTheme.typography.titleMedium)
}
}
Text(stringResource(R.string.guide_level_hint), color = ink.copy(alpha = 0.5f), style = MaterialTheme.typography.bodySmall)
}
}
}
@Composable
private fun Dots(count: Int, current: Int) {
val label = stringResource(R.string.guide_page_of, current + 1, count)
Row(
modifier = Modifier
.fillMaxWidth()
.semantics { contentDescription = label },
horizontalArrangement = Arrangement.Center,
verticalAlignment = Alignment.CenterVertically
) {
repeat(count) { i ->
val selected = i == current
val width by animateDpAsState(if (selected) 22.dp else 8.dp, label = "guide_dot")
Box(
modifier = Modifier
.padding(horizontal = 4.dp)
.size(width = width, height = 8.dp)
.clip(CircleShape)
.background(if (selected) ChessGreen else ink.copy(alpha = 0.2f))
)
}
}
}
@@ -43,7 +43,11 @@ fun OpeningTrainerScreen(viewModel: OpeningStudyViewModel, onBack: () -> Unit) {
val sans = state.sans val sans = state.sans
val opening = remember(sans) { OpeningBook.openingName(sans) } val opening = remember(sans) { OpeningBook.openingName(sans) }
GlassScaffold(title = course.name, onBack = onBack) { // Landscape: the board on the left, progress, moves and the task on the right
cc.skysparkle.matewave.ui.components.BoardScaffold(
title = course.name,
onBack = onBack,
above = {
Row(verticalAlignment = Alignment.CenterVertically) { Row(verticalAlignment = Alignment.CenterVertically) {
Text( Text(
stringResource( stringResource(
@@ -69,8 +73,10 @@ fun OpeningTrainerScreen(viewModel: OpeningStudyViewModel, onBack: () -> Unit) {
ProgressBar(state.answered.toFloat() / state.asked.size.coerceAtLeast(1)) ProgressBar(state.answered.toFloat() / state.asked.size.coerceAtLeast(1))
MovesBar(sans = sans, startBoard = startBoard, opening = opening) MovesBar(sans = sans, startBoard = startBoard, opening = opening)
},
board = { boardModifier ->
ChessBoardView( ChessBoardView(
modifier = boardModifier,
board = state.board, board = state.board,
selectedSquare = state.selectedSquare, selectedSquare = state.selectedSquare,
legalTargets = state.legalTargets, legalTargets = state.legalTargets,
@@ -81,7 +87,8 @@ fun OpeningTrainerScreen(viewModel: OpeningStudyViewModel, onBack: () -> Unit) {
hintSquare = state.hintSquare, hintSquare = state.hintSquare,
interactionEnabled = state.phase == TrainerPhase.YOUR_MOVE || state.phase == TrainerPhase.WRONG interactionEnabled = state.phase == TrainerPhase.YOUR_MOVE || state.phase == TrainerPhase.WRONG
) )
}
) {
when (state.phase) { when (state.phase) {
TrainerPhase.YOUR_MOVE -> Text( TrainerPhase.YOUR_MOVE -> Text(
stringResource(if (state.mode == SessionMode.LEARN) R.string.study_learn_prompt else R.string.study_recall_prompt), stringResource(if (state.mode == SessionMode.LEARN) R.string.study_learn_prompt else R.string.study_recall_prompt),
@@ -71,7 +71,8 @@ fun PuzzleSolveScreen(viewModel: GameViewModel, onBack: () -> Unit, onNextPuzzle
} }
val redSquare = if (state.puzzleFailedAttempt && state.puzzleAutoMoving) state.lastMove?.to else null val redSquare = if (state.puzzleFailedAttempt && state.puzzleAutoMoving) state.lastMove?.to else null
GlassScaffold( // Landscape: the board on the left, the task and buttons on the right
cc.skysparkle.matewave.ui.components.BoardScaffold(
title = puzzle?.let { stringResource(R.string.puzzle_title_rating, it.rating) } ?: stringResource(R.string.puzzle_title_fallback), title = puzzle?.let { stringResource(R.string.puzzle_title_rating, it.rating) } ?: stringResource(R.string.puzzle_title_fallback),
onBack = onBack, onBack = onBack,
actions = { actions = {
@@ -88,8 +89,8 @@ fun PuzzleSolveScreen(viewModel: GameViewModel, onBack: () -> Unit, onNextPuzzle
.padding(horizontal = 6.dp, vertical = 2.dp) .padding(horizontal = 6.dp, vertical = 2.dp)
) )
} }
} },
) { board = { boardModifier ->
// On tablets the board is capped and centred, so the task and buttons fit without scrolling. // On tablets the board is capped and centred, so the task and buttons fit without scrolling.
ChessBoardView( ChessBoardView(
board = state.board, board = state.board,
@@ -98,14 +99,15 @@ fun PuzzleSolveScreen(viewModel: GameViewModel, onBack: () -> Unit, onNextPuzzle
kingInCheckSquare = remember(state.board) { ChessEngine.checkedKingSquare(state.board) }, kingInCheckSquare = remember(state.board) { ChessEngine.checkedKingSquare(state.board) },
flipped = state.myColor == PieceColor.BLACK, flipped = state.myColor == PieceColor.BLACK,
onSquareClick = viewModel::onSquareClicked, onSquareClick = viewModel::onSquareClicked,
modifier = Modifier.align(Alignment.CenterHorizontally).widthIn(max = 560.dp), modifier = boardModifier.widthIn(max = 560.dp),
lastMove = state.lastMove, lastMove = state.lastMove,
hintSquare = state.puzzleHintFrom, hintSquare = state.puzzleHintFrom,
interactionEnabled = state.puzzleStarted && !state.puzzleAutoMoving && !state.puzzleSolved && state.pendingPromotion == null, interactionEnabled = state.puzzleStarted && !state.puzzleAutoMoving && !state.puzzleSolved && state.pendingPromotion == null,
flashSquare = redSquare ?: greenFlash, flashSquare = redSquare ?: greenFlash,
flashColor = if (redSquare != null) WrongRed.copy(alpha = 0.55f) else ChessGreen.copy(alpha = 0.55f) flashColor = if (redSquare != null) WrongRed.copy(alpha = 0.55f) else ChessGreen.copy(alpha = 0.55f)
) )
}
) {
// The task, in the same format as the status in a game: a dot in the side's colour. // The task, in the same format as the status in a game: a dot in the side's colour.
val (text, color) = when { val (text, color) = when {
state.puzzleSolved -> stringResource(R.string.puzzle_solved) to ChessGreen state.puzzleSolved -> stringResource(R.string.puzzle_solved) to ChessGreen
@@ -57,7 +57,8 @@ fun SettingsScreen(
onOpenPermissions: () -> Unit, onOpenPermissions: () -> Unit,
onOpenAppearance: () -> Unit, onOpenAppearance: () -> Unit,
onOpenLicenses: () -> Unit, onOpenLicenses: () -> Unit,
onOpenShare: () -> Unit onOpenShare: () -> Unit,
onOpenGuide: () -> Unit
) { ) {
var musicOn by remember { mutableStateOf(SoundManager.musicEnabled) } var musicOn by remember { mutableStateOf(SoundManager.musicEnabled) }
var sfxOn by remember { mutableStateOf(SoundManager.sfxEnabled) } var sfxOn by remember { mutableStateOf(SoundManager.sfxEnabled) }
@@ -170,6 +171,14 @@ fun SettingsScreen(
onClick = { cc.skysparkle.matewave.settings.AppLinks.open(context, cc.skysparkle.matewave.settings.AppLinks.PRIVACY_POLICY) } onClick = { cc.skysparkle.matewave.settings.AppLinks.open(context, cc.skysparkle.matewave.settings.AppLinks.PRIVACY_POLICY) }
) )
ListDivider() ListDivider()
ListRow(
title = stringResource(R.string.guide_show),
subtitle = stringResource(R.string.guide_show_subtitle),
icon = R.drawable.ic_hint,
chevron = true,
onClick = onOpenGuide
)
ListDivider()
ListRow( ListRow(
title = stringResource(R.string.about_section), title = stringResource(R.string.about_section),
icon = R.drawable.ic_info, icon = R.drawable.ic_info,
@@ -178,6 +187,19 @@ fun SettingsScreen(
onClick = { showAbout = true } onClick = { showAbout = true }
) )
} }
// Donation plaque, last on the screen so it never gets in the way. A heart rather than the
// app icon: the logo already appears in the About dialog
ListGroup {
ListRow(
title = stringResource(R.string.support_title),
subtitle = stringResource(R.string.support_text),
icon = R.drawable.ic_heart,
iconTint = DonateRed,
chevron = true,
onClick = { cc.skysparkle.matewave.settings.AppLinks.open(context, cc.skysparkle.matewave.settings.AppLinks.DONATE) }
)
}
} }
if (showAbout) { if (showAbout) {
@@ -242,6 +264,8 @@ fun SettingsScreen(
} }
} }
private val DonateRed = Color(0xFFFF6B8A)
@Composable @Composable
private fun AboutRow(iconRes: Int, title: String, subtitle: String, onClick: () -> Unit) { private fun AboutRow(iconRes: Int, title: String, subtitle: String, onClick: () -> Unit) {
val rowShape = RoundedCornerShape(12.dp) val rowShape = RoundedCornerShape(12.dp)
@@ -88,25 +88,27 @@ fun SpectatorScreen(target: SpectateTarget, onBackToFriends: () -> Unit) {
val view = state.view val view = state.view
var resultHidden by remember(view?.gameId, state.phase) { mutableStateOf(false) } var resultHidden by remember(view?.gameId, state.phase) { mutableStateOf(false) }
GlassScaffold( val bottom = if (state.flipped) PieceColor.BLACK else PieceColor.WHITE
val material = remember(view?.board) { view?.let { Material.balance(it.board) } }
val checkSquare = remember(view?.board) { view?.let { ChessEngine.checkedKingSquare(it.board) } }
// Landscape: the board on the left, players, moves and buttons on the right
cc.skysparkle.matewave.ui.components.BoardScaffold(
title = stringResource(R.string.spectate_title), title = stringResource(R.string.spectate_title),
onBack = backToFriends, onBack = backToFriends,
actions = { if (view != null) SpectatorBadge(state.spectators, state.max) } actions = { if (view != null) SpectatorBadge(state.spectators, state.max) },
) { above = {
if (state.phase == SpectatePhase.CONNECTING) { if (state.phase == SpectatePhase.CONNECTING) {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) { Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
CircularProgressIndicator(color = ink, strokeWidth = 2.dp, modifier = Modifier.size(16.dp)) CircularProgressIndicator(color = ink, strokeWidth = 2.dp, modifier = Modifier.size(16.dp))
Text(stringResource(R.string.spectate_joining), color = ink, style = MaterialTheme.typography.bodyMedium) Text(stringResource(R.string.spectate_joining), color = ink, style = MaterialTheme.typography.bodyMedium)
} }
} }
if (view == null) return@GlassScaffold if (view != null && material != null) SpectatorPlayerRow(view, bottom.opposite(), state, material)
},
val bottom = if (state.flipped) PieceColor.BLACK else PieceColor.WHITE board = { boardModifier ->
val material = remember(view.board) { Material.balance(view.board) } if (view != null) ChessBoardView(
val checkSquare = remember(view.board) { ChessEngine.checkedKingSquare(view.board) } modifier = boardModifier,
SpectatorPlayerRow(view, bottom.opposite(), state, material)
ChessBoardView(
board = view.board, board = view.board,
selectedSquare = null, selectedSquare = null,
legalTargets = emptyList(), legalTargets = emptyList(),
@@ -117,6 +119,9 @@ fun SpectatorScreen(target: SpectateTarget, onBackToFriends: () -> Unit) {
interactionEnabled = false, interactionEnabled = false,
highlightLastMove = true highlightLastMove = true
) )
}
) {
if (view == null || material == null) return@BoardScaffold
SpectatorPlayerRow(view, bottom, state, material) SpectatorPlayerRow(view, bottom, state, material)
val bookPlies = remember(view.moveSans) { OpeningBook.bookDepth(view.moveSans) } val bookPlies = remember(view.moveSans) { OpeningBook.bookDepth(view.moveSans) }
@@ -15,6 +15,8 @@ val UiCornerRadius = 22.dp
val GlassShape: Shape = RoundedCornerShape(UiCornerRadius) val GlassShape: Shape = RoundedCornerShape(UiCornerRadius)
val TabletMaxContentWidth = 600.dp val TabletMaxContentWidth = 600.dp
/** Landscape board screens: board and side panel together. */
val LandscapeMaxContentWidth = 1200.dp
fun Modifier.glass(): Modifier = this fun Modifier.glass(): Modifier = this
.clip(GlassShape) .clip(GlassShape)
+10
View File
@@ -0,0 +1,10 @@
<!-- Material Icons "favorite" by Google, Apache License 2.0 -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z" />
</vector>
+19
View File
@@ -375,4 +375,23 @@
<string name="spectate_unreachable">Das Gerät, auf dem die Partie läuft, ist nicht erreichbar. Achte darauf, dass du im selben WLAN bist.</string> <string name="spectate_unreachable">Das Gerät, auf dem die Partie läuft, ist nicht erreichbar. Achte darauf, dass du im selben WLAN bist.</string>
<string name="spectate_left_win">%1$s hat die Partie verlassen. %2$s gewinnt.</string> <string name="spectate_left_win">%1$s hat die Partie verlassen. %2$s gewinnt.</string>
<string name="spectate_interrupted">Partie unterbrochen: Die Spieler haben die Verbindung verloren.</string> <string name="spectate_interrupted">Partie unterbrochen: Die Spieler haben die Verbindung verloren.</string>
<string name="support_title">Matewave unterstützen</string>
<string name="support_text">Kostenlos, quelloffen und werbefrei. Eine kleine Spende hilft, das Projekt weiterzuführen.</string>
<!-- first-launch guide -->
<string name="guide_skip">Überspringen</string>
<string name="guide_next">Weiter</string>
<string name="guide_start">Los geht\'s</string>
<string name="guide_page_of">Seite %1$d von %2$d</string>
<string name="guide_welcome_title">Willkommen bei Matewave</string>
<string name="guide_welcome_text">Schach ohne Konto, ohne Werbung und ohne Internet. Alles bleibt auf deinem Handy.</string>
<string name="guide_play_title">Spielen und lernen</string>
<string name="guide_play_text">Spiele gegen den Computer in vier Stufen, löse Aufgaben passend zu deiner Wertung und lerne Eröffnungen – die App erinnert dich ans Wiederholen.</string>
<string name="guide_nearby_title">Mit Freunden in der Nähe</string>
<string name="guide_nearby_text">Spielt euch gegenüber über Bluetooth oder dasselbe WLAN, ganz ohne Internet. Dein Freund braucht Matewave ebenfalls: schick es über Einstellungen → App teilen. Freunde können deine Partien auch zuschauen.</string>
<string name="guide_you_title">Ein bisschen über dich</string>
<string name="guide_you_text">Spieler in der Nähe sehen deinen Namen. Deine Stufe bestimmt die Startwertung und die Aufgaben, die du bekommst.</string>
<string name="guide_level_hint">Deinen Namen kannst du später im Profil ändern.</string>
<string name="guide_show">Anleitung anzeigen</string>
<string name="guide_show_subtitle">Ein kurzer Rundgang durch die App</string>
</resources> </resources>
+19
View File
@@ -374,4 +374,23 @@
<string name="spectate_unreachable">対局をホストしている端末に接続できません。同じWi-Fiネットワークに接続しているか確認してください。</string> <string name="spectate_unreachable">対局をホストしている端末に接続できません。同じWi-Fiネットワークに接続しているか確認してください。</string>
<string name="spectate_left_win">%1$sが対局から退出しました。%2$sの勝ち</string> <string name="spectate_left_win">%1$sが対局から退出しました。%2$sの勝ち</string>
<string name="spectate_interrupted">対局が中断されました。プレイヤー間の接続が切れました。</string> <string name="spectate_interrupted">対局が中断されました。プレイヤー間の接続が切れました。</string>
<string name="support_title">Matewave を応援する</string>
<string name="support_text">無料・オープンソースで広告なし。少額の寄付が開発の継続を支えます。</string>
<!-- first-launch guide -->
<string name="guide_skip">スキップ</string>
<string name="guide_next">次へ</string>
<string name="guide_start">プレイを始める</string>
<string name="guide_page_of">%2$dページ中%1$dページ</string>
<string name="guide_welcome_title">Matewaveへようこそ</string>
<string name="guide_welcome_text">アカウント不要、広告なし、インターネットも不要のチェス。データはすべてスマホの中に残ります。</string>
<string name="guide_play_title">対局して学ぶ</string>
<string name="guide_play_text">4段階のコンピューターと対局し、レーティングに合ったパズルを解き、定跡を学べます。復習のタイミングはアプリがお知らせします。</string>
<string name="guide_nearby_title">近くの友だちと対局</string>
<string name="guide_nearby_text">Bluetoothまたは同じWi-Fiで、インターネットなしで対面対局できます。相手にもMatewaveが必要です。「設定」→「アプリを共有」から送れます。友だちはあなたの対局を観戦することもできます。</string>
<string name="guide_you_title">あなたについて</string>
<string name="guide_you_text">近くのプレイヤーにはあなたの名前が表示されます。レベルによって初期レーティングと出題されるパズルが決まります。</string>
<string name="guide_level_hint">名前はあとでプロフィールから変更できます。</string>
<string name="guide_show">ガイドを表示</string>
<string name="guide_show_subtitle">アプリのかんたんな紹介</string>
</resources> </resources>
+19
View File
@@ -377,4 +377,23 @@
<string name="spectate_unreachable">Nepavyksta pasiekti įrenginio, kuriame vyksta partija. Įsitikinkite, kad esate prisijungę prie to paties „Wi-Fi“ tinklo.</string> <string name="spectate_unreachable">Nepavyksta pasiekti įrenginio, kuriame vyksta partija. Įsitikinkite, kad esate prisijungę prie to paties „Wi-Fi“ tinklo.</string>
<string name="spectate_left_win">%1$s paliko partiją. Laimėjo %2$s.</string> <string name="spectate_left_win">%1$s paliko partiją. Laimėjo %2$s.</string>
<string name="spectate_interrupted">Partija nutraukta: žaidėjų ryšys nutrūko.</string> <string name="spectate_interrupted">Partija nutraukta: žaidėjų ryšys nutrūko.</string>
<string name="support_title">Paremti Matewave</string>
<string name="support_text">Nemokama, atvirojo kodo ir be reklamų. Nedidelė auka padeda projektui gyvuoti.</string>
<!-- first-launch guide -->
<string name="guide_skip">Praleisti</string>
<string name="guide_next">Toliau</string>
<string name="guide_start">Pradėti žaisti</string>
<string name="guide_page_of">%1$d puslapis iš %2$d</string>
<string name="guide_welcome_title">Sveiki atvykę į Matewave</string>
<string name="guide_welcome_text">Šachmatai be paskyros, be reklamų ir be interneto. Viskas lieka jūsų telefone.</string>
<string name="guide_play_title">Žaiskite ir mokykitės</string>
<string name="guide_play_text">Žaiskite su kompiuteriu keturiais lygiais, spręskite jūsų reitingą atitinkančius uždavinius ir mokykitės debiutų – programėlė primins, kada juos pakartoti.</string>
<string name="guide_nearby_title">Žaiskite su draugais šalia</string>
<string name="guide_nearby_text">Žaiskite akis į akį per Bluetooth arba tą patį Wi-Fi, internetas nereikalingas. Draugui taip pat reikia Matewave: nusiųskite ją per Nustatymai → Dalytis programa. Draugai gali stebėti jūsų partijas.</string>
<string name="guide_you_title">Šiek tiek apie jus</string>
<string name="guide_you_text">Šalia esantys žaidėjai mato jūsų vardą. Pagal lygį nustatomas pradinis reitingas ir parenkami uždaviniai.</string>
<string name="guide_level_hint">Vardą vėliau galėsite pakeisti profilyje.</string>
<string name="guide_show">Rodyti gidą</string>
<string name="guide_show_subtitle">Trumpa programėlės apžvalga</string>
</resources> </resources>
+19
View File
@@ -383,4 +383,23 @@
<string name="spectate_unreachable">Устройство, на котором идёт партия, недоступно. Убедитесь, что вы подключены к той же сети Wi-Fi.</string> <string name="spectate_unreachable">Устройство, на котором идёт партия, недоступно. Убедитесь, что вы подключены к той же сети Wi-Fi.</string>
<string name="spectate_left_win">%1$s покинули партию. Победили %2$s.</string> <string name="spectate_left_win">%1$s покинули партию. Победили %2$s.</string>
<string name="spectate_interrupted">Партия прервана: игроки потеряли связь.</string> <string name="spectate_interrupted">Партия прервана: игроки потеряли связь.</string>
<string name="support_title">Поддержать Matewave</string>
<string name="support_text">Бесплатно, с открытым кодом и без рекламы. Небольшое пожертвование помогает проекту развиваться.</string>
<!-- first-launch guide -->
<string name="guide_skip">Пропустить</string>
<string name="guide_next">Далее</string>
<string name="guide_start">Начать играть</string>
<string name="guide_page_of">Страница %1$d из %2$d</string>
<string name="guide_welcome_title">Добро пожаловать в Matewave</string>
<string name="guide_welcome_text">Шахматы без аккаунта, рекламы и интернета. Всё остаётся на вашем телефоне.</string>
<string name="guide_play_title">Играйте и учитесь</string>
<string name="guide_play_text">Играйте с компьютером на четырёх уровнях, решайте задачи под ваш рейтинг и учите дебюты: приложение напомнит, когда пора повторить.</string>
<string name="guide_nearby_title">Играйте с друзьями рядом</string>
<string name="guide_nearby_text">Играйте лицом к лицу через Bluetooth или общий Wi-Fi, интернет не нужен. У друга тоже должен быть Matewave: отправьте его через Настройки → Поделиться приложением. Друзья могут смотреть ваши партии.</string>
<string name="guide_you_title">Немного о вас</string>
<string name="guide_you_text">Игроки рядом видят ваше имя. От уровня зависят начальный рейтинг и задачи, которые вам попадутся.</string>
<string name="guide_level_hint">Имя можно поменять позже в профиле.</string>
<string name="guide_show">Показать гид</string>
<string name="guide_show_subtitle">Короткий обзор приложения</string>
</resources> </resources>
+19
View File
@@ -374,4 +374,23 @@
<string name="spectate_unreachable">无法连接到主持对局的设备。请确认你们连接的是同一个 Wi-Fi 网络。</string> <string name="spectate_unreachable">无法连接到主持对局的设备。请确认你们连接的是同一个 Wi-Fi 网络。</string>
<string name="spectate_left_win">%1$s离开了对局,%2$s获胜。</string> <string name="spectate_left_win">%1$s离开了对局,%2$s获胜。</string>
<string name="spectate_interrupted">对局中断:玩家之间的连接已断开。</string> <string name="spectate_interrupted">对局中断:玩家之间的连接已断开。</string>
<string name="support_title">支持 Matewave</string>
<string name="support_text">免费、开源、无广告。一笔小小的捐助能让项目持续下去。</string>
<!-- first-launch guide -->
<string name="guide_skip">跳过</string>
<string name="guide_next">下一步</string>
<string name="guide_start">开始下棋</string>
<string name="guide_page_of">第 %1$d 页,共 %2$d 页</string>
<string name="guide_welcome_title">欢迎使用 Matewave</string>
<string name="guide_welcome_text">无需账号、无广告、无需联网的国际象棋。所有数据都留在你的手机上。</string>
<string name="guide_play_title">对弈与学习</string>
<string name="guide_play_text">与四个难度的电脑对弈,解答符合你等级分的谜题,学习开局,应用会提醒你何时复习。</string>
<string name="guide_nearby_title">与附近的朋友对弈</string>
<string name="guide_nearby_text">通过蓝牙或同一 Wi-Fi 面对面对弈,无需联网。朋友也需要安装 Matewave:可在“设置”→“分享应用”中发送。朋友还可以观看你的对局。</string>
<string name="guide_you_title">介绍一下你自己</string>
<string name="guide_you_text">附近的玩家会看到你的名字。你的水平决定初始等级分和推送给你的谜题。</string>
<string name="guide_level_hint">名字之后可以在个人资料中修改。</string>
<string name="guide_show">显示使用指南</string>
<string name="guide_show_subtitle">快速了解本应用</string>
</resources> </resources>
+19
View File
@@ -375,4 +375,23 @@
<string name="spectate_unreachable">The host\'s device can\'t be reached. Make sure you\'re on the same Wi-Fi network.</string> <string name="spectate_unreachable">The host\'s device can\'t be reached. Make sure you\'re on the same Wi-Fi network.</string>
<string name="spectate_left_win">%1$s left the game. %2$s wins.</string> <string name="spectate_left_win">%1$s left the game. %2$s wins.</string>
<string name="spectate_interrupted">Game interrupted: the players lost their connection.</string> <string name="spectate_interrupted">Game interrupted: the players lost their connection.</string>
<string name="support_title">Support Matewave</string>
<string name="support_text">Free, open source and no ads. A small donation helps keep it going.</string>
<!-- first-launch guide -->
<string name="guide_skip">Skip</string>
<string name="guide_next">Next</string>
<string name="guide_start">Start playing</string>
<string name="guide_page_of">Page %1$d of %2$d</string>
<string name="guide_welcome_title">Welcome to Matewave</string>
<string name="guide_welcome_text">Chess with no account, no ads and no internet needed. Everything stays on your phone.</string>
<string name="guide_play_title">Play and learn</string>
<string name="guide_play_text">Play the computer at four levels, solve puzzles that match your rating and learn openings, with reminders when it\'s time to review them.</string>
<string name="guide_nearby_title">Play friends nearby</string>
<string name="guide_nearby_text">Play face to face over Bluetooth or the same Wi-Fi, no internet needed. Your friend needs Matewave too: send it from Settings → Share the app. Friends can also watch your games.</string>
<string name="guide_you_title">A bit about you</string>
<string name="guide_you_text">Players nearby see your name. Your level sets the starting rating and the puzzles you get.</string>
<string name="guide_level_hint">You can change your name later in your profile.</string>
<string name="guide_show">Show the guide</string>
<string name="guide_show_subtitle">A quick tour of the app</string>
</resources> </resources>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

@@ -0,0 +1,4 @@
• Unterstützungskarte mit Ko-fi-Button unten in den Einstellungen
• Links zum Quellcode führen jetzt zu GitHub
• Eine kurze Anleitung beim ersten Start mit Name und Spielstärke; erneut aufrufbar in den Einstellungen
• Querformat und Tablets: Brett links, Spieler und Züge rechts
@@ -2,4 +2,3 @@
• Verbindungsprotokoll und Netzwerkzähler aus dem Bildschirm „Berechtigungen“ entfernt • Verbindungsprotokoll und Netzwerkzähler aus dem Bildschirm „Berechtigungen“ entfernt
• Keine Prüfung und Warnungen mehr wegen veralteter App beim Verbinden mit dem Gegner oder Zuschauen bei Freunden • Keine Prüfung und Warnungen mehr wegen veralteter App beim Verbinden mit dem Gegner oder Zuschauen bei Freunden
• Symbole für alle Optionen unter „Aussehen des Bretts“ • Symbole für alle Optionen unter „Aussehen des Bretts“
• Matewave gibt es auch auf meinem eigenen Gitea: https://git.skysparkle.cc/kalarina/Matewave
@@ -0,0 +1,4 @@
• Support card with a Ko-fi button at the bottom of Settings
• Source code links now lead to GitHub
• A short guide on first launch, with your name and level; open it again from Settings
• Landscape and tablets: the board on the left, players and moves on the right
@@ -2,4 +2,3 @@
• Removed the connection log and network counters from the Permissions screen • Removed the connection log and network counters from the Permissions screen
• No more outdated-app check and warnings when connecting to an opponent or watching a friend's game • No more outdated-app check and warnings when connecting to an opponent or watching a friend's game
• Icons for every option in Board appearance • Icons for every option in Board appearance
• Matewave is also on my own Gitea: https://git.skysparkle.cc/kalarina/Matewave
@@ -0,0 +1,4 @@
• 設定の下部にKo-fiボタン付きの支援カード
• ソースコードへのリンクはGitHubに変更
• 初回起動時の簡単なガイド(名前とレベルの設定つき)。設定から再表示できます
• 横向き・タブレット対応:盤面を左、プレイヤーと棋譜を右に表示
@@ -2,4 +2,3 @@
• 「権限」画面から接続ログとネットワークカウンターを削除 • 「権限」画面から接続ログとネットワークカウンターを削除
• 対戦相手への接続時や友達の対局観戦時の、アプリが古いかどうかのチェックと警告を削除 • 対戦相手への接続時や友達の対局観戦時の、アプリが古いかどうかのチェックと警告を削除
• 「盤の見た目」のすべての項目にアイコンを追加 • 「盤の見た目」のすべての項目にアイコンを追加
• Matewave は私の Gitea でも公開しています: https://git.skysparkle.cc/kalarina/Matewave
@@ -0,0 +1,4 @@
• Paramos kortelė su Ko-fi mygtuku nustatymų apačioje
• Nuorodos į išeitinį kodą dabar veda į GitHub
• Trumpas gidas pirmą kartą paleidus, su vardu ir lygiu; jį vėl rasite nustatymuose
• Gulsčias ekranas ir planšetės: lenta kairėje, žaidėjai ir ėjimai dešinėje
@@ -2,4 +2,3 @@
• Iš ekrano „Leidimai“ pašalintas ryšio žurnalas ir tinklo skaitikliai • Iš ekrano „Leidimai“ pašalintas ryšio žurnalas ir tinklo skaitikliai
• Pašalintas pasenusios programos tikrinimas ir jo įspėjimai jungiantis prie varžovo ar stebint draugo partiją • Pašalintas pasenusios programos tikrinimas ir jo įspėjimai jungiantis prie varžovo ar stebint draugo partiją
• Piktogramos prie visų parinkčių skiltyje „Lentos išvaizda“ • Piktogramos prie visų parinkčių skiltyje „Lentos išvaizda“
• Matewave taip pat yra mano Gitea: https://git.skysparkle.cc/kalarina/Matewave
@@ -0,0 +1,4 @@
• Карточка поддержки с кнопкой Ko-fi внизу настроек
• Ссылки на исходный код теперь ведут на GitHub
• Короткий гид при первом запуске с выбором имени и уровня; его можно открыть снова в настройках
• Альбомный режим и планшеты: доска слева, игроки и ходы справа
@@ -2,4 +2,3 @@
• С экрана «Разрешения» убраны журнал подключений и сетевые счётчики • С экрана «Разрешения» убраны журнал подключений и сетевые счётчики
• Убраны проверка на устаревшее приложение и её предупреждения при подключении к сопернику и просмотре партии друга • Убраны проверка на устаревшее приложение и её предупреждения при подключении к сопернику и просмотре партии друга
• Иконки у всех пунктов в «Внешнем виде доски» • Иконки у всех пунктов в «Внешнем виде доски»
• Matewave также есть на моём Gitea: https://git.skysparkle.cc/kalarina/Matewave
@@ -0,0 +1,4 @@
• 设置底部新增带 Ko-fi 按钮的支持卡片
• 源代码链接现在指向 GitHub
• 首次启动时的简短指南,可设置名字和水平;可在设置中再次打开
• 横屏和平板:棋盘在左,玩家和着法在右
@@ -2,4 +2,3 @@
• 从“权限”页面移除了连接日志和网络计数器 • 从“权限”页面移除了连接日志和网络计数器
• 连接对手或观战好友对局时,不再检查应用是否过旧,也不再显示相关提示 • 连接对手或观战好友对局时,不再检查应用是否过旧,也不再显示相关提示
• “棋盘外观”中的每个选项都有了图标 • “棋盘外观”中的每个选项都有了图标
• Matewave 也发布在我自己的 Gitea 上:https://git.skysparkle.cc/kalarina/Matewave