-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdialog.fluid
35 lines (31 loc) · 978 Bytes
/
dialog.fluid
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
--[[
Dialog test
--]]
require 'gui/dialog'
gui.dialog.message({
modal = true,
image = 'items/warning',
title = 'Hamlet has a question',
message = 'To be or not to be?',
userInput = 'That is the question',
checkboxLabel = '\'Tis nobler to suffer',
quit = true,
options = {
{ id=1, text='To be', icon='items/checkmark' },
{ id=2, text='Not to be', icon='items/cancel' }
},
feedback = function(Dialog, Response, State)
if Response then
print('User selected option ' .. Response.id)
end
if State then
if State.input then
print('User entered string: ' .. State.input)
end
if State.checkbox then
print('User activated the checkbox')
end
end
end
})
processing.sleep() -- Will sleep until the window sends MSGID_QUIT