dialogs.xml 4.67 KB
Newer Older
Jan Möbius's avatar
 
Jan Möbius committed
1
2
3
<OpenFlipper>
 
  <element name="message_box">
4
    <category>Widgets and UI</category>
Jan Möbius's avatar
 
Jan Möbius committed
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
    <short>Message box</short>
    <long>Shows a message box</long>
    <dataflow>true</dataflow>
    <inputs>
      <input name="message" type="String" external="false" runtime="false">
        <short>Displayed message</short>
        <long>Displayed message. $1, $2 and $3 will be raplaced with the inputs.</long>
        <default>Values: $1 $2 $3</default>
      </input>
      <input name="in1" type="Any" optional="true">
        <short>$1 input</short>
        <long>$1 in the message will be replaced with this input</long>
      </input>
      <input name="in2" type="Any" optional="true">
        <short>$2 input</short>
        <long>$2 in the message will be replaced with this input</long>
      </input>
      <input name="in3" type="Any" optional="true">
        <short>$3 input</short>
        <long>$3 in the message will be replaced with this input</long>
      </input>
    </inputs>
    <code>
      var message = [input="message"];

      message = message.replace(/\$1/g, [input="in1"]);
      message = message.replace(/\$2/g, [input="in2"]);
      message = message.replace(/\$3/g, [input="in3"]);

      visualscripting.messageBox (message);
    </code>
  </element>

  <element name="question_box">
39
    <category>Widgets and UI</category>
Jan Möbius's avatar
 
Jan Möbius committed
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
    <short>Yes/No box</short>
    <long>Shows a message box with Yes and No buttons</long>
    <dataflow>true</dataflow>
    <inputs>
      <input name="message" type="String" external="false" runtime="false">
        <short>Displayed message</short>
        <long>Displayed message</long>
        <default>Question?</default>
      </input>
    </inputs>
    <outputs>
      <output name="ret" type="Bool">
        <short>Pressed button</short>
        <long>Pressed button. "true" on Yes and "false" on No</long>
      </output>
    </outputs>
    <code>
      [output="ret"] = visualscripting.questionBox ([input="message"]);
    </code>
  </element>

  <element name="question_box_with_inputs">
62
    <category>Widgets and UI</category>
Jan Möbius's avatar
 
Jan Möbius committed
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
    <short>Yes/No with Inputs</short>
    <long>Shows a message box with Yes and No buttons</long>
    <dataflow>true</dataflow>
    <inputs>
      <input name="message" type="String" external="false" runtime="false">
        <short>Displayed message</short>
        <long>Displayed message. $1, $2 and $3 will be raplaced with the inputs.</long>
        <default>Question? $1 $2 $3</default>
      </input>
      <input name="in1" type="Any" optional="true">
        <short>$1 input</short>
        <long>$1 in the message will be replaced with this input</long>
      </input>
      <input name="in2" type="Any" optional="true">
        <short>$2 input</short>
        <long>$2 in the message will be replaced with this input</long>
      </input>
      <input name="in3" type="Any" optional="true">
        <short>$3 input</short>
        <long>$3 in the message will be replaced with this input</long>
      </input>
    </inputs>
    <outputs>
      <output name="ret" type="Bool">
        <short>Pressed button</short>
        <long>Pressed button. "true" on Yes and "false" on No</long>
      </output>
    </outputs>
    <code>
      var message = [input="message"];

      message = message.replace(/\$1/g, [input="in1"]);
      message = message.replace(/\$2/g, [input="in2"]);
      message = message.replace(/\$3/g, [input="in3"]);

      [output="ret"] = visualscripting.questionBox (message);
    </code>
  </element>

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
  <element name="update_view">
    <category>Widgets and UI</category>
    <short>Update View</short>
    <long>Calls cores update view function</long>
    <dataflow>true</dataflow>
    <code>
      core.updateView();
    </code>
  </element>

  <element name="update_ui">
    <category>Widgets and UI</category>
    <short>Update UI</short>
    <long>Refresh user interface</long>
    <dataflow>true</dataflow>
    <code>
      core.updateUI();
    </code>
  </element>

122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
  <element name="dialog_Continue_box">
    <category>Widgets and UI</category>
    <short>Continue box</short>
    <long>Deliver true until the user clicks on the stop button</long>
    <dataflow>true</dataflow>
    <input name="message" type="String" external="false" runtime="false">
      <short>Displayed message</short>
      <long>Displayed message.</long>
      <default>Stop?</default>
    </input>
    <outputs>
      <output name="continue" type="Bool">
        <short>continue</short>
        <long>Delivers true until stop button is pressed.</long>
      </output>
    </outputs>
    <code>
      var dialog_stop_box_message = [input="message"];

      [output="continue"] = visualscripting.continueBox(dialog_stop_box_message);
    </code>
  </element>
144
145

</OpenFlipper>