This commit is contained in:
mountaindrew10 committed 2023-01-31 12:30:58 -06:00
commit 9701133c6d
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -65,7 +65,7 @@ namespace CalamityMod.UI
}
public virtual void Draw(SpriteBatch spriteBatch)
{
if (!IsActive)
if (!IsActive || Main.invasionProgressMode == 0)
return;
int barOffsetY = 0;
+1 -1
View File
@@ -172,7 +172,7 @@ namespace CalamityMod.UI.ModeIndicator
//Get a "regexed" size which matches the text properly.
//Indeed, there is some scuffery in the code that makes it so that chat tags still get accounted as extra size, so we have to use 2 different values
//One for the displacement, which is the improper size vanilla uses, and another for the actual visual size, which is the one the textbox will use
int numLines = Regex.Matches(textToDisplay, "\n").Count; //It's inconsistent. Adding one by default makes some textboxes too large, not adding one can make some too small
int numLines = 1 + Regex.Matches(textToDisplay, "\n").Count; //It's inconsistent. Adding one by default makes some textboxes too large, not adding one can make some too small
string heightCalculator = string.Concat(Enumerable.Repeat("mis nuevos los gatos \n", numLines));
Vector2 regexedBoxSize = new Vector2(ChatManager.GetStringSize(MouseText.Value, textToDisplay, Vector2.One).X, ChatManager.GetStringSize(MouseText.Value, heightCalculator, Vector2.One).Y);