当前位置: 首页>>代码示例>>C#>>正文


C# UIPopupList类代码示例

本文整理汇总了C#中UIPopupList的典型用法代码示例。如果您正苦于以下问题:C# UIPopupList类的具体用法?C# UIPopupList怎么用?C# UIPopupList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UIPopupList类属于命名空间,在下文中一共展示了UIPopupList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnInit

    public override void OnInit()
    {
        base.OnInit();
        m_ObjOptionalRoot = FindChild("OptionalRoot");
        m_ObjOptionalTemplate = FindChild("OptionalTextureTemplate");
        m_OptionalMap = new Dictionary<string, RegularityOptionalElement>();
        m_UICamera = WindowManager.Instance.GetUICamera();
        m_ObjWinRoot = FindChild("Win");
        m_ObjLoseRoot = FindChild("Lose");
        m_PopList = FindChildComponent<UIPopupList>("PopupList");
        m_ButtonRoot = FindChild("ButtonRoot");
        m_Grid = m_ObjOptionalRoot.GetComponent<UIGrid>();
        m_LabelLeftTime = FindChildComponent<UILabel>("Label_LeftTime");
        m_LabelLeftCount = FindChildComponent<UILabel>("Label_LeftCount");
        m_FlowerList = new List<GameObject>();

        for (int i = 0; i < 3; ++i)
        {
            var obj = FindChild("Flower"+i);
            m_FlowerList.Add(obj);
        }

        AddChildElementClickEvent(OnClickReset, "UIButton_ResetElem");
        AddChildElementClickEvent(OnClickResetById, "UIButton_Reset");
        AddChildElementClickEvent(OnClickBack, "UIButton_BackElem");
        AddChildElementClickEvent(OnClickBack, "UIButton_Back");
        AddChildElementClickEvent(OnClickBack, "Button_Exit");

        m_ObjLoseRoot.SetActive(false);
        m_ObjWinRoot.SetActive(false);
        m_ButtonRoot.SetActive(false);

    }
开发者ID:Blizzardx,项目名称:ClientFrameWork,代码行数:33,代码来源:UIWindowRegularity.cs

示例2: Start

	void Start ()
	{
		mList = GetComponent<UIPopupList>();
		UpdateList();
		mList.eventReceiver = gameObject;
		mList.functionName = "OnLanguageSelection";
	}
开发者ID:elainerezende,项目名称:Hearthstone,代码行数:7,代码来源:LanguageSelection.cs

示例3: Start

 private void Start()
 {
     this.mList = base.GetComponent<UIPopupList>();
     this.UpdateList();
     this.mList.eventReceiver = base.gameObject;
     this.mList.functionName = "OnLanguageSelection";
 }
开发者ID:HexHash,项目名称:LegacyRust,代码行数:7,代码来源:LanguageSelection.cs

示例4: Awake

	/// <summary>
	/// Cache the components and register a listener callback.
	/// </summary>

	void Awake ()
	{
		mList = GetComponent<UIPopupList>();
		mCheck = GetComponent<UICheckbox>();
		if (mList != null) mList.onSelectionChange += SaveSelection;
		if (mCheck != null) mCheck.onStateChange += SaveState;
	}
开发者ID:w405229619,项目名称:The-revenge-of-DaNiu,代码行数:11,代码来源:UISavedOption.cs

示例5: InitializeValuesAndReferences

    private void InitializeValuesAndReferences() {
        var uSizePopup = gameObject.GetSafeFirstMonoBehaviourInChildren<GuiUniverseSizePopupList>();
        _universeSizePopupList = uSizePopup.gameObject.GetSafeMonoBehaviour<UIPopupList>();

        PopulateAIPlayerFolderLookup();

        EventDelegate.Add(_universeSizePopupList.onChange, OnUniverseSizeSelectionChanged);
    }
开发者ID:Maxii,项目名称:CodeEnv.Master,代码行数:8,代码来源:ActiveAIPlayersManager.cs

