Package-level declarations

Overview

Settings screen for configuring application preferences and game options.

Responsibilities

  • Managing theme selection

  • Configuring audio settings

  • Adjusting game preferences

  • Persisting user settings

Types

Link copied to clipboard
data class SettingsUiState(val screenState: ScreenState = ScreenState(), val draftPlayerName: String?, val draftTheme: AppTheme, val draftCoreConfig: CoreConfig, val currentVol: Float) : UiState

UI state for the settings page screen.

Link copied to clipboard
class SettingsViewModel(val scope: CoroutineScope, val appState: AppStateImpl, val globalError: ReversiException? = null, val setTheme: (AppTheme) -> Unit, val setPlayerName: suspend (String?) -> Unit, val saveGame: suspend () -> Unit, val setGame: (Game) -> Unit, val setGlobalError: (Exception?, ErrorType?) -> Unit) : ViewModel<SettingsUiState>

ViewModel for the settings page screen. Manages settings changes, audio volume, theme selection, and persistence.

Functions

Link copied to clipboard
@Composable
private fun ReversiScope.ApplyButton(onClick: () -> Unit)
Link copied to clipboard
@Composable
fun ReversiScope.SettingsPage(viewModel: SettingsViewModel, onLeave: () -> Unit)

Settings page displaying configuration options including player name, storage, audio, and theme. Provides apply action to persist changes and navigate back.

Link copied to clipboard
@Composable
fun ReversiScope.SettingsSection(title: String, modifier: Modifier = Modifier, content: @Composable ColumnScope.() -> Unit)

Section header composable for organizing settings into logical groups. Displays a title and divider line with the section content below.

Link copied to clipboard
Link copied to clipboard