-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: Fix row and column placement not accumulating width/height respectively feat: Add layout modifiers that can alter placement and measurement feat: Add padding modifier feat: Add offset modifier * fix: fold Modifiers in instead of out (the expected left takes precedence over right behaviour) fix: First size always wins fix: Make padding behaviour consistent with Jetpack Compose's fix: Accidental double then() on some extensions calling other extensions refactor: modifyLayoutConstraints runs after inner constraints have been calculated and element measure * refactor: cleanup CreativeItem * refactor: allow for customized navbarFiller item * fix: fill paginated-content after navbar * feat: Row and Column arrangement from jetpack refactor: Cleanup Paginated component to space things automatically * chore: Update readme * fix: Fix building PRs with java 17 --------- Co-authored-by: Boy <[email protected]>
- Loading branch information
Showing
31 changed files
with
1,343 additions
and
187 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
kotlin.code.style=official | ||
group=com.mineinabyss | ||
version=0.11 | ||
version=0.12 | ||
idofrontVersion=0.24.1 |
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
53 changes: 53 additions & 0 deletions
53
guiy-example/src/main/kotlin/com/mineinabyss/guiy/example/gui/ArrangementMenu.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,53 @@ | ||
package com.mineinabyss.guiy.example.gui | ||
|
||
import androidx.compose.runtime.Composable | ||
import com.mineinabyss.guiy.components.Item | ||
import com.mineinabyss.guiy.components.canvases.Chest | ||
import com.mineinabyss.guiy.inventory.LocalGuiyOwner | ||
import com.mineinabyss.guiy.jetpack.Arrangement | ||
import com.mineinabyss.guiy.layout.Column | ||
import com.mineinabyss.guiy.layout.Row | ||
import com.mineinabyss.guiy.modifiers.Modifier | ||
import com.mineinabyss.guiy.modifiers.fillMaxSize | ||
import com.mineinabyss.guiy.modifiers.fillMaxWidth | ||
import org.bukkit.Material | ||
import org.bukkit.entity.Player | ||
|
||
@Composable | ||
fun ArrangementMenu(player: Player) { | ||
val owner = LocalGuiyOwner.current | ||
Chest( | ||
setOf(player), | ||
"Arrangement example", | ||
onClose = { owner.exit() }, | ||
modifier = Modifier.fillMaxSize() | ||
) { | ||
Column { | ||
val modifier = Modifier.fillMaxWidth() | ||
Row(modifier, horizontalArrangement = Arrangement.spacedBy(1)) { | ||
Items(4) | ||
} | ||
Row(modifier, horizontalArrangement = Arrangement.Center) { | ||
Items(3) | ||
} | ||
Row(modifier, horizontalArrangement = Arrangement.SpaceAround) { | ||
Items(3) | ||
} | ||
Row(modifier, horizontalArrangement = Arrangement.SpaceBetween) { | ||
Items(3) | ||
} | ||
// Item(Material.BLACK_STAINED_GLASS, modifier = Modifier.fillMaxHeight()) | ||
// Column { | ||
// Item(Material.RED_CONCRETE, modifier = Modifier.fillMaxWidth().height(3).padding(1)) | ||
// Item(Material.BLUE_CONCRETE, modifier = Modifier.fillMaxSize().padding(1)) | ||
// } | ||
} | ||
} | ||
} | ||
|
||
@Composable | ||
private fun Items(count: Int) { | ||
repeat(count) { | ||
Item(Material.RED_CONCRETE) | ||
} | ||
} |
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
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
Oops, something went wrong.