Exemplo n.º 1
0
 void ReNewDraft()
 {
     _uDraft          = new UnitLatest();
     _uDraft._texture = scrollViewImgContent.texture as Texture2D;
     if (_imgProvider.GetTexture2D() == _uDraft._texture)
     {
         _uDraft._url = _imgProvider.GetCurrentUrl();
     }
     else if (_unitProvider.GetTexture2D() == _uDraft._texture)
     {
         _uDraft._url = _unitProvider.GetCurrentUrl();
     }
     // TODO: else, throw exception
 }
Exemplo n.º 2
0
    public void OnBtnDelDdnImg()
    {
        // delete cur sel hDDN img if not "--"
        if (homeDDN.options[homeDDN.value].text == "--")
        {
            return;
        }
        string dkey = homeDDN.options[homeDDN.value].text;
        string dUrl = _imgProvider.GetUrlDict()[dkey];
        string uUrl = _unitProvider.GetCurrentUrl();

        // do not let if latest unit url the same
        if (dUrl == uUrl)
        {
            return;
        }

        TxtDelImgName.text       = homeDDN.options[homeDDN.value].text;
        TxtMsgImgDelConfirm.text = homeDDN.options[homeDDN.value].text;
        DialogPanels.gameObject.SetActive(true);
        DeleteImgPanel.gameObject.SetActive(true);
        DelDecisionPanel.gameObject.SetActive(true);
    }