示例6: Start

    void Start()
    {
        if (popupList == null)
            popupList = GetComponent<UIPopupList>();

        popupList.onChange.Add(new EventDelegate(this, "OnChange"));

        Invoke("Refresh", 0.02f);
    }
开发者ID:JamesKim2998,项目名称:snugdc-project-ricochet,代码行数:9,代码来源:UIMapSelector.cs

示例7: Awake

 void Awake ()
 {
     Object.DontDestroyOnLoad (GameObject.Find ("PC Packet"));
     PC = GameObject.Find ("PC Packet").GetComponent<Character> ();
     UI = GetComponent<UIController> ();
     ClassSelectList = GameObject.Find ("Class Select: List")
         .GetComponent<UIPopupList> ();
     NameInput = GameObject.Find ("Name: Input")
         .GetComponent<UIInput> ();
 }
开发者ID:Reppy-Why,项目名称:TODO,代码行数:10,代码来源:CharacterCreateController.cs

示例8: Awake

 protected override void Awake() {
     base.Awake();
     popupList = gameObject.GetSafeMonoBehaviourComponent<UIPopupList>();
     ConfigurePopupList();
     InitializeListValues();
     InitializeSelection();
     // don't receive events until initializing is complete
     EventDelegate.Add(popupList.onChange, OnPopupListSelectionChange);
     //popupList.onSelectionChange += OnPopupListSelectionChange;
 }
开发者ID:Maxii,项目名称:UnityEntry,代码行数:10,代码来源:AGuiPopupListBase.cs

示例9: Start

	// Use this for initialization
	void Start () {
		popList = GetComponent<UIPopupList>();
		if(popList == null)
			return;
		
		popList.Clear();
		List<DataTable> tableList = ConstDataManager.Instance.ListTables();
		foreach(DataTable table in tableList)
		{
			popList.AddItem(table.Name);
		}
	}
开发者ID:ivanchan2,项目名称:SRW_Project,代码行数:13,代码来源:ConstDataTest.cs

示例10: Start

	private UISlider changVolume;       //调解音量

	
	void Start()
	{
		selectMusic = transform.FindChild("SelectMusic").GetComponent<UIPopupList>();
		selectMusic.Clear();
		AudioClip[] bgMusics = Resources.LoadAll<AudioClip>("BgMusic");
		for (int i = 0; i < bgMusics.Length; i++)
		{
			selectMusic.AddItem(bgMusics[i].name);
		}
		EventDelegate.Add(selectMusic.onChange, OnMusicChange);
		changVolume = transform.FindChild("VolumeSolider").GetComponent<UISlider>();
		EventDelegate.Add(changVolume.onChange, OnChangeVolume);
	}
开发者ID:AhrenLi,项目名称:TypeWrite,代码行数:16,代码来源:SetManager.cs

示例11: Awake

    public override void Awake()
    {
        base.Awake();
        _uiPopupList = GetComponent<UIPopupList>();
        if (_uiPopupList != null)
        {
            _nativeEventReceiver = _uiPopupList.eventReceiver;
            _nativeFunctionName = _uiPopupList.functionName;

            _uiPopupList.eventReceiver = gameObject;
            _uiPopupList.functionName = "OnSelectionChange";
        }
    }
开发者ID:NateFromSpace,项目名称:Sandbox,代码行数:13,代码来源:NguiPopupListSourceBinding.cs

