Beispiel #1
0
        public static void SetActive(bool b)
        {
            bool show = DecorationMaster.instance.Settings.showDesc;

            if (b)
            {
                panel.SetActive(true, show);
            }
            else
            {
                panel.SetActive(false, true);
            }
        }
Beispiel #2
0
        private static void HideClicked(string btn)
        {
            //Logger.LogDebug("Hide Desc");
            desc_panel.SetActive(!desc_panel.active, true);

            panel.GetButton("hide").UpdateText(desc_panel.active ? "<" : ">");
            DecorationMaster.instance.Settings.showDesc = desc_panel.active;
        }
        public ErrorPanel(string msg)
        {
            GUIController.Instance.LoadResources();
            var canvas = new GameObject();

            canvas.AddComponent <Canvas>().renderMode = RenderMode.ScreenSpaceOverlay;
            CanvasScaler scaler = canvas.AddComponent <CanvasScaler>();

            scaler.uiScaleMode         = CanvasScaler.ScaleMode.ScaleWithScreenSize;
            scaler.referenceResolution = new Vector2(1920f, 1080f);
            canvas.AddComponent <GraphicRaycaster>();
            panel = new CanvasPanel(canvas, new Texture2D(1, 1), new Vector2(0, 0), Vector2.zero, new Rect(0, 0, 1, 1));
            panel.AddText("Desc", $"DecorationMaster Load Json data Error:\n{msg}", new Vector2(300, 0), Vector2.zero, GUIController.Instance.arial, 28);
            panel.SetActive(true, true);

            Logger.LogError(msg);
        }
Beispiel #4
0
 public static void SetActive(bool b)
 {
     panel.SetActive(b, true);
     UnFocus();
     DescriptionPanel.SetActive(b);
 }