Esempio n. 1
0
    void OnGUI()
    {
        gui_init();

        var swh = Screen.width / 2;
        var bottom_button_height = ScreenDef.GetRealSize(80);

        if (m_show)
        {
            GUI.skin = m_skin;
            GUILayout.BeginArea(new Rect(0, 0, Screen.width, Screen.height - bottom_button_height));
            m_pos = GUILayout.BeginScrollView(m_pos);
            {
                GUILayout.Label(LogHandler.GetBuffer(true));
            }
            GUILayout.EndScrollView();
            GUILayout.EndArea();
        }
        if (GUI.Button(new Rect(0, Screen.height - bottom_button_height, swh, bottom_button_height), "HIDE/SHOW"))
        {
            m_show = !m_show;
        }
        if (GUI.Button(new Rect(swh, Screen.height - bottom_button_height, swh, bottom_button_height), "DEBUG MENU"))
        {
            SceneManager.LoadScene("dbgMenu");
        }
    }
Esempio n. 2
0
    private void gui_init()
    {
        if (m_bGuiFirstDone)
        {
            return;
        }
        m_bGuiFirstDone = true;

        m_skin = (GUISkin)Object.Instantiate(GUI.skin);
        m_skin.label.fontSize  = (int)ScreenDef.GetRealSize(32);
        m_skin.button.fontSize = (int)ScreenDef.GetRealSize(32);
    }
Esempio n. 3
0
    void gui_init()
    {
        if (m_bGuiInitDone)
        {
            return;
        }
        m_bgimg = Resources.Load <Texture2D>("GUI/black8x8");

        m_skin = GUI.skin;
        m_skin.scrollView.normal.background = m_bgimg;
        m_skin.label.fontSize = (int)ScreenDef.GetRealSize(32);
    }
Esempio n. 4
0
 public MyItem(SynSession doc, ScreenDef screenDef)
 {
     Doc       = doc;
     ScreenDef = screenDef;
 }