private void OnGUI() { scrollView = Gl.BeginScrollView(scrollView); { Gl.TextArea(log); } Gl.EndScrollView(); EditorUtil.HorizontalRule(); Gl.BeginHorizontal(); { Gl.Label("Save Log:", Gl.ExpandWidth(false)); outputPath = Gl.TextField(outputPath); } Gl.EndHorizontal(); Gl.BeginHorizontal(); { if (Gl.Button("Save")) { PrintLog(); } if (Gl.Button("Close")) { Close(); } } Gl.EndHorizontal(); }
protected override void DoSpecializedGUI() { GUILayout.BeginHorizontal(); GUILayout.Label(string.Format("Text (Length: {0})", m_Text.Length), Styles.BoldLabel); GUILayout.Label(m_Text, Styles.BoldLabel); GUILayout.EndHorizontal(); m_GUIText = GUILayout.TextField(m_GUIText, Styles.BoldTextField); if (Configuration.Instance.OldInputEnabled == false) { GUILayout.Label("Old Input Disabled", Styles.BoldLabel); return; } m_KeysScrollPosition = GUILayout.BeginScrollView(m_KeysScrollPosition); foreach (var key in m_Keys) { var k = key.Value; if (k.keyCounter == 0 || k.keyDown == 0 || k.keyUp == 0) { continue; } GUILayout.Label(string.Format("{0} down - {1}, up - {2}, counter - {3}", key.Key, k.keyDown, k.keyUp, k.keyCounter), Styles.BoldLabel); } GUILayout.EndScrollView(); }
private void DrawSearchResult() { if (searchTypeList == null || searchTypeList.Count < 1) { return; } scrollRect = GL.BeginScrollView(scrollRect, "box"); searchTypeList.ForEach((t) => { DrawScript(t); GL.Space(5); }); GL.EndScrollView(); }
private void OnGUI() { if (!File.Exists(PackageFilePath)) { EGL.HelpBox("暂无数据", MessageType.Warning); return; } GUI.skin.label.richText = true; scrollRect = GL.BeginScrollView(scrollRect, "box"); DrawDatas(); GL.EndScrollView(); }
private void OnGUI() { if (!Application.isPlaying) { EGL.HelpBox("未运行", MessageType.Warning); return; } GUI.skin.label.richText = true; scrollRect = GL.BeginScrollView(scrollRect, "box"); DrawAssurer(ABManager.Instance); DrawAssurer(ResManager.Instance); DrawAssurer(NetAssetManager.Instance); GL.EndScrollView(); }
private void OnGUI() { GUI.skin.label.richText = true; if (GL.Button("Search Can Execute Script")) { searchScript = true; DoSearch(); } if (searchScript == true) { DrawSearchResult(); } if (focusFileName.IsNullOrEmpty()) { DrawDragSpace(); } else { GL.Space(5); GL.BeginVertical("box"); GL.Label(string.Format("FocusFileName : {0}", focusFileName), EditorStyles.boldLabel); GL.Label(string.Format("FocusFileType : {0}", focusFileType.ToString()), EditorStyles.boldLabel); GL.Label(string.Format("FocusFilePath : {0}", focusFilePath), EditorStyles.boldLabel); focusFileRect = GL.BeginScrollView(focusFileRect, "box"); if (focusFileType == QEType.CSharp) { DrawScript(GetFocusFileType(focusFileName)); } if (focusFileType == QEType.Lua) { #if LUA_KIT luaVeiwer.DrawLuaScript(focusFilePath); #else EGL.HelpBox("没有LUA_KIT环境,请查看说明", MessageType.Warning); #endif } if (GL.Button("ClearFocus")) { ClearFocusFile(); } GL.EndScrollView(); GL.EndVertical(); } }
void OnGUI() { // Settings bgColor = (Texture2D)Resources.Load("editorBgColor"); GUI.DrawTexture(new Rect(0, 0, maxSize.x, maxSize.y), bgColor, ScaleMode.StretchToFill); GUI.skin = editorSkin; GL.Label(GDbanner); scrollPosition = GL.BeginScrollView(scrollPosition); #region Other Options // Start Block blockHeader("Other Options", "AdMob, Google Play Services and etc. options.", 0); GL.BeginVertical("GroupBox"); //Admob if (GUILayout.Button("Download Admob SDK")) { Application.OpenURL("https://github.com/googleads/googleads-mobile-unity/releases"); } GL.Label("AdMob Options", EditorStyles.boldLabel); vars.admobActive = EGL.Toggle("Use Admob Ads", vars.admobActive, "Toggle"); if (vars.admobActive) { AssetDefineManager.AddCompileDefine("AdmobDef", new BuildTargetGroup[] { BuildTargetGroup.Android, BuildTargetGroup.iOS }); //Banner vars.adMobBannerID = EGL.TextField("AdMob Banner ID", vars.adMobBannerID); GL.BeginHorizontal(); GL.Label("Banner Position"); vars.bannerAdPoisiton = GL.SelectionGrid(vars.bannerAdPoisiton, bannerPositionTexts, 3, "Radio"); GL.EndHorizontal(); separator(); //Interstitial vars.adMobInterstitialID = EGL.TextField("AdMob Interstitial ID", vars.adMobInterstitialID); GL.BeginHorizontal(); GL.Label("Show Interstitial After Death Times"); vars.showInterstitialAfter = EGL.IntSlider(vars.showInterstitialAfter, 1, 25); GL.EndHorizontal(); } else if (!vars.admobActive) { AssetDefineManager.RemoveCompileDefine("AdmobDef", new BuildTargetGroup[] { BuildTargetGroup.Android, BuildTargetGroup.iOS }); } separator(); //Google Play Service if (GUILayout.Button("Download Google Play SDK")) { Application.OpenURL("https://github.com/playgameservices/play-games-plugin-for-unity"); } GL.Label("Google Play Or Game Center", EditorStyles.boldLabel); vars.googlePlayActive = EGL.Toggle("Use Leaderboard", vars.googlePlayActive, "Toggle"); if (vars.googlePlayActive) { #if UNITY_ANDROID AssetDefineManager.AddCompileDefine("GooglePlayDef", new BuildTargetGroup[] { BuildTargetGroup.Android }); #endif vars.leaderBoardID = EGL.TextField("Leaderboard ID", vars.leaderBoardID); } else if (!vars.googlePlayActive) { #if UNITY_ANDROID AssetDefineManager.RemoveCompileDefine("GooglePlayDef", new BuildTargetGroup[] { BuildTargetGroup.Android }); #endif } separator(); EditorUtility.SetDirty(vars); GL.EndVertical(); GL.EndVertical(); // End Block #endregion GL.EndScrollView(); EditorUtility.SetDirty(vars); }
public static void EndScrollView() { UGUI.EndScrollView(); }
void OnGUI() { // Settings bgColor = (Texture2D)Resources.Load("editorBgColor"); GUI.DrawTexture(new Rect(0, 0, maxSize.x, maxSize.y), bgColor, ScaleMode.StretchToFill); GUI.skin = editorSkin; GL.Label(GDbanner); scrollPosition = GL.BeginScrollView(scrollPosition); #region Shop Options // Start Block blockHeader("Shop Options", "Shop items options.", 0); if (toggles [0]) { buttons [0] = "Close"; BVS("GroupBox"); // Content Start shopItemCountController(); updateShopItems(); // Content End EditorUtility.SetDirty(vars); EV(); } else { buttons[0] = "Open"; } EV(); // End Block #endregion #region UI Options // Start Block blockHeader("UI Options", "All UI options.", 1); if (toggles[1]) { buttons[1] = "Close"; BVS("GroupBox"); // Content Start GL.Label("UI Images", "centerBoldLabel"); GL.Space(10); BV(); BH(); vars.shopCloseImage = EGL.ObjectField("ShopClose Image", vars.shopCloseImage, typeof(Sprite), false) as Sprite; vars.playButton = EGL.ObjectField("Play Button", vars.playButton, typeof(Sprite), false) as Sprite; EH(); BH(); vars.leaderboardButton = EGL.ObjectField("Leaderboard Button", vars.leaderboardButton, typeof(Sprite), false) as Sprite; vars.shopButton = EGL.ObjectField("Shop Open Button", vars.shopButton, typeof(Sprite), false) as Sprite; EH(); BH(); vars.homeButton = EGL.ObjectField("Home Button", vars.homeButton, typeof(Sprite), false) as Sprite; vars.rateButton = EGL.ObjectField("Rate Button", vars.rateButton, typeof(Sprite), false) as Sprite; EH(); BH(); vars.soundOnButton = EGL.ObjectField("Sound On Button", vars.soundOnButton, typeof(Sprite), false) as Sprite; vars.soundOffButton = EGL.ObjectField("Sound Off Button", vars.soundOffButton, typeof(Sprite), false) as Sprite; EH(); BH(); vars.retryBtnImg = EGL.ObjectField("Retry Button", vars.retryBtnImg, typeof(Sprite), false) as Sprite; vars.adsBtnImg = EGL.ObjectField("Ads Btn", vars.adsBtnImg, typeof(Sprite), false) as Sprite; EH(); BH(); vars.titleImage = EGL.ObjectField("Title Image", vars.titleImage, typeof(Sprite), false) as Sprite; vars.noAdsImage = EGL.ObjectField("NoAds Image", vars.noAdsImage, typeof(Sprite), false) as Sprite; EH(); BH(); vars.gameOverImg = EGL.ObjectField("GameOver Title Img", vars.gameOverImg, typeof(Sprite), false) as Sprite; vars.shareImage = EGL.ObjectField("Share Image", vars.shareImage, typeof(Sprite), false) as Sprite; EH(); BH(); vars.giftBtnImg = EGL.ObjectField("Gift Btn", vars.giftBtnImg, typeof(Sprite), false) as Sprite; vars.starImg = EGL.ObjectField("Star Image", vars.starImg, typeof(Sprite), false) as Sprite; EH(); BH(); vars.cloudImg = EGL.ObjectField("Cloud Image", vars.cloudImg, typeof(Texture), false) as Texture; vars.backgroundImg = EGL.ObjectField("Background Image", vars.backgroundImg, typeof(Texture), false) as Texture; EH(); EV(); separator(); GL.Label("UI Texts", "centerBoldLabel"); GL.Space(10); BVS("GroupBox"); GL.Label("Game Over Score Text :"); vars.gameOverScoreTextColor = EGL.ColorField("Color", vars.gameOverScoreTextColor); GL.Label("Game Over Best Score Text :"); vars.gameOverBestScoreTextColor = EGL.ColorField("Color", vars.gameOverBestScoreTextColor); EV(); GL.Space(10); BVS("GroupBox"); GL.Label("GameMenu Star Text :"); vars.gameMenuStarTextColor = EGL.ColorField("Color", vars.gameMenuStarTextColor); GL.Label("ShopMenu Star Text :"); vars.shopMenuStarTextColor = EGL.ColorField("Color", vars.shopMenuStarTextColor); EV(); GL.Space(5); BVS("GroupBox"); GL.Label("In Game Score Text :"); vars.inGameScoreTextColor = EGL.ColorField("Color", vars.inGameScoreTextColor); GL.Label("Gift Reward Text :"); vars.giftRewardTextColor = EGL.ColorField("Color", vars.giftRewardTextColor); EV(); separator(); GL.Label("UI Fonts", "centerBoldLabel"); GL.Space(10); vars.mainFont = EGL.ObjectField("Main Font", vars.mainFont, typeof(Font), false) as Font; vars.secondFont = EGL.ObjectField("Second Font", vars.secondFont, typeof(Font), false) as Font; // Content End EditorUtility.SetDirty(vars); EV(); } else { buttons[1] = "Open"; } EV(); // End Block #endregion #region Sound Options // Start Block blockHeader("Sound Options", "Sound & Music options.", 2); if (toggles [2]) { buttons [2] = "Close"; BVS("GroupBox"); // Content Start vars.buttonSound = EGL.ObjectField("Button Sound", vars.buttonSound, typeof(AudioClip), false) as AudioClip; vars.starSound = EGL.ObjectField("Star Sound", vars.starSound, typeof(AudioClip), false) as AudioClip; vars.backgroundMusic = EGL.ObjectField("Background Music", vars.backgroundMusic, typeof(AudioClip), false) as AudioClip; vars.jumpSound = EGL.ObjectField("Jump Sound", vars.jumpSound, typeof(AudioClip), false) as AudioClip; vars.deathSound = EGL.ObjectField("Death Sound", vars.deathSound, typeof(AudioClip), false) as AudioClip; // Content End EditorUtility.SetDirty(vars); EV(); } else { buttons[2] = "Open"; } EV(); // End Block #endregion #region Other Options // Start Block blockHeader("Other Options", "AdMob, Google Play Services and etc. options.", 4); if (toggles [4]) { buttons[4] = "Close"; GL.BeginVertical("GroupBox"); //Admob if (GUILayout.Button("Download Admob SDK")) { Application.OpenURL("https://github.com/googleads/googleads-mobile-unity/releases"); } GL.Label("AdMob Options", EditorStyles.boldLabel); GL.BeginHorizontal(); GL.Label("Show Interstitial After Death Times"); vars.showInterstitialAfter = EGL.IntSlider(vars.showInterstitialAfter, 1, 25); GL.EndHorizontal(); vars.admobActive = EGL.Toggle("Use Admob Ads", vars.admobActive, "Toggle"); if (vars.admobActive) { AssetDefineManager.AddCompileDefine("AdmobDef", new BuildTargetGroup[] { BuildTargetGroup.Android, BuildTargetGroup.iOS }); //Admob App ID vars.admobAppID = EGL.TextField("AdMob App ID", vars.admobAppID); separator(); //Banner vars.adMobBannerID = EGL.TextField("AdMob Banner ID", vars.adMobBannerID); GL.BeginHorizontal(); GL.Label("Banner Position"); vars.bannerAdPoisiton = GL.SelectionGrid(vars.bannerAdPoisiton, bannerPositionTexts, 3, "Radio"); GL.EndHorizontal(); separator(); //Interstitial vars.adMobInterstitialID = EGL.TextField("AdMob Interstitial ID", vars.adMobInterstitialID); } else if (!vars.admobActive) { AssetDefineManager.RemoveCompileDefine("AdmobDef", new BuildTargetGroup[] { BuildTargetGroup.Android, BuildTargetGroup.iOS }); } separator(); //Google Play Service if (GUILayout.Button("Download Google Play SDK")) { Application.OpenURL("https://github.com/playgameservices/play-games-plugin-for-unity"); } GL.Label("Google Play Or Game Center", EditorStyles.boldLabel); vars.googlePlayActive = EGL.Toggle("Use Leaderboard", vars.googlePlayActive, "Toggle"); if (vars.googlePlayActive) { #if UNITY_ANDROID AssetDefineManager.AddCompileDefine("GooglePlayDef", new BuildTargetGroup[] { BuildTargetGroup.Android }); #endif vars.leaderBoardID = EGL.TextField("Leaderboard ID", vars.leaderBoardID); } else if (!vars.googlePlayActive) { #if UNITY_ANDROID AssetDefineManager.RemoveCompileDefine("GooglePlayDef", new BuildTargetGroup[] { BuildTargetGroup.Android }); #endif } separator(); //Unity IAP GL.Label("Unity IAP", EditorStyles.boldLabel); GL.Label("Activate UnityIAP from Services Window", EditorStyles.label); vars.unityIAP = EGL.Toggle("Use UnityIAP", vars.unityIAP, "Toggle"); if (vars.unityIAP) { AssetDefineManager.AddCompileDefine("UnityIAP", new BuildTargetGroup[] { BuildTargetGroup.Android }); } else if (!vars.unityIAP) { AssetDefineManager.RemoveCompileDefine("UnityIAP", new BuildTargetGroup[] { BuildTargetGroup.Android }); } separator(); GL.Label("Other Options", EditorStyles.boldLabel); //facebook page GL.BeginHorizontal(); GL.Label("Facebook Page", GL.Width(100f)); vars.facebookPage = EGL.TextArea(vars.facebookPage, GL.Height(25f)); GL.EndHorizontal(); GL.Space(15f); //Rate Url GL.BeginHorizontal(); GL.Label("Rate Button Url", GL.Width(100f)); vars.rateButtonUrl = EGL.TextArea(vars.rateButtonUrl, GL.Height(25f)); GL.EndHorizontal(); GL.Space(15f); separator(); // EditorUtility.SetDirty(vars); GL.EndVertical(); } else { buttons[4] = "Open"; } GL.EndVertical(); // End Block #endregion GL.EndScrollView(); EditorUtility.SetDirty(vars); try{ liveUpdate(); }catch (Exception e) {} }
void OnGUI() { // Settings bgColor = (Texture2D)Resources.Load("editorBgColor"); GUI.DrawTexture(new Rect(0, 0, maxSize.x, maxSize.y), bgColor, ScaleMode.StretchToFill); GUI.skin = editorSkin; GL.Label(GDbanner); scrollPosition = GL.BeginScrollView(scrollPosition); #region UI Options blockHeader("UI Options", "All UI options.", 0); if (toggles[0]) { buttons[0] = "Close"; BVS("GroupBox"); //0 // Content Start GL.Label("UI Images", "centerBoldLabel"); GL.Space(10); BV(); //1 BH(); vars.buttonGui = (Sprite)EGL.ObjectField("Button GUI", vars.buttonGui, typeof(Sprite), false); vars.leaderboardIcon = (Sprite)EGL.ObjectField("Leaderboard Icon", vars.leaderboardIcon, typeof(Sprite), false); EH(); BH(); vars.rateIcon = (Sprite)EGL.ObjectField("Rate Icon", vars.rateIcon, typeof(Sprite), false); vars.facebookIcon = (Sprite)EGL.ObjectField("Facebook Icon", vars.facebookIcon, typeof(Sprite), false); EH(); BH(); vars.soundOnIcon = (Sprite)EGL.ObjectField("Sound On Icon", vars.soundOnIcon, typeof(Sprite), false); vars.soundOffIcon = (Sprite)EGL.ObjectField("Sound Off Icon", vars.soundOffIcon, typeof(Sprite), false); EH(); BH(); vars.playButton = (Sprite)EGL.ObjectField("Play Button", vars.playButton, typeof(Sprite), false); vars.bronzeMedal = (Sprite)EGL.ObjectField("Bronze", vars.bronzeMedal, typeof(Sprite), false); EH(); BH(); vars.silverMedal = (Sprite)EGL.ObjectField("Silver", vars.silverMedal, typeof(Sprite), false); vars.GoldMedal = (Sprite)EGL.ObjectField("Gold", vars.GoldMedal, typeof(Sprite), false); EH(); EV(); //1 separator(); GL.Label("UI Texts", "centerBoldLabel"); GL.Space(10); BVS("GroupBox"); //2 GL.Label("Main Menu"); vars.shareBtnText = EGL.TextField("ShareText", vars.shareBtnText); vars.shareTextColor = EGL.ColorField("ShareTextColor", vars.shareTextColor); vars.bestTextColor = EGL.ColorField("BestTextColor", vars.bestTextColor); vars.scoreTextColor = EGL.ColorField("ScoreTextColor", vars.scoreTextColor); vars.inGameScoreTextColor = EGL.ColorField("InGameScoreTextColor", vars.inGameScoreTextColor); vars.gameTitleText = EGL.TextField("GameTitleText", vars.gameTitleText); vars.gameTitleColor = EGL.ColorField("GameTitleColor", vars.gameTitleColor); EV(); //2 separator(); GL.Label("UI Fonts", "centerBoldLabel"); GL.Space(10); vars.gameFont = EGL.ObjectField("Game Font", vars.gameFont, typeof(Font), false) as Font; // Content End EditorUtility.SetDirty(vars); EV(); //0 } else { buttons[0] = "Open"; } EV(); #endregion #region Sound Options blockHeader("Sound Options", "Sound & Music options.", 1); if (toggles[1]) { buttons[1] = "Close"; BVS("GroupBox"); // Content Start vars.buttonSound = EGL.ObjectField("Button Sound", vars.buttonSound, typeof(AudioClip), false) as AudioClip; vars.jumpSound = EGL.ObjectField("Jump Sound", vars.jumpSound, typeof(AudioClip), false) as AudioClip; vars.gameOverSound = EGL.ObjectField("GameOver Sound", vars.gameOverSound, typeof(AudioClip), false) as AudioClip; vars.hiScore = EGL.ObjectField("HiScore Sound", vars.hiScore, typeof(AudioClip), false) as AudioClip; // Content End EditorUtility.SetDirty(vars); EV(); } else { buttons[1] = "Open"; } EV(); // End Block #endregion #region Other Options // Start Block blockHeader("Other Options", "AdMob, Google Play Services and etc. options.", 2); if (toggles[2]) { buttons[2] = "Close"; GL.BeginVertical("GroupBox"); //Admob GL.Label("AdMob Options", EditorStyles.boldLabel); //Banner vars.adMobBannerID = EGL.TextField("AdMob Banner ID", vars.adMobBannerID); GL.BeginHorizontal(); GL.Label("Banner Position"); vars.bannerAdPoisiton = GL.SelectionGrid(vars.bannerAdPoisiton, bannerPositionTexts, 3, "Radio"); GL.EndHorizontal(); separator(); //Interstitial vars.adMobInterstitialID = EGL.TextField("AdMob Interstitial ID", vars.adMobInterstitialID); GL.BeginHorizontal(); GL.Label("Show Interstitial After Death Times"); vars.showInterstitialAfter = EGL.IntSlider(vars.showInterstitialAfter, 1, 25); GL.EndHorizontal(); separator(); //Google Play Service GL.Label("Google Play Or Game Center", EditorStyles.boldLabel); vars.leaderBoardID = EGL.TextField("Leaderboard ID", vars.leaderBoardID); separator(); GL.Label("Other Options", EditorStyles.boldLabel); //Rate Url GL.BeginHorizontal(); GL.Label("Rate Button Url", GL.Width(100f)); vars.rateButtonUrl = EGL.TextArea(vars.rateButtonUrl, GL.Height(50f)); GL.EndHorizontal(); GL.Space(15f); //Facebook Url GL.BeginHorizontal(); GL.Label("FB Page Url", GL.Width(100f)); vars.facebookBtnUrl = EGL.TextArea(vars.facebookBtnUrl, GL.Height(50f)); GL.EndHorizontal(); GL.Space(15f); separator(); EditorUtility.SetDirty(vars); GL.EndVertical(); } else { buttons[2] = "Open"; } GL.EndVertical(); // End Block #endregion GL.EndScrollView(); EditorUtility.SetDirty(vars); try { liveUpdate(); } catch (Exception e) { } }
protected override void CloseScope() { GUILayout.EndScrollView(this.handleScrollWheel); }