-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement GUI annotations and metadata #43
Merged
ix0rai
merged 8 commits into
QuiltMC:master
from
anonymous123-code:simple-annotation-additions
Apr 2, 2024
Merged
Implement GUI annotations and metadata #43
ix0rai
merged 8 commits into
QuiltMC:master
from
anonymous123-code:simple-annotation-additions
Apr 2, 2024
Conversation
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
…ies to provide alternate translation keys for the raw text options
ix0rai
reviewed
Mar 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests would be appreciated!
src/main/java/org/quiltmc/config/api/annotations/ChangeWarning.java
Outdated
Show resolved
Hide resolved
src/main/java/org/quiltmc/config/api/annotations/DisplayName.java
Outdated
Show resolved
Hide resolved
@Target({ElementType.FIELD, ElementType.TYPE}) | ||
public @interface DisplayName { | ||
/** | ||
* A {@link MetadataType} to supply to {@link Config.Builder#metadata} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not about this pr but we should stop copying this comment everywhere lol
Co-authored-by: ix0rai <ix0rai64@gmail.com>
ix0rai
approved these changes
Mar 31, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
DisplayName(String value, translatable=false)
: The display name of a metadata holder. Applicable to configs, sections, and fields. Metadata processors (like config screens) may define generated translation keys taking precedence if it isn't translatable. If translatable is true, the value should be treated as a translation keyDisplayNameConvention(DefaultNamingSchemes value, custom="")
: The naming scheme used to derive the fallback display names of the metadata holder for config screens.DisplayName
must take precedence, metadata processors (like config screens) may define generated translation keys taking precedence overDisplayNameConvention
. Inheritable and applicable to configs, sections, and fieldsChangeWarning(metdata.ChangeWarning.Type value, customMessage="")
: Used to tell config screen libraries that a warning should be displayed before applying changes. The type can beRequiresRestart
,Unsafe
,Experimental
,CustomTranslatable
, orCustom
. If it isCustomTranslatable
,customMessage
is used as a translation key. If it isCustom
,customMessage
is used as the raw message, but the metdata provider may define translation keys that take precedence.Fixes #31, fixes #30