本文整理汇总了C#中UILabel.Disable方法的典型用法代码示例。如果您正苦于以下问题:C# UILabel.Disable方法的具体用法?C# UILabel.Disable怎么用?C# UILabel.Disable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UILabel
的用法示例。
在下文中一共展示了UILabel.Disable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
public override void Start()
{
base.Start ();
Debug.PrintMessage ("Start");
this.size = new Vector2 (WIDTH, HEIGHT);
this.backgroundSprite = "MenuPanel";
this.canFocus = true;
this.isInteractive = true;
this.BringToFront ();
this.relativePosition = new Vector3 (50, 50);
this.Show ();
this.cachedName = cacheName;
m_challengePanel = (ChallengePanel) this.GetUIView ().AddUIComponent (typeof(ChallengePanel));
Debug.PrintMessage("Start() - Does ChallengePanel Exists? " + (m_challengePanel != null).ToString());
m_challengePanel.manager = this;
m_challengePanel.OnChallengeStarted += () => {m_selectButton.Disable ();};
m_challengePanel.OnChallengeEnded += () => {m_selectButton.Enable ();};
m_challengePanel.Hide ();
m_title = this.AddUIComponent<UILabel> ();
m_title.text = "CHALLENGES OPTIONS";
m_title.relativePosition = new Vector3 (WIDTH / 2 - m_title.width / 2, HEAD / 2 - m_title.height / 2);
m_title.textAlignment = UIHorizontalAlignment.Center;
m_dragHandle = this.AddUIComponent<UIDragHandle> ();
m_dragHandle.size = new Vector2(WIDTH,HEIGHT);
m_dragHandle.relativePosition = Vector3.zero;
m_dragHandle.target = this;
m_closeButton = this.AddUIComponent<UIButton> ();
m_closeButton.normalBgSprite = "buttonclose";
m_closeButton.hoveredBgSprite = "buttonclosehover";
m_closeButton.pressedBgSprite = "buttonclosepressed";
m_closeButton.relativePosition = new Vector3 (WIDTH - 35, 5,10);
m_closeButton.eventClick += (component, eventParam) => {
this.Hide();
};
m_challengeListPanel = this.AddUIComponent<UIPanel> ();
m_challengeListPanel.size = new Vector2 (LIST_PANEL_WIDTH, LIST_PANEL_HEIGHT);
m_challengeListPanel.relativePosition = new Vector3 (0, HEAD);
m_challengeBrowser = m_challengeListPanel.AddUIComponent<UIListBox> ();
m_challengeBrowser.size = new Vector2 (LIST_PANEL_WIDTH - SPACING * 2, LIST_PANEL_HEIGHT - SELECT_BUTTON_HEIGHT - SPACING * 2);
m_challengeBrowser.relativePosition = new Vector3 (SPACING, SPACING);
m_challengeBrowser.normalBgSprite = "GenericPanelDark";
//m_challengeBrowser.bottomColor = Color.green;
m_challengeBrowser.itemHighlight = "ListItemHighlight";
m_challengeBrowser.itemHover = "ListItemHover";
m_challengeBrowser.itemPadding.left = 10;
m_challengeBrowser.itemPadding.top = 4;
m_challengeBrowser.listPadding.top = 10;
m_challengeBrowser.listPadding.bottom = 10;
m_challengeBrowser.colorizeSprites = true;
LoadChallenges ();
m_selectButton = m_challengeListPanel.AddUIComponent<UIButton> ();
m_selectButton.text = "START";
m_selectButton.size = new Vector2 (LIST_PANEL_WIDTH - SPACING * 2, SELECT_BUTTON_HEIGHT - SPACING);
m_selectButton.textScale = 1.25f;
m_selectButton.textVerticalAlignment = UIVerticalAlignment.Middle;
m_selectButton.textHorizontalAlignment = UIHorizontalAlignment.Center;
m_selectButton.normalBgSprite = "ButtonMenu";
m_selectButton.hoveredBgSprite = "ButtonMenuHovered";
m_selectButton.pressedBgSprite = "ButtonMenuPressed";
m_selectButton.disabledBgSprite = "ButtonMenuDisabled";
m_selectButton.color = Color.green;
m_selectButton.focusedColor = m_selectButton.color;
m_selectButton.hoveredColor = m_selectButton.color;
m_selectButton.pressedColor = m_selectButton.color;
m_selectButton.relativePosition = new Vector3 (SPACING, LIST_PANEL_HEIGHT - SELECT_BUTTON_HEIGHT);
m_selectButton.Disable ();
m_selectButton.eventClick += ChallengeSelected;
m_refresh = this.AddUIComponent<UIButton> ();
m_refresh.size = new Vector2 (60,24);
m_refresh.text = "Refresh";
m_refresh.textScale = 0.875f;
m_refresh.normalBgSprite = "ButtonMenu";
m_refresh.hoveredBgSprite = "ButtonMenuHovered";
m_refresh.pressedBgSprite = "ButtonMenuPressed";
m_refresh.disabledBgSprite = "ButtonMenuDisabled";
//m_refresh.color = new Color32(255,0,0,255);
//m_refresh.focusedColor = m_refresh.color;
//m_refresh.hoveredColor = m_refresh.color;
//m_refresh.pressedColor = m_refresh.color;
m_refresh.relativePosition = m_closeButton.relativePosition + new Vector3 (-60 -SPACING,6f);
m_refresh.eventClick += (component, eventParam) => {LoadChallenges();};
m_challengeDetailsPanel = this.AddUIComponent<UIPanel> ();
m_challengeDetailsPanel.size = new Vector2 (WIDTH - LIST_PANEL_WIDTH, HEIGHT - HEAD);
//m_challengeDetailsPanel.backgroundSprite = "GenericPanel";
m_challengeDetailsPanel.relativePosition = new Vector3 (LIST_PANEL_WIDTH, HEAD);
m_challengeName = m_challengeDetailsPanel.AddUIComponent<UILabel> ();
//.........这里部分代码省略.........