Pārlūkot izejas kodu

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

Evgeniy Goroshkin 7 gadi atpakaļ
vecāks
revīzija
418b7ee1f3
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  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.
 
 #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" )
 
-	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
 
 #rem monkeydoc Runs a simple string dialog.