Skip to content
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

feat: theme system #5619

Draft
wants to merge 6 commits into
base: nextgen
Choose a base branch
from
Draft

feat: theme system #5619

wants to merge 6 commits into from

Conversation

1zun4
Copy link
Member

@1zun4 1zun4 commented Feb 14, 2025

No description provided.

@1zun4 1zun4 marked this pull request as draft February 14, 2025 12:05
@sqlerrorthing
Copy link
Contributor

please explain in more detail what the "theme system" is, it already exists, doesn't it?

Comment on lines 10 to 14
value = mutableListOf(
*theme.components
.filter { factory -> factory.default }
.map { factory -> factory.new(theme) }.toTypedArray()
)

Check warning

Code scanning / detekt

In most cases using a spread operator causes a full copy of the array to be created before calling a method. This may result in a performance penalty. Warning

In most cases using a spread operator causes a full copy of the array to be created before calling a method. This may result in a performance penalty.
}

val matStack = MatrixStack()
override fun render(context: DrawContext, delta: Float) {

Check warning

Code scanning / detekt

One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand. Warning

The function render is too long (75). The maximum length is 60.
*
* @param jsonObject JsonObject
*/
private fun configureConfigurable(configurable: Configurable, jsonObject: JsonObject) {

Check warning

Code scanning / detekt

One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand. Warning

The function configureConfigurable is too long (66). The maximum length is 60.
return@onChange enabled
}
val inbuiltThemes = arrayOf(LiquidBounceTheme)
var themes = mutableListOf<Theme>(*inbuiltThemes)

Check warning

Code scanning / detekt

In most cases using a spread operator causes a full copy of the array to be created before calling a method. This may result in a performance penalty. Warning

In most cases using a spread operator causes a full copy of the array to be created before calling a method. This may result in a performance penalty.
FontManager.queueFolder(folder.resolve("assets"))
}

override fun init() { }

Check warning

Code scanning / detekt

Empty block of code detected. As they serve no purpose they should be removed. Warning

This empty block of code can be removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants