コード例 #1
0
 public override void OnRelayEvent(UIEvent aEvent, UIEventListener aListener)
 {
     if(aListener == null)
     {
         return;
     }
     switch(aEvent)
     {
         case UIEvent.MOUSE_CLICK:
         case UIEvent.MOUSE_DOUBLE_CLICK:
             if(aListener == m_Singleplayer)
             {
                 SinglePlayerClicked();
             }
             else if(aListener == m_Online)
             {
                 OnlineClicked();
             }
             else if(aListener == m_Options)
             {
                 OptionsClicked();
             }
             else if(aListener == m_Quit)
             {
                 QuitClicked();
             }
             else if(aListener == m_Back)
             {
                 BackClicked();
             }
             break;
     }
 }
コード例 #2
0
 public override void Clear()
 {
     base.Clear();
     m_Disabled = false;
     m_DisabledTexture = null;
     m_NormalTexture = null;
     m_HoverTexture = null;
     m_DownTexture = null;
     m_EnabledTextColor = Color.white;
     m_DisabledTextColor = Color.gray;
     m_EventListener = null;
     m_LabelText = string.Empty;
     m_LabelFontSize = 100;
     m_LabelFont = null;
     m_LabelFontTexture = null;
     m_LabelColor = Color.white;
     m_ImageWidth = 1.0f;
     m_ImageHeight = 1.0f;
     m_ImageMeshBoarder = new UIBoarder(0.1f, 0.9f, 0.9f, 0.1f);
     m_ImageOuterUVBoarder = new UIBoarder(0.1f, 0.9f, 0.9f, 0.1f);
     m_ImageInnerUVBoarder = new UIBoarder(0.1f, 0.9f, 0.9f, 0.1f);
     m_ImageTexture = null;
     m_ImageShader = null;
     m_ImageColor = Color.white;
 }
コード例 #3
0
 public virtual void OnRelayEvent(UIEvent aEvent, UIEventListener aListener)
 {
 }
コード例 #4
0
 /// <summary>
 /// Searches for an event listener in sibling / children heirarchy.
 /// Registers with the UI manager.
 /// </summary>
 void Start()
 {
     if(m_EventListener == null)
     {
         m_EventListener = GetComponent<UIEventListener>();
     }
     if(m_EventListener == null)
     {
         m_EventListener = GetComponentInChildren<UIEventListener>();
     }
     UIManager.Register(this);
 }