本文整理汇总了C#中UIPanel.GetComponentInChildren方法的典型用法代码示例。如果您正苦于以下问题:C# UIPanel.GetComponentInChildren方法的具体用法?C# UIPanel.GetComponentInChildren怎么用?C# UIPanel.GetComponentInChildren使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIPanel
的用法示例。
在下文中一共展示了UIPanel.GetComponentInChildren方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start()
{
meetingListPage = GameObject.Find("mainPannel").GetComponent<UIPanel>();
grid = meetingListPage.GetComponentInChildren<UIGrid>();
this.initFakeData();
}
示例2: startStory
public void startStory(int templateID)
{
story = Instantiate(StroyPanel, Vector3.zero, Quaternion.identity) as UIPanel;
story.transform.parent = parent.transform;
story.transform.localScale = Vector3.one;
story.transform.localPosition = Vector3.zero;
story.gameObject.SetActive(true);
StroyPlay play = story.GetComponentInChildren<StroyPlay>();
if(null != play)
{
play.play(templateID);
}
}
示例3: CreateGraphics
internal void CreateGraphics()
{
try {
var uiView = UIView.GetAView();
TextureDB.LoadFavCimsTextures();
Atlas.LoadAtlasIcons();
////////////////////////////////////////////////
///////////Favorite Button Manu Panel/////////
///////////////////////////////////////////////
//MainMenuPos = UIView.GetAView().FindUIComponent<UITabstrip> ("MainToolstrip");
MainMenuPos = UIView.Find<UITabstrip> ("MainToolstrip");
if(MainMenuPos.Find<FavoritesCimsButton>("FavCimsMenuPanel") != null) {
FavCimsMenuPanel = MainMenuPos.Find<FavoritesCimsButton>("FavCimsMenuPanel");
}else{
FavCimsMenuPanel = MainMenuPos.AddUIComponent(typeof(FavoritesCimsButton)) as FavoritesCimsButton;
}
////////////////////////////////////////////////
////////////////Favorite Panel////////////////
///////////////////////////////////////////////
FullScreenContainer = UIView.Find<UIPanel> ("FullScreenContainer");
FavCimsPanel = FullScreenContainer.AddUIComponent<FavoriteCimsMainPanel> ();
FavCimsPanel.Hide ();
FullScreenContainer.eventMouseDown += delegate {
if (!FavCimsPanel.containsMouse) {
FavCimsPanel.SendToBack ();
} else {
FavCimsPanel.BringToFront ();
}
};
////////////////////////////////////////////////
////////////Humans Button & Subscribe///////////
///////////////////////////////////////////////
FavCimsHumanPanel = FullScreenContainer.Find<UIPanel> ("(Library) CitizenWorldInfoPanel");
if (FavCimsHumanPanel != null) {
if(FavCimsHumanPanel.GetComponentInChildren<AddToFavButton>() != null) {
FavStarButton = FavCimsHumanPanel.GetComponentInChildren<AddToFavButton>();
}else{
FavStarButton = FavCimsHumanPanel.AddUIComponent(typeof(AddToFavButton)) as AddToFavButton;
}
}
GenerateFamilyDetailsTpl();
} catch (Exception e) {
Debug.Error ("OnLoad List Error : " + e.ToString ());
}
}
示例4: Start
// Use this for initialization
void Start()
{
meetingDetailPage = GameObject.Find("startMeetingPannel").GetComponent<UIPanel>();
dateSlider = meetingDetailPage.GetComponentInChildren<UISlider>();
}
示例5: Load
public static Asset Load(string name)
{
Asset asset = AssetMgr.Load(name);
if (asset == null)
return null;
asset.OnAssetLoaded = delegate(Object obj)
{
if (uiRoot == null)
{
uiRoot = NGUITools.CreateUI(false);
GameObject.DontDestroyOnLoad(uiRoot.gameObject);
//uiRoot.camera.audio.enabled = false;
AudioListener al = (AudioListener)uiRoot.GetComponentInChildren<AudioListener>();
al.enabled = false;
}
GameObject go = NGUITools.AddChild(uiRoot.gameObject, obj as GameObject);
go.name = go.name.Replace("(Clone)", "");
};
return asset;
}
示例6: ApplyToIconPanel
private void ApplyToIconPanel(UIPanel groupPanel, IconPanelModifier modifier, bool verticalScroll)
{
if(groupPanel == null)
return;
if(modifier == null)
return;
try{ //seperator panels do not have UIScrollablePanels nor UIScrollbars
UITabContainer tabContainer = groupPanel.GetComponentInChildren<UITabContainer>();
foreach(UIComponent comp in tabContainer.components){ //for each displayable panel of icons
if(comp is UIPanel){
UIPanel panel = comp as UIPanel;
UIScrollablePanel sp = panel.GetComponentInChildren<UIScrollablePanel>();
UIScrollbar sb = panel.GetComponentInChildren<UIScrollbar>();
modifier.Invoke(panel,sp,sb,verticalScroll);
panel.Invalidate();
sp.Invalidate();
sb.Invalidate();
}
}
tabContainer.Invalidate();
}catch(Exception e){
//Debug.Print(groupPanel,e);
}
}