(03ab09991) Load chinese fonts dynamically, removed unnecessary duplicate block from DynamicRenderAtlas
This commit is contained in:
@@ -78,8 +78,8 @@ namespace Barotrauma.Items.Components
|
||||
CanBeFocused = false
|
||||
};
|
||||
|
||||
var pumpSpeedText = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.2f), rightArea.RectTransform) { RelativeOffset = new Vector2(0.25f, 0.0f) },
|
||||
"", textAlignment: Alignment.BottomLeft);
|
||||
var pumpSpeedText = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.2f), rightArea.RectTransform) { RelativeOffset = new Vector2(0.0f, 0.0f) },
|
||||
"", textAlignment: Alignment.BottomLeft, wrap: true);
|
||||
string pumpSpeedStr = TextManager.Get("PumpSpeed");
|
||||
pumpSpeedText.TextGetter = () => { return pumpSpeedStr + ": " + (int)flowPercentage + " %"; };
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Barotrauma.Items.Components
|
||||
};
|
||||
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.15f, 1.0f), sliderArea.RectTransform),
|
||||
TextManager.Get("PumpOut"), textAlignment: Alignment.Center);
|
||||
TextManager.Get("PumpOut"), textAlignment: Alignment.Center, wrap: true);
|
||||
pumpSpeedSlider = new GUIScrollBar(new RectTransform(new Vector2(0.8f, 1.0f), sliderArea.RectTransform), barSize: 0.25f, style: "GUISlider")
|
||||
{
|
||||
Step = 0.05f,
|
||||
@@ -111,7 +111,7 @@ namespace Barotrauma.Items.Components
|
||||
};
|
||||
|
||||
new GUITextBlock(new RectTransform(new Vector2(0.15f, 1.0f), sliderArea.RectTransform),
|
||||
TextManager.Get("PumpIn"), textAlignment: Alignment.Center);
|
||||
TextManager.Get("PumpIn"), textAlignment: Alignment.Center, wrap: true);
|
||||
}
|
||||
|
||||
public override void OnItemLoaded()
|
||||
|
||||
@@ -117,11 +117,11 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
if (uiElements[i] is GUIButton button)
|
||||
{
|
||||
button.Text = labels[i];
|
||||
button.Text = customInterfaceElementList[i].Label;
|
||||
}
|
||||
else if (uiElements[i] is GUITickBox tickBox)
|
||||
{
|
||||
tickBox.Text = labels[i];
|
||||
tickBox.Text = customInterfaceElementList[i].Label;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -776,37 +776,6 @@ namespace Barotrauma
|
||||
ic.DrawHUD(spriteBatch, character);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
List<ColoredText> texts = new List<ColoredText>();
|
||||
public List<ColoredText> GetHUDTexts(Character character)
|
||||
{
|
||||
texts.Clear();
|
||||
foreach (ItemComponent ic in components)
|
||||
{
|
||||
if (string.IsNullOrEmpty(ic.DisplayMsg)) continue;
|
||||
if (!ic.CanBePicked && !ic.CanBeSelected) continue;
|
||||
if (ic is Holdable holdable && !holdable.CanBeDeattached()) continue;
|
||||
|
||||
Color color = Color.Gray;
|
||||
bool hasRequiredSkillsAndItems = ic.HasRequiredSkills(character) && ic.HasRequiredItems(character, false);
|
||||
if (hasRequiredSkillsAndItems)
|
||||
{
|
||||
if (ic is Repairable repairable)
|
||||
{
|
||||
if (Condition < repairable.ShowRepairUIThreshold)
|
||||
{
|
||||
color = Color.Cyan;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
color = Color.Cyan;
|
||||
}
|
||||
}
|
||||
|
||||
texts.Add(new ColoredText(ic.DisplayMsg, color, false));
|
||||
}
|
||||
return texts;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user