//-------------------------------------- // INITIALIZE //-------------------------------------- //-------------------------------------- // PUBLIC METHODS //-------------------------------------- void OnGUI() { UpdateToStartPos(); GUI.Label(new Rect(StartX, StartY, Screen.width, 40), "Native Pop Ups", style); StartY += YLableStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Rate PopUp with events")) { IOSRateUsPopUp rate = IOSRateUsPopUp.Create("Like this game?", "Please rate to support future updates!"); rate.addEventListener(BaseEvent.COMPLETE, onRatePopUpClose); } StartX += XButtonStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Dialog PopUp")) { IOSDialog dialog = IOSDialog.Create("Dialog Titile", "Dialog message"); dialog.addEventListener(BaseEvent.COMPLETE, onDialogClose); } StartX += XButtonStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Message PopUp")) { IOSMessage msg = IOSMessage.Create("Message Titile", "Message message"); msg.addEventListener(BaseEvent.COMPLETE, onMessageClose); } StartX = XStartPos; StartY += YButtonStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Dismissed PopUp")) { Invoke("dismissAler", 2f); IOSMessage.Create("Hello", "I will die in 2 sec"); } StartX += XButtonStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Open App Store")) { IOSNativeUtility.RedirectToAppStoreRatingPage(); } StartX = XStartPos; StartY += YButtonStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Show Preloader ")) { IOSNativeUtility.ShowPreloader(); Invoke("HidePreloader", 3f); } StartX += XButtonStep; if (GUI.Button(new Rect(StartX, StartY, buttonWidth, buttonHeight), "Hide Preloader")) { HidePreloader(); } }