-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch to using tabs and 1 main setting button
- Loading branch information
Showing
12 changed files
with
90 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
package com.mineinabyss.launchy.data | ||
|
||
import androidx.compose.runtime.Composable | ||
|
||
typealias ModName = String | ||
typealias GroupName = String | ||
typealias DownloadURL = String | ||
typealias ConfigURL = String | ||
typealias ComposableFun = @Composable () -> Unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
src/main/kotlin/com/mineinabyss/launchy/ui/screens/main/buttons/AccountButton.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/main/kotlin/com/mineinabyss/launchy/ui/screens/settings/JavaScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.mineinabyss.launchy.ui.screens.settings | ||
|
||
import androidx.compose.desktop.ui.tooling.preview.Preview | ||
import androidx.compose.foundation.VerticalScrollbar | ||
import androidx.compose.foundation.layout.* | ||
import androidx.compose.foundation.lazy.LazyColumn | ||
import androidx.compose.foundation.lazy.rememberLazyListState | ||
import androidx.compose.foundation.rememberScrollbarAdapter | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.Scaffold | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
import com.mineinabyss.launchy.LocalLaunchyState | ||
import kotlin.math.roundToInt | ||
|
||
@Composable | ||
@Preview | ||
fun JavaScreen() { | ||
val state = LocalLaunchyState | ||
Scaffold { paddingValues -> | ||
Column(horizontalAlignment = Alignment.CenterHorizontally) { | ||
Surface( | ||
shape = RoundedCornerShape(topStart = 10.dp, topEnd = 10.dp), | ||
modifier = Modifier.padding(5.dp) | ||
) { | ||
Box( | ||
Modifier.padding(paddingValues).padding(start = 10.dp, top = 40.dp) | ||
) { | ||
val lazyListState = rememberLazyListState() | ||
LazyColumn(Modifier.fillMaxSize().padding(end = 12.dp), lazyListState) { | ||
item("java settings") { | ||
val minRam = SliderSwitch(label = "Minimum RAM", valueRange = 1..12).roundToInt() | ||
val maxRam = SliderSwitch(label = "Maximum RAM:", valueRange = 1..12).roundToInt() | ||
// Figure out way to handle this, probably storing via state or something | ||
state.clientSettings = ClientSettings(state.clientSettings.minecraft, JavaSettings(minRam, maxRam)) | ||
} | ||
} | ||
VerticalScrollbar( | ||
modifier = Modifier.fillMaxHeight().align(Alignment.CenterEnd), | ||
adapter = rememberScrollbarAdapter(lazyListState) | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters