-
Couldn't load subscription status.
- Fork 41
Initializes text upon object creation. #597
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
base: master
Are you sure you want to change the base?
Initializes text upon object creation. #597
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will probably need another solution since InitializeText isn't made properly to fit in the constructor.
Nautilus/Utility/BasicText.cs
Outdated
| { | ||
| X = set_x; | ||
| Y = set_y; | ||
| InitializeText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are unneeded since the base constructor calls InitializeText
Nautilus/Utility/BasicText.cs
Outdated
| { | ||
| X = set_x; | ||
| Y = set_y; | ||
| InitializeText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| { | ||
| CloneAlign = false; | ||
| Align = useAlign; | ||
| InitializeText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| { | ||
| CloneColor = false; | ||
| Color = useColor; | ||
| InitializeText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| { | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| Color = useColor; | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| Color = useColor; | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| Color = useColor; | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| Y = set_y; | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| InitializeText(); |
|
I see the problems with this now. It is getting close, but the CloneColor property (which seems pointless) is overriding the color value. I would just make CloneColor obsolete, remove references to it, and set the Color to white by default. |
|
Also, since InitializeText is being called as soon as the constructor is called, there's a chance that it's being created in the main menu in mods, which means it is destroyed when it reaches the main game scene. That needs to be addressed somehow. |
Changes made in this pull request