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

publicize defaultTerminalFontSize #131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

darmuh
Copy link

@darmuh darmuh commented Jul 30, 2024

would allow for other mods to access/modify this value to change terminal font size

specifically re: the below issue

hey @IAmBatby (On Semi-Cooldown), low priority but I've got an issue to report. There's a feature in my terminal mod that allows for changing the terminal font & font size that is failing to update (Terminal instance).screenText.textComponent.fontSize with LLL present. I'm assuming it's because LLL caches the default font size at StartOfRound Awake and is setting the font size to this whenever RefreshMoonsCataloguePage is called. Is there any way I can build soft compatibility to LLL to either A) Update the cached font size to the user's configured size from my mod or B) subscribe to an event where RefreshMoonsCataloguePage is called to update the font size to the user's configured size from my mod after?

would allow for other mods to access/modify this value to change terminal font size
@darmuh
Copy link
Author

darmuh commented Jul 31, 2024

I guess the main concern re: this is how different values would affect the below code?

Terminal.screenText.textComponent.fontSize = defaultTerminalFontSize - (0.1f * (currentMoonsCataloguePage.ExtendedLevels.Count - OriginalContent.MoonsCatalogue.Count));

I'm guessing it's just to make the moon catalogue page look better?

@darmuh
Copy link
Author

darmuh commented Aug 8, 2024

also, kinda wild idea but if you are only trying to modify the font size for the moons catalogue it turns out you can use the tag in the displaytext output to modify the font size.

so you could do something like

moonTerminalNode.displayText = moonTerminalNode.displayText.Insert(0, "<size=newSize>");
moonTerminalNode.displayText = moonTerminalNode.displayText.Insert(moonTerminalNode.displayText.length -1, "</size>");

The below user of my terminal mod tested this tag with the below results:
image
http://digitalnativestudios.com/textmeshpro/docs/rich-text/#size

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.

1 participant