Difference between revisions of "IC Python API:RLPy RDialogCallback"

From Reallusion Wiki!
Jump to: navigation, search
m
m
Line 4: Line 4:
 
This class inherits public member functions from:
 
This class inherits public member functions from:
 
*[[IC_Python_API:RLPy_RCallback|RLPy.RCallback]]
 
*[[IC_Python_API:RLPy_RCallback|RLPy.RCallback]]
==Detailed Description==
+
== Detailed Description ==
 
This class is used to register callbacks for dialog events.
 
This class is used to register callbacks for dialog events.
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
Line 21: Line 21:
 
mydialog.RegisterEventCallBack(mycallback)
 
mydialog.RegisterEventCallBack(mycallback)
 
</syntaxhighlight>
 
</syntaxhighlight>
==Member Functions==
+
== Member Functions ==
===OnDialogClose===
+
=== OnDialogClose ===
 
<syntaxhighlight lang="Python">
 
<syntaxhighlight lang="Python">
 
RLPy.RDialogCallback.OnDialogClose ( self )
 
RLPy.RDialogCallback.OnDialogClose ( self )
 
</syntaxhighlight>
 
</syntaxhighlight>
 
Callback for dialog close.
 
Callback for dialog close.
====Returns====
+
==== Returns ====
<div style="margin-left: 2em;">Dialog closed - bool
+
<div style="margin-left: 2em;">
 +
Dialog closed - bool
 
</div>
 
</div>
 +
-----
 +
=== OnDialogHide ===
 +
<syntaxhighlight lang="Python">
 +
RLPy.RDialogCallback.OnDialogHide ( self )
 +
</syntaxhighlight>
 +
Callback for dialog hide.
 +
-----
 +
=== OnDialogShow ===
 +
<syntaxhighlight lang="Python">
 +
RLPy.RDialogCallback.OnDialogShow ( self )
 +
</syntaxhighlight>
 +
Callback for dialog show.

Revision as of 20:05, 4 July 2019

Main article: Modules.

Inheritance

This class inherits public member functions from:

Detailed Description

This class is used to register callbacks for dialog events.

class MyDialogCallback(RLPy.RDialogCallback):
 def __init__(self):
   RLPy.RDialogCallback.__init__(self)
 def OnDialogHide(self):
   print("Dialog is be Hide")
 def OnDialogShow(self):
   print("Dialog is be Show")
 def OnDialogClose(self):
   print("Dialog is be Close")

mydialog = RUi.CreateRDialog()
mycallback = MyDialogCallback()
mydialog.RegisterEventCallBack(mycallback)

Member Functions

OnDialogClose

RLPy.RDialogCallback.OnDialogClose ( self )

Callback for dialog close.

Returns

Dialog closed - bool


OnDialogHide

RLPy.RDialogCallback.OnDialogHide ( self )

Callback for dialog hide.


OnDialogShow

RLPy.RDialogCallback.OnDialogShow ( self )

Callback for dialog show.