示例#1
0
    protected void Init()
    {
        id = SHGUI.GetId();

        children = new List <SHGUIview> ();

        fadingIn = true;
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        //Application.targetFrameRate = 60;
        //TextManager.DisplaySUPERHOTBatch();
        current = this;

        display         = new char[resolutionX * resolutionY];
        color           = new char[resolutionX * resolutionY];
        background      = new char[resolutionX * resolutionY];
        backgroundColor = new char[resolutionX * resolutionY];

        Clear();

        //InitSounds();

        Shader.WarmupAllShaders();
    }
        public void OnGUI()
        {
            if (DEBUG_GUI == false)
            {
                return;
            }

            int basePosX = 900;

            SHGUI gui = SHGUI.current;

            if (gui == null)
            {
                GUI.Label(new Rect(basePosX, 0, 100, 25), "No gui");
            }
            else
            {
                GUI.Label(new Rect(basePosX, 0, 400, 25), gui.GetType().Name + " (" + gui.name + ")");

                SHGUIview guiInter = gui.GetInteractableView();

                if (guiInter == null)
                {
                    GUI.Label(new Rect(basePosX, 25, 100, 25), "No view");
                }
                else
                {
                    GUI.Label(new Rect(basePosX, 25, 400, 25), guiInter.GetType().Name);

                    if (guiInter is SHGUIcommanderview)
                    {
                        SHGUIcommanderview guiComm = (SHGUIcommanderview)guiInter;

                        int i = 0;
                        foreach (SHGUIcommanderbutton but in guiComm.buttons)
                        {
                            GUI.Label(new Rect(basePosX, 50 + i++ *25, 400, 25), but.ButtonText + " (" + but.IsLocked + ")");
                        }
                    }
                }
            }
        }