Yangi formatda davom etish uchun: https://uzfor.net/view.php?act=post&id=54193
Postga havola
NetLizard [1846] [ban]
Mana drag kodi ozimizni DS dasturidayam bor:
app.LoadPlugin( "Support" ); function OnStart() { lay = app.CreateLayout( "Linear", "VCenter,FillXY" ); sup = app.CreateSupport(); left = app.CreateButton( "Left" ); left.EnableDrag( "DragButton", OnDragStart ); lay.AddChild( left ); right = app.CreateButton( "Right", 0.4, 0.4 ); right.SetTag( "RightButton" ); right.On( "drag", OnDrag ); lay.AddChild( right ); app.AddLayout( lay ); } function OnDrag( action, tag ) { switch( action ) { case "Start": lay.SetBackColor( color.RED );break; case "Enter": lay.SetBackColor( color.GREEN ); break; case "Exit": lay.SetBackColor( color.RED ); break; case "Drop": if( tag == "RightButton" ) right.SetText( "Dropped" ); break; case "Stop": lay.SetBackColor( "Black" ); break; } } function OnDragStart( tag ) { console.log( "Start Drag For: "+tag ); }