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

Add TextScale property to ToolTip #2702

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ArshvirGoraya
Copy link

I got a request for one of my mods to be able to scale the text of tool tips (specifically in the exterior automap).

I couldn't find an easy way of doing this so I created this property. This property is also in other files such as TextLabel.cs, and works the same way.

This lets me adjust the ToolTip scaling very easily for individual ToolTips.

petchema
petchema previously approved these changes Nov 1, 2024
Copy link
Collaborator

@petchema petchema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't really test the functionality, but those changes shouldn't affect anything as long as the textScale of a tooltip is not tweaked by a mod

@ArshvirGoraya
Copy link
Author

For anyone wanting to see this functioning, here is a video example of everything working as I intend it.

I am targetting the tooltips in the exterior automap and changing their size. I also show tooltips I am not targetting, whose sizes don't change.

Maphours.-.Textscale.Example.mp4

I also removed some TextScale variables I added in my first commit as they were not needed. In fact, some of them were causing problems with the positioning of the ToolTip if they got too big (so its good I made this video or I wouldn't have caught it this early).

To test it yourself just do this on any toolTip: ToolTip.TextScale = x;

You can also check the ToolTipSizeChanging branch in my repo here to see how I am doing it: https://github.com/ArshvirGoraya/Map-Hours/tree/ToolTipSizeChanging

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