-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/allow modificatio of title #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
09c1013
feat: add ViewIcon and ViewIconColor classes for enhanced inventory i…
ammodev 2710a5a
feat: rename header parameter to defaultHeader and update context han…
twisti-dev 630a5c3
feat: pass previous state to viewFrame.open for improved context hand…
ammodev 2f99d75
feat: adjust positionalShift for improved spacing in ViewContainerBac…
ammodev efb874a
feat: adjust text alignment calculations for improved title rendering
ammodev a429e90
feat: update positionalShift in PaginationButtonGlyphComponent for im…
ammodev 4516002
Merge branch 'version/1.21.11' into feat/allow-modificatio-of-title
ammodev 5246fcb
feat: update ViewIconType and modify container methods for improved f…
ammodev f49186f
Potential fix for pull request finding
ammodev 0678bcc
Potential fix for pull request finding
ammodev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
99 changes: 76 additions & 23 deletions
99
surf-api-bukkit/surf-api-bukkit-api/api/surf-api-bukkit-api.api
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
28 changes: 28 additions & 0 deletions
28
...rc/main/kotlin/dev/slne/surf/surfapi/bukkit/api/inventory/framework/view/icon/ViewIcon.kt
This file contains hidden or 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,28 @@ | ||
| package dev.slne.surf.surfapi.bukkit.api.inventory.framework.view.icon | ||
|
|
||
| import dev.slne.surf.surfapi.bukkit.api.builder.buildItem | ||
| import dev.slne.surf.surfapi.core.api.messages.adventure.key | ||
| import io.papermc.paper.datacomponent.DataComponentTypes | ||
| import org.bukkit.inventory.ItemStack | ||
| import org.bukkit.inventory.ItemType | ||
|
|
||
| fun viewIcon( | ||
| icon: ViewIconType, | ||
| color: ViewIconColor, | ||
| init: ItemStack.() -> Unit = {} | ||
| ) = ViewIcon(icon, color).build(init) | ||
|
|
||
| class ViewIcon( | ||
| val icon: ViewIconType, | ||
| val color: ViewIconColor, | ||
| ) { | ||
| val itemModel: String | ||
| get() = "surf_menu_icon_${color.configName}_${icon.configName}" | ||
|
|
||
| @Suppress("UnstableApiUsage") | ||
| fun build(init: ItemStack.() -> Unit) = buildItem(ItemType.PAPER) { | ||
| init() | ||
|
|
||
| setData(DataComponentTypes.ITEM_MODEL, key("nexo", itemModel)) | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.