//****************************************************************************************************
    //
    //****************************************************************************************************

    public void Awake()
    {
        if (m_instance == null)
        {
            m_instance = this;
        }

        m_group = GetComponent <CanvasGroup>();

        GameObject root = gameObject;

        GameObject content = CORE.HIERARCHY.Find(root, "Content");

        GameObject buts = CORE.HIERARCHY.Find(root, "Buttons");

        m_coordsSys = CORE.HIERARCHY.FindComp <UnityEngine.UI.Dropdown>(content, "COORDS_SYS");

        m_RESET = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "RESET"));

        m_CANCEL = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "CANCEL"));

        m_OK = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "OK"));



        if (m_coordsSys != null)
        {
            m_coordsSys.onValueChanged.RemoveAllListeners();

            m_coordsSys.onValueChanged.AddListener(delegate { OnValueChanged(m_coordsSys); });
        }

        for (int col = 0; col < ( int )CSV.COL.NB; ++col)
        {
            int dropDown = col;

            m_dropDowns[col] = CORE.HIERARCHY.FindComp <UnityEngine.UI.Dropdown>(content, ((CSV.COL)col).ToString());

            if (m_dropDowns[col] != null)
            {
                m_dropDowns[col].onValueChanged.RemoveAllListeners();

                m_dropDowns[col].onValueChanged.AddListener(delegate { OnValueChanged(dropDown); });
            }
        }


        m_RESET.SetListener(delegate { OnRESET(); });

        m_CANCEL.SetListener(delegate { OnCANCEL(); });

        m_OK.SetListener(delegate { OnOK(); });


        m_fade.Begin(FADE_TYPE.FADE_OUT, 0.0f);

        gameObject.SetActive(false);
    }
Beispiel #2
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    public void Awake()
    {
        if (m_instance == null)
        {
            m_instance = this;
        }

        m_group = GetComponent <CanvasGroup>();

        GameObject root = gameObject;

        GameObject buts = CORE.HIERARCHY.Find(root, "Buttons");

        m_content = CORE.HIERARCHY.Find(root, "Content");

        m_title = CORE.HIERARCHY.FindComp <UnityEngine.UI.Text>(root, "Title");

        m_name = CORE.HIERARCHY.FindComp <UnityEngine.UI.InputField>(m_content, "Name");

        m_lat = CORE.HIERARCHY.FindComp <UnityEngine.UI.InputField>(m_content, "Lat");

        m_lng = CORE.HIERARCHY.FindComp <UnityEngine.UI.InputField>(m_content, "Lng");

        m_desc = CORE.HIERARCHY.FindComp <UnityEngine.UI.InputField>(m_content, "Desc");

        m_sites = CORE.HIERARCHY.FindComp <UnityEngine.UI.Dropdown>(m_content, "Site");

        m_pic = CORE.HIERARCHY.FindComp <UnityEngine.UI.RawImage>(m_content, "Picture");

        m_CANCEL = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "CANCEL"));

        m_DELETE = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "DELETE"));

        m_OK = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "OK"));

        m_picNotFound = Resources.Load <Texture>("2D/UI/picture_not_found");


        m_CANCEL.SetListener(delegate { OnCANCEL(); });

        m_DELETE.SetListener(delegate { OnDELETE(); });

        m_OK.SetListener(delegate { OnOK(); });


        m_fade.Begin(FADE_TYPE.FADE_OUT, 0.0f);

        gameObject.SetActive(false);
    }
Beispiel #3
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    public void Awake()
    {
        if (m_instance == null)
        {
            m_instance = this;
        }

        m_group = GetComponent <CanvasGroup>();

        GameObject root = GameObject.Find("POPUPOptions");

        GameObject buts = CORE.HIERARCHY.Find(root, "Butons");

        m_title = CORE.HIERARCHY.FindComp <UnityEngine.UI.Text>(root, "Title");

        m_server = CORE.HIERARCHY.FindComp <UnityEngine.UI.InputField>(root, "ServerAdr");

        m_RESET = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "RESET"));

        m_CANCEL = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "CANCEL"));

        m_OK = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "OK"));


        m_RESET.SetListener(delegate { OnRESET(); });

        m_CANCEL.SetListener(delegate { OnCANCEL(); });

        m_OK.SetListener(delegate { OnOK(); });


        if (m_title != null)
        {
            m_title.text = "OPTIONS";
        }

        m_fade.Begin(FADE_TYPE.FADE_OUT, 0.0f);

        gameObject.SetActive(false);
    }
Beispiel #4
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    public void Awake()
    {
        if (m_instance == null)
        {
            m_instance = this;
        }

        m_group = GetComponent <CanvasGroup>();

        GameObject root = gameObject;

        GameObject buts = CORE.HIERARCHY.Find(root, "Buttons");

        GameObject GRPFilter = CORE.HIERARCHY.Find(root, "GRPFilter");

        GameObject GRPDirectory = CORE.HIERARCHY.Find(root, "GRPDirectory");

        GameObject GRPFilename = CORE.HIERARCHY.Find(root, "GRPFilename");


        m_title = CORE.HIERARCHY.FindComp <UnityEngine.UI.Text>(root, "Title");

        m_inputFilter = CORE.HIERARCHY.FindComp <UnityEngine.UI.InputField>(GRPFilter, "Filter");

        m_inputDirectory = CORE.HIERARCHY.FindComp <UnityEngine.UI.InputField>(GRPDirectory, "Directory");

        m_inputFilename = CORE.HIERARCHY.FindComp <UnityEngine.UI.InputField>(GRPFilename, "Filename");

        m_lockFilter = CORE.HIERARCHY.FindComp <UnityEngine.UI.RawImage>(GRPFilter, "LockIcon");

        m_lockDirectory = CORE.HIERARCHY.FindComp <UnityEngine.UI.RawImage>(GRPDirectory, "LockIcon");

        m_lockFilename = CORE.HIERARCHY.FindComp <UnityEngine.UI.RawImage>(GRPFilename, "LockIcon");

        m_CANCEL = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "CANCEL"));

        m_OK = new CORE.UIButton(CORE.HIERARCHY.FindComp <UnityEngine.UI.Button>(buts, "OK"));

        m_items = new UIItemList <UIFileListItem>(gameObject, "Scroll View", "Viewport", "Content", "Scrollbar Vertical", "2D/UI/FileListItem", OnListItemSelection);


        m_CANCEL.SetListener(delegate { OnCANCEL(); });

        m_OK.SetListener(delegate { OnOK(); });


        if (m_inputFilter != null)
        {
            m_inputFilter.onEndEdit.RemoveAllListeners();    m_inputFilter.onEndEdit.AddListener(delegate { OnEndEditFilter(); });
        }

        if (m_inputDirectory != null)
        {
            m_inputDirectory.onEndEdit.RemoveAllListeners(); m_inputDirectory.onEndEdit.AddListener(delegate { OnEndEditDirectory(); });
        }

        if (m_inputFilename != null)
        {
            m_inputFilename.onEndEdit.RemoveAllListeners();  m_inputFilename.onEndEdit.AddListener(delegate { OnEndEditFilename(); });
        }


        m_fade.Begin(FADE_TYPE.FADE_OUT, 0.0f);

        gameObject.SetActive(false);
    }