Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Font/Hex colour support for titles.

Open TheLimeGlass opened this issue 3 years ago • 3 comments

Suggestion

Include hex colour support for the titles. Example: grabbing "<##ffffff>white hex colours example" for the title. (except an actual hex colour, not white)

Example of current implementation: https://github.com/SkriptLang/Skript/blob/a45b189ca5bdc601a2dc6e99c74ea429f8c666a4/src/main/java/ch/njol/skript/effects/EffActionBar.java#L68

Any my own implementation: https://github.com/TheLimeGlass/Skore/blob/de4d186cce945230387fcd46568d958680c9de39/src/main/java/me/limeglass/skore/elements/expressions/ExprTitle.java#L44

Doing this would also automatically add support for font which is a Skript chat value.

TheLimeGlass avatar Jun 30 '22 07:06 TheLimeGlass

This would probably require a system similar to that in EffMessage and EffBroadcast related to the colored/formatted expression

TPGamesNL avatar Jun 30 '22 08:06 TPGamesNL

Anything other than hex support may be difficult (or not possible at all) due to the lack of API. AFAIK, there are no API methods for sending Components for titles (whereas they do exist for action bar and chat)

APickledWalrus avatar Jun 30 '22 08:06 APickledWalrus

I think Paper does allow it. Should we add component support for Paper only, or just allow hex?

TPGamesNL avatar Jun 30 '22 09:06 TPGamesNL

+1 Hope we get this also for scoreboards/tab and even more text-related places, really usefull combined with resource packs

RealRunSpace avatar Mar 16 '24 00:03 RealRunSpace

+1 Hope we get this also for scoreboards/tab and even more text-related places, really usefull combined with resource packs

This is currently possible. I don't know how as it's not even using a ChatComponent. \send title formatted "<#00ff00>test"

TheLimeGlass avatar Mar 16 '24 06:03 TheLimeGlass

Actually, it doesn't work for FONT and other values, but for Color it DOES.

TheLimeGlass avatar Mar 16 '24 06:03 TheLimeGlass

I know I know, but what I meant is by using font:value, because it allows us to create for example, custom full screen fade out animations, custom logos/images, etc

RealRunSpace avatar Mar 16 '24 08:03 RealRunSpace