Feature request: Clickable links in entries that can lead to other entries
Eladkay opened this issue ยท 6 comments
Title says it all pretty much. Maybe have some sort of character or something in the localized string to mark a link? "@link("Quaritum:ShardedSkies") { Click me }" I know I'm bad at examples but maybe this could display "Click me" and link to "Quaritum:ShardedSkies"?
Thanks!
ITextComponents would be awesome.
Currently I'm using a "PageHolder"/Wrapper that displays any page, but also renders links (to other entries or a website) on the right side of the book GUI. That works fine, but is not as intuitive and good looking as a "in-text" link
Technically, you don't need changes to the built in Page to accomplish this. You could write your own Page class that you use instead which uses ITextComponent instead of strings, as there is nothing (that I can see) that mandates you have to use strings at all.
ITextComponents will be great because they can do other things. (TextComponentTranslation, TextComponentScore, etc) I'd support a full move to ITextComponent but for now an "emulator" page would work.
The cleanest way to do this would be to move everything over to ITextComponent instead of direct strings. The problem with that would be lots of breakage. Lots.
I could provide an ITextComponent "emulator" page that functions similarly to the sound page and redirects all the strings through an ITextComponent first.