File tree Expand file tree Collapse file tree 2 files changed +14
-23
lines changed
types/foundry/client-esm/applications/api Expand file tree Collapse file tree 2 files changed +14
-23
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ async function getNestedEffectSelection(
23
23
} ,
24
24
) ;
25
25
26
- const choice = ( await DialogV2 . wait ( {
26
+ const choice = ( await DialogV2 . prompt ( {
27
27
id : "nested-effect-selection-dialog" ,
28
28
window : {
29
29
title : effectData . name ,
@@ -36,24 +36,18 @@ async function getNestedEffectSelection(
36
36
return null ;
37
37
} ,
38
38
content,
39
- buttons : [
40
- {
41
- action : "ok" ,
42
- label : "ConvenientEffects.SelectEffect" ,
43
- icon : "fa-solid fa-check" ,
44
- callback : async (
45
- _event : PointerEvent | SubmitEvent ,
46
- _button : HTMLButtonElement ,
47
- dialog : HTMLDialogElement ,
48
- ) => {
49
- const htmlChoice = $ ( dialog )
50
- . find ( 'select[name="effect-choice"]' )
51
- . val ( ) ;
52
- return htmlChoice ;
53
- } ,
54
- default : true ,
39
+ ok : {
40
+ action : "ok" ,
41
+ label : "ConvenientEffects.SelectEffect" ,
42
+ icon : "fa-solid fa-check" ,
43
+ callback : async ( _event , _button , dialog ) => {
44
+ const htmlChoice = $ ( dialog . element )
45
+ . find ( 'select[name="effect-choice"]' )
46
+ . val ( ) ;
47
+ return htmlChoice ;
55
48
} ,
56
- ] ,
49
+ default : true ,
50
+ } ,
57
51
} ) ) as string | undefined ;
58
52
59
53
return nestedEffects . find ( ( nestedEffect ) => nestedEffect . name === choice ) ;
Original file line number Diff line number Diff line change @@ -152,18 +152,15 @@ export interface DialogV2WaitOptions {
152
152
export type DialogV2ButtonCallback = (
153
153
event : PointerEvent | SubmitEvent ,
154
154
button : HTMLButtonElement ,
155
- dialog : HTMLDialogElement ,
155
+ dialog : DialogV2 ,
156
156
) => Promise < unknown > ;
157
157
158
158
/**
159
159
* A dialog render handler method.
160
160
* @param event The render event.
161
161
* @param dialog The dialog element.
162
162
*/
163
- export type DialogV2RenderCallback = (
164
- event : Event ,
165
- dialog : HTMLDialogElement ,
166
- ) => void ;
163
+ export type DialogV2RenderCallback = ( event : Event , dialog : DialogV2 ) => void ;
167
164
168
165
/**
169
166
* @param event The close event
You can’t perform that action at this time.
0 commit comments