Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sarbian committed Sep 17, 2014
1 parent 4ca1972 commit e9b443a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions moduleManager.cs
Expand Up @@ -134,9 +134,11 @@ public void OnGUI()
{
if (HighLogic.LoadedScene == GameScenes.LOADING && MMPatchLoader.Instance != null)
{
var centeredStyle = new GUIStyle(GUI.skin.GetStyle("Label"));
centeredStyle.alignment = TextAnchor.UpperCenter;
centeredStyle.fontSize = 16;
var centeredStyle = new GUIStyle(GUI.skin.GetStyle("Label"))
{
alignment = TextAnchor.UpperCenter,
fontSize = 16
};
Vector2 sizeOfLabel = centeredStyle.CalcSize(new GUIContent(MMPatchLoader.Instance.status));
GUI.Label(
new Rect(Screen.width/2 - (sizeOfLabel.x/2), Mathf.FloorToInt(0.8f*Screen.height), sizeOfLabel.x,
Expand Down Expand Up @@ -893,7 +895,6 @@ public ConfigNode ModifyNode(ConfigNode original, ConfigNode mod)
}

// Get the bits and pieces from the regexp

valName = match.Groups[1].Value;

// In this case insert the value at position index (with the same node names)
Expand Down Expand Up @@ -1282,9 +1283,7 @@ private static string RecurseVariableSearch(string path, ConfigNode currentNode)
if (path.StartsWith("../"))
{
if (nodeStack.Count == 1)
{
return null;
}
string result;
ConfigNode top = nodeStack.Pop();
try
Expand All @@ -1309,7 +1308,6 @@ private static string RecurseVariableSearch(string path, ConfigNode currentNode)
string nodeType, nodeName;
int index = 0;
if (subName.Contains(":HAS["))
if (subName.Contains(":HAS["))
{
int start = subName.IndexOf(":HAS[");
constraint = subName.Substring(start + 5, subName.LastIndexOf(']') - start - 5);
Expand Down

0 comments on commit e9b443a

Please sign in to comment.