示例12: OnMapSelectionChange

    /// <summary>
    /// Raises the map selection change event.
    /// </summary>
    /// <param name='sender'>
    /// Poplist that called this message.
    /// </param>
    /// 
    void OnMapSelectionChange(UIPopupList sender)
    {
        // Finds map from list, with name, that equals to poplist selection
        MapData selectedMap = MidSceneObject.Instance.mapSaveCollection.maps.Find (delegate(MapData map) {
            return map.name == sender.selection;
        });

        // Remove all player labels and poplists
        for (int i = 0; i < playerLabels.Count; i++) {
            Destroy (playerLabels [i].gameObject);
            Destroy (playerRacePopLists [i].gameObject);
        }
        playerLabels.Clear ();
        playerRacePopLists.Clear ();

        if (selectedMap != null) {
            // Create label and poplist for each player in map
            for (int i = 0; i < selectedMap.players + 1; i++) {
                // Label
                UILabel newLabel = (Instantiate (lbl_player) as GameObject).GetComponent<UILabel> ();
                newLabel.name = "lbl_CPUPlayer " + i;
                newLabel.transform.parent = pnl_NewGameMenu.transform;
                newLabel.transform.localPosition = lbl_player.transform.position - new Vector3 (0, 30 * i, 0);
                newLabel.transform.localRotation = Quaternion.identity;
                newLabel.transform.localScale = lbl_player.transform.lossyScale;
                newLabel.text = (i == 0) ? "Human Player" : "Opponent" + i;
                playerLabels.Add (newLabel);
                // PopList
                UIPopupList newPopList = (Instantiate (poplst_PlayerRace) as GameObject).GetComponent<UIPopupList> ();
                newPopList.name = "poplst_CPUPlayer " + i;
                newPopList.transform.parent = pnl_NewGameMenu.transform;
                newPopList.transform.localPosition = poplst_PlayerRace.transform.position - new Vector3 (0, 30 * i, 0);
                newPopList.transform.localRotation = Quaternion.identity;
                newPopList.transform.localScale = poplst_PlayerRace.transform.lossyScale;
                newPopList.items = MidSceneObject.Instance.raceSaveCollection.GetRacesNames ();
                newPopList.selection = newPopList.items [0];
                newPopList.eventReceiver = gameObject;
                playerRacePopLists.Add (newPopList);
            }
            // Human Player name/text correction
            playerLabels [0].name = "lbl_HumanPlayer";
            playerLabels [0].text = "Human Player";
            playerRacePopLists [0].name = "poplst_HumanPlayer";
            // Neutral Player name/text correction
            playerLabels [1].name = "lbl_NeutralPlayer";
            playerLabels [1].text = "Neutral Player";
            playerRacePopLists [1].name = "poplst_NeutralPlayer";
        }
    }
开发者ID:mrimsh,项目名称:InsectsDominance,代码行数:56,代码来源:Menu.cs

示例13: Start

	void Start ()
	{
		mList = GetComponent<UIPopupList>();

		if (Localization.knownLanguages != null)
		{
			mList.items.Clear();

			for (int i = 0, imax = Localization.knownLanguages.Length; i < imax; ++i)
				mList.items.Add(Localization.knownLanguages[i]);

			mList.value = Localization.language;
		}
		EventDelegate.Add(mList.onChange, OnChange);
	}
开发者ID:gitunit,项目名称:Space-Sketchr,代码行数:15,代码来源:LanguageSelection.cs

示例14: Start

    void Start()
    {
        if ( modeParent == null
            || modePrfs == null)
        {
            Debug.LogError("Missing component!");
            return;
        }

        if (popupList == null)
            popupList = GetComponent<UIPopupList>();

        popupList.onChange.Add(new EventDelegate(this, "OnChange"));

        Refresh();
    }
开发者ID:JamesKim2998,项目名称:snugdc-project-ricochet,代码行数:16,代码来源:UIModeSelector.cs

示例15: Start

 private void Start()
 {
     this.mList = base.GetComponent<UIPopupList>();
     if (Localization.knownLanguages != null)
     {
         this.mList.items.Clear();
         int i = 0;
         int num = Localization.knownLanguages.Length;
         while (i < num)
         {
             this.mList.items.Add(Localization.knownLanguages[i]);
             i++;
         }
         this.mList.value = Localization.language;
     }
     EventDelegate.Add(this.mList.onChange, new EventDelegate.Callback(this.OnChange));
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:17,代码来源:LanguageSelection.cs


注:本文中的UIPopupList类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。