feat: add dark mode with toggle in top bar
- Created UnoTheme.kt with light/dark color schemes - Added dark mode toggle (moon/sun icon) in GameInfoBar - Wrapped all entry points (Desktop, Android, Web) with UnoTheme - Fixed Web entry point to use CanvasBasedWindow - Fixed Math.random() for WASM compatibility
This commit is contained in:
@@ -13,6 +13,7 @@ import androidx.compose.ui.unit.dp
|
||||
import com.uno.game.GameEngine
|
||||
import com.uno.game.model.*
|
||||
import com.uno.shared.UnoGameScreen
|
||||
import com.uno.shared.UnoTheme
|
||||
import kotlinx.coroutines.delay
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
@@ -20,7 +21,7 @@ class MainActivity : ComponentActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
enableEdgeToEdge()
|
||||
setContent {
|
||||
MaterialTheme {
|
||||
UnoTheme {
|
||||
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
|
||||
UnoApp()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user