zoukankan      html  css  js  c++  java
  • XSI的控件创建方式


    var oPSet = ActiveSceneRoot.AddProperty( "CustomProperty", false, "ButtonExample" ) ;
    oPSet.AddParameter3( "SomeText", siString ) ;
    var oLayout = oPSet.PPGLayout
    oLayout.AddRow() ;
    oLayout.AddItem( "SomeText" ) ;
    var oItem = oLayout.AddButton( "ClickMe", "Click Me" ) ;
    oItem.SetAttribute( "buttondisable", true ) ;
    oLayout.EndRow() ;
    oLayout.Logic = SomeText_OnChanged.toString() + ClickMe_OnClicked.toString() ;
    oLayout.Language = "JScript" ;
    InspectObj( oPSet ) ;
    function SomeText_OnChanged()
    {
     
     bDisableButton = ( PPG.SomeText.Value.length == 0 ) ; 
     oPPGLayout = PPG.PPGLayout ;
     oPPGItem = oPPGLayout.Item( "ClickMe" ) ;   
     bAlreadyDisabled = oPPGItem.GetAttribute( "buttondisable" ) ;
     if ( bDisableButton != bAlreadyDisabled )
     { 
      oPPGItem.SetAttribute( "buttondisable", bDisableButton ) ;  
      PPG.Refresh() ;
     }
    }
    function ClickMe_OnClicked()
    {
     XSIUIToolkit.MsgBox( "Value of text is " +  PPG.SomeText.Value ) ;
    }

  • 相关阅读:
    动画差值
    高达模型
    TCP/IP负载均衡
    FreeImage使用
    Game Programming Pattern
    Apple Instruments
    GLEW OpenGL Access violation when using glGenVertexArrays
    微服务了解
    summary
    事务传播行为
  • 原文地址:https://www.cnblogs.com/softimagewht/p/2051310.html
Copyright © 2011-2022 走看看