Jade ๐Ÿ”

Jade ๐Ÿ”

93M Downloads

Plans to implement align support?

Speiger opened this issue ยท 5 comments

commented

Mod loader

Forge

Minecraft version

1.19.2 or newer

Mod version

Any

Modloader version

Any

Modpack info

non

If bug:

  • Can you reproduce this issue with relevant mods only?

If bug: The latest.log file

No response

Issue description

Are there plans to implement align support?
I don't mean the "left/right" row that already exists, but actual Text Alignment support?

Technically i use the one probe, but i have seen a lot of jade requests and after a addon maker made it work we saw that there isn't any support for text alignments.

Because we do have some cases where that would be useful. For example category headers.
(Screenshot by CrossVas who made the addon)
image

Growth/Stats/Storage/Environment are headers that we align actually in TOP because it looks better centered.

Or do we have to implement these ourselves?

commented

@Snownee i would move the alignment function to the "add" function as a optional way to add things.
And make the align function that you have based on the component instead of based on the registration part.

commented

@Snownee thank you, though you kinda failed the assignment.
The question was: Do we get text alignment support.
You add a function that implements 1 possibility because I specifically mentioned it.
Would you like another issue be opened for right aligned text support or do you plan not to add that too?

commented

I'm not happy with the current implementation, so I plan to make the alignment element-based, which means adding an Align.CENTER.

commented

It is pretty easy to do it by creating a custom element. I will do it, but I haven't decided how to make it part of the API yet.

commented

I know its easy to implement,
and via API, maybe have a component specific interface? That way configurations can be added afterwards?
like: ITextElement, IProgressElement, etc,
Or move it into the style implementation like TOP does it?