void PauseButton() { int ind = control.state == ELBuildControl.State.Building ? 0 : 1; string statestr = state_str[ind]; GUILayout.BeginHorizontal(); if (control.paused) { if (GUILayout.Button($"Resume {statestr}", ELStyles.normal, expandWidth)) { control.ResumeBuild(); } } else { if (GUILayout.Button($"Pause {statestr}", ELStyles.normal, expandWidth)) { control.PauseBuild(); } } if (control.state == ELBuildControl.State.Building) { if (GUILayout.Button("Cancel Build", ELStyles.normal, expandWidth)) { control.CancelBuild(); } } else { if (GUILayout.Button("Restart Build", ELStyles.normal, expandWidth)) { control.UnCancelBuild(); } } GUILayout.EndHorizontal(); }
void PauseButton() { int ind = control.state == ELBuildControl.State.Building ? 0 : 1; string statestr = state_str[ind]; GUILayout.BeginHorizontal(); if (control.paused) { if (GUILayout.Button(LocalStrings.Resume + statestr, ELStyles.normal, //Resume expandWidth)) { control.ResumeBuild(); } } else { if (GUILayout.Button(LocalStrings.Pause + statestr, ELStyles.normal, // Pause expandWidth)) { control.PauseBuild(); } } if (control.state == ELBuildControl.State.Building) { if (GUILayout.Button(LocalStrings.CancelBuild, ELStyles.normal, //"Cancel Build" expandWidth)) { control.CancelBuild(); } } else { if (GUILayout.Button(LocalStrings.RestartBuild, ELStyles.normal, //"Restart Build" expandWidth)) { control.UnCancelBuild(); } } GUILayout.EndHorizontal(); }