• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# UIPopupList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Start

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

		if (Localization.instance != null && Localization.instance.languages != null && Localization.instance.languages.Length > 0)
		{
			mList.items.Clear();

			for (int i = 0, imax = Localization.instance.languages.Length; i < imax; ++i)
			{
				TextAsset asset = Localization.instance.languages[i];
				if (asset != null) mList.items.Add(asset.name);
			}
			mList.value = Localization.instance.currentLanguage;
		}
		EventDelegate.Add(mList.onChange, OnChange);
	}
开发者ID:Bandyman,项目名称:GameJam_Develop2014,代码行数:17,代码来源:LanguageSelection.cs


示例17: Start

	private UIToggle isContinue;		//是否继续上次游戏

	void Start()
	{
		nameInput = transform.FindChild("NameInput/Label").GetComponent<UILabel>();
		//下拉菜单
		selectPattern = transform.FindChild("SelcetStyle").GetComponent<UIPopupList>();
		selectPattern.Clear();
		string[] patterns = System.Enum.GetNames(typeof(GamePattern));
		for (int i = 0; i < patterns.Length; i++)
		{
			selectPattern.AddItem(patterns[i]);
		}
		//当下拉菜单值发生变化时,通知OnPatternChange方法
		EventDelegate.Add(selectPattern.onChange, OnPatternChange);
		//单选框
		isContinue = transform.FindChild("Continue").GetComponent<UIToggle>();
		//当单选框值发生变化时,通知OnIsContinue方法
		EventDelegate.Add(isContinue.onChange, OnIsContinue);
	}
开发者ID:AhrenLi,项目名称:TypeWrite,代码行数:20,代码来源:LoginManager.cs


示例18: Start

 private void Start()
 {
     this.mList = base.GetComponent<UIPopupList>();
     if (((Localization.instance != null) && (Localization.instance.languages != null)) && (Localization.instance.languages.Length > 0))
     {
         this.mList.items.Clear();
         int index = 0;
         int length = Localization.instance.languages.Length;
         while (index < length)
         {
             TextAsset asset = Localization.instance.languages[index];
             if (asset != null)
             {
                 this.mList.items.Add(asset.name);
             }
             index++;
         }
         this.mList.value = Localization.instance.currentLanguage;
     }
     EventDelegate.Add(this.mList.onChange, new EventDelegate.Callback(this.OnChange));
 }
开发者ID:Lessica,项目名称:Something-of-SHIPWAR-GAMES,代码行数:21,代码来源:LanguageSelection.cs


示例19: OnEnable

	void OnEnable ()
	{
		SerializedProperty bit = serializedObject.FindProperty("bitmapFont");
		mType = (bit.objectReferenceValue != null) ? FontType.Bitmap : FontType.Dynamic;
		mList = target as UIPopupList;

		if (mList.ambigiousFont == null)
		{
			mList.ambigiousFont = NGUISettings.ambigiousFont;
			mList.fontSize = NGUISettings.fontSize;
			mList.fontStyle = NGUISettings.fontStyle;
			EditorUtility.SetDirty(mList);
		}

		if (mList.atlas == null)
		{
			mList.atlas = NGUISettings.atlas;
			mList.backgroundSprite = NGUISettings.selectedSprite;
			mList.highlightSprite = NGUISettings.selectedSprite;
			EditorUtility.SetDirty(mList);
		}
	}
开发者ID:ivanchan2,项目名称:SRW_Project,代码行数:22,代码来源:UIPopupListInspector.cs


示例20: TriggerCallbacks

	/// <summary>
	/// Trigger all event notification callbacks.
	/// </summary>

	protected void TriggerCallbacks ()
	{
		if (current != this)
		{
			UIPopupList old = current;
			current = this;

			// Legacy functionality
			if (mLegacyEvent != null) mLegacyEvent(mSelectedItem);

			if (EventDelegate.IsValid(onChange))
			{
				EventDelegate.Execute(onChange);
			}
			else if (eventReceiver != null && !string.IsNullOrEmpty(functionName))
			{
				// Legacy functionality support (for backwards compatibility)
				eventReceiver.SendMessage(functionName, mSelectedItem, SendMessageOptions.DontRequireReceiver);
			}
			current = old;
		}
	}
开发者ID:Shenseye,项目名称:Demo_leaderboard_gamespark,代码行数:26,代码来源:UIPopupList.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# UIProgressBar类代码示例发布时间:2022-05-24
下一篇:
C# UIPopoverController类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap