diff --git a/README.md b/README.md index ce5734e..c603591 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ This is a Kotlin Multiplatform project targeting Desktop. -* `/composeApp` is for code that will be shared across your Compose Multiplatform applications. - It contains several subfolders: - - `commonMain` is for code that’s common for all targets. - - Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. - For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app, - `iosMain` would be the right folder for such calls. +Recommended configuration : +* Server : + - Run : `Kotlin configuration` with main class : `com.pixelized.server.lwa.ApplicationKt` + - build : `Gradle configuration : "server:buildFatJar"` + +* Client : + - Run the debug version of the app : `Gradle configuration : "composeApp:run"` + - Run the release version of the app : `Gradle configuration : "composeApp:runRelease"` + - Build the release version of the app for MacOS : `Gradle configuration : "composeApp:packageReleaseDmg"` + - Build the release version of the app for Windows : `Gradle configuration : "composeApp:packageReleaseMsi"` Learn more about [Kotlin Multiplatform](https://www.jetbrains.com/help/kotlin-multiplatform-dev/get-started.html)… \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/screen/gamemaster/items/GMCharacter.kt b/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/screen/gamemaster/items/GMCharacter.kt index af6637f..521c527 100644 --- a/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/screen/gamemaster/items/GMCharacter.kt +++ b/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/screen/gamemaster/items/GMCharacter.kt @@ -1,6 +1,7 @@ package com.pixelized.desktop.lwa.ui.screen.gamemaster.items import androidx.compose.foundation.background +import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -103,6 +104,7 @@ fun GMCharacter( Box( modifier = Modifier .clip(shape = remember { RoundedCornerShape(8.dp) }) + .clickable(onClick = onEdit) .background(color = MaterialTheme.lwa.colorScheme.elevated.base1dp) .then(other = modifier), ) { @@ -129,9 +131,8 @@ fun GMCharacter( ), ) } - MenuActions( + OverflowActionMenu( character = character, - onEdit = onEdit, onAction = onAction, ) } @@ -153,32 +154,6 @@ fun GMCharacter( } } -@Composable -private fun MenuActions( - modifier: Modifier = Modifier, - character: GMCharacterUio, - onEdit: () -> Unit, - onAction: (Action) -> Unit, -) { - Row( - modifier = modifier, - ) { - IconButton( - onClick = onEdit - ) { - Icon( - imageVector = Icons.Default.Edit, - tint = MaterialTheme.lwa.colorScheme.base.primary, - contentDescription = null, - ) - } - OverflowActionMenu( - character = character, - onAction = onAction, - ) - } -} - @Composable private fun OverflowActionMenu( modifier: Modifier = Modifier,