Initializes text upon object creation.#597
Initializes text upon object creation.#597FearDragon wants to merge 3 commits intoSubnauticaModding:masterfrom
Conversation
LeeTwentyThree
left a comment
There was a problem hiding this comment.
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.
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.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| { | ||
| CloneAlign = false; | ||
| Align = useAlign; | ||
| InitializeText(); |
There was a problem hiding this comment.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| { | ||
| CloneColor = false; | ||
| Color = useColor; | ||
| InitializeText(); |
There was a problem hiding this comment.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| { | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| Color = useColor; | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| Color = useColor; | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| Color = useColor; | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
| InitializeText(); |
Nautilus/Utility/BasicText.cs
Outdated
| Y = set_y; | ||
| CloneSize = false; | ||
| Size = useSize; | ||
| InitializeText(); |
There was a problem hiding this comment.
| 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