浏览代码

Added params yesButton, noButton into RequestOkay() to be able to set buttons caption.

Evgeniy Goroshkin 7 年之前
父节点
当前提交
418b7ee1f3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      modules/mojox/requesters.monkey2

+ 2 - 2
modules/mojox/requesters.monkey2

@@ -28,10 +28,10 @@ Returns true if the user selects 'Okay', else false.
 This function must not be called from the main fiber.
 This function must not be called from the main fiber.
 
 
 #end
 #end
-Function RequestOkay:Bool( message:String="Are you sure you want to do this?",title:String="Okay?" )
+Function RequestOkay:Bool( message:String="Are you sure you want to do this?",title:String="Okay?",yesButton:String="Okay",noButton:String="Cancel" )
 	Assert( Fiber.Current()<>Fiber.Main(),"RequestOkay cannot be used from the main fiber" )
 	Assert( Fiber.Current()<>Fiber.Main(),"RequestOkay cannot be used from the main fiber" )
 
 
-	Return TextDialog.Run( title,message,New String[]( "Okay","Cancel" ),0,1 )=0
+	Return TextDialog.Run( title,message,New String[]( yesButton,noButton ),0,1 )=0
 End
 End
 
 
 #rem monkeydoc Runs a simple string dialog.
 #rem monkeydoc Runs a simple string dialog.