(ad567dea) v0.9.7.1
This commit is contained in:
-3
@@ -3347,7 +3347,6 @@ namespace Barotrauma.CharacterEditor
|
||||
|
||||
void CreateCloseButton(SerializableEntityEditor editor, Action onButtonClicked, float size = 1)
|
||||
{
|
||||
if (editor == null) { return; }
|
||||
int height = 30;
|
||||
var parent = new GUIFrame(new RectTransform(new Point(editor.Rect.Width, (int)(height * size * GUI.yScale)), editor.RectTransform, isFixedSize: true), style: null)
|
||||
{
|
||||
@@ -3367,7 +3366,6 @@ namespace Barotrauma.CharacterEditor
|
||||
|
||||
void CreateAddButtonAtLast(ParamsEditor editor, Action onButtonClicked, string text)
|
||||
{
|
||||
if (editor == null) { return; }
|
||||
var parentFrame = new GUIFrame(new RectTransform(new Point(editor.EditorBox.Rect.Width, (int)(50 * GUI.yScale)), editor.EditorBox.Content.RectTransform), style: null, color: ParamsEditor.Color)
|
||||
{
|
||||
CanBeFocused = false
|
||||
@@ -3385,7 +3383,6 @@ namespace Barotrauma.CharacterEditor
|
||||
|
||||
void CreateAddButton(SerializableEntityEditor editor, Action onButtonClicked, string text)
|
||||
{
|
||||
if (editor == null) { return; }
|
||||
var parent = new GUIFrame(new RectTransform(new Point(editor.Rect.Width, (int)(60 * GUI.yScale)), editor.RectTransform), style: null)
|
||||
{
|
||||
CanBeFocused = false
|
||||
|
||||
@@ -394,7 +394,7 @@ namespace Barotrauma.CharacterEditor
|
||||
return false;
|
||||
}
|
||||
var path = Path.GetFileName(TexturePath);
|
||||
if (!path.EndsWith(".png", StringComparison.OrdinalIgnoreCase))
|
||||
if (!path.EndsWith(".png", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
GUI.AddMessage(TextManager.Get("WrongFileType"), GUI.Style.Red);
|
||||
texturePathElement.Flash(GUI.Style.Red);
|
||||
@@ -724,8 +724,8 @@ namespace Barotrauma.CharacterEditor
|
||||
{
|
||||
ParseLimbsFromGUIElements();
|
||||
ParseJointsFromGUIElements();
|
||||
var main = LimbXElements.Values.Select(xe => xe.Attribute("type")).Where(a => a.Value.Equals("torso", StringComparison.OrdinalIgnoreCase)).FirstOrDefault() ??
|
||||
LimbXElements.Values.Select(xe => xe.Attribute("type")).Where(a => a.Value.Equals("head", StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
|
||||
var main = LimbXElements.Values.Select(xe => xe.Attribute("type")).Where(a => a.Value.ToLowerInvariant() == "torso").FirstOrDefault() ??
|
||||
LimbXElements.Values.Select(xe => xe.Attribute("type")).Where(a => a.Value.ToLowerInvariant() == "head").FirstOrDefault();
|
||||
if (main == null)
|
||||
{
|
||||
GUI.AddMessage(GetCharacterEditorTranslation("MissingTorsoOrHead"), GUI.Style.Red);
|
||||
|
||||
Reference in New Issue
Block a user