1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Popup" inherits="Control" category="Core" version="3.2">
<brief_description>
Base container control for popups and dialogs.
</brief_description>
<description>
Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior.
</description>
<tutorials>
</tutorials>
<methods>
<method name="popup">
<return type="void">
</return>
<argument index="0" name="bounds" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
</argument>
<description>
Popup (show the control in modal form).
</description>
</method>
<method name="popup_centered">
<return type="void">
</return>
<argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by "size".
</description>
</method>
<method name="popup_centered_clamped">
<return type="void">
</return>
<argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<argument index="1" name="fallback_ratio" type="float" default="0.75">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, clamping the size to [code]size[/code], then ensuring the popup is no larger than the viewport size multiplied by [code]fallback_ratio[/code].
</description>
</method>
<method name="popup_centered_minsize">
<return type="void">
</return>
<argument index="0" name="minsize" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, ensuring the size is never smaller than [code]minsize[/code].
</description>
</method>
<method name="popup_centered_ratio">
<return type="void">
</return>
<argument index="0" name="ratio" type="float" default="0.75">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen.
</description>
</method>
</methods>
<members>
<member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive">
If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event.
</member>
</members>
<signals>
<signal name="about_to_show">
<description>
This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context).
</description>
</signal>
<signal name="popup_hide">
<description>
This signal is emitted when a popup is hidden.
</description>
</signal>
</signals>
<constants>
<constant name="NOTIFICATION_POST_POPUP" value="80">
Notification sent right after the popup is shown.
</constant>
<constant name="NOTIFICATION_POPUP_HIDE" value="81">
Notification sent right after the popup is hidden.
</constant>
</constants>
</class>
|