对MobileMenuBase的使用

Posted on 2013-06-09 12:26  neocsl  阅读(168)  评论(0编辑  收藏  举报

  Begin Object class="MobileMenuButton" Name=CloseButton
  Tag="Play"
  bRelativeLeft=true
  bRelativeTop=true
  bRelativeHeight=true
  bRelativeWidth=true
  bHeightRelativeToWidth=true
  Left=0.04
  Top=0
  Width=0.25          
  Height=1.0
  Caption="Play!"
  bCaptionShadow=true
  Images(0)=Texture2D'ChickenHUD.HenIcon'
  Images(1)=Texture2D'ChickenHUD.HenIcon'
  CaptionColor=(R=1.0,G=1.0,B=0.0,A=1.0)
  CaptionScale=1.1
 End Object
 MenuObjects.Add(CloseButton)

 

event OnTouch(MobileMenuObject Sender,float TouchX, float TouchY, bool bCancel)

{

    if(Sender==none)

return;

    Switch(Sender.Tag)

    {

      case "Play":

        Fade(true,1.0);

        Break;
    }

}