Skip to content

Commit

Permalink
Canvas always enabled; loading flag
Browse files Browse the repository at this point in the history
  • Loading branch information
DMagic1 committed Aug 1, 2018
1 parent e96b658 commit d56f3d0
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions Source/ContractsWindow.Unity/Unity/CW_ProgressPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,20 @@ public class CW_ProgressPanel : MonoBehaviour
private List<CW_StandardNode> standardNodes = new List<CW_StandardNode>();
private List<CW_BodyNode> bodyNodes = new List<CW_BodyNode>();

private Canvas panelCanvas;
private bool loaded;

private void Awake()
public bool Loaded
{
panelCanvas = GetComponent<Canvas>();
get { return loaded; }
}

public IEnumerator GeneratePanel(IProgressPanel panel, bool active)
public IEnumerator GeneratePanel(IProgressPanel panel)
{
if (panel == null)
yield break;

gameObject.SetActive(true);

panelCanvas.enabled = false;


panelInterface = panel;

if (panelInterface.GetIntervalNodes != null)
Expand Down Expand Up @@ -138,10 +136,9 @@ public IEnumerator GeneratePanel(IProgressPanel panel, bool active)

FinishPanel();

panelCanvas.enabled = true;

if (gameObject.activeSelf != active)
gameObject.SetActive(active);
loaded = true;

gameObject.SetActive(false);
}

private void FinishPanel()
Expand Down

0 comments on commit d56f3d0

Please sign in to comment.