2
2
3
3
script VFX
4
4
5
- import div Panel and variable Presentation
5
+ import div Container and variable Presentation
6
6
7
+ div Panel
7
8
div Editor
8
9
div Title
9
10
div Table
@@ -56,9 +57,11 @@ Restart:
56
57
put property `vfx` of Presentation into Items
57
58
if Items is empty set Items to array
58
59
59
- clear Panel
60
+ clear Container
61
+ create Panel in Container
62
+ set the style of Panel to `width:100%;height:100%;display:flex;flex-direction:column`
60
63
create Row in Panel
61
- set the style of Row to `display:flex`
64
+ set the style of Row to `height:2em; display:flex`
62
65
create Title in Row
63
66
set the style of Title to
64
67
`flex:1;font-size:110%;font-weight:bold;background:lightgray;text-align:center;margin-bottom:0.5em`
@@ -69,6 +72,7 @@ Restart:
69
72
create AddItem in Link
70
73
set the style of AddItem to `width:1em;margin-top:0.1em`
71
74
set attribute `src` of AddItem to `/resources/icon/plus.png`
75
+ set attribute `title` of AddItem to `Add VFX item`
72
76
on click AddItem
73
77
begin
74
78
set Item to object
@@ -98,7 +102,7 @@ Restart:
98
102
set the elements of EndYOffsetInput to NumItems
99
103
end
100
104
create Table in Panel
101
- set the style of Table to `width:100%`
105
+ set the style of Table to `flex:1; width:100%;overflow-y:scroll `
102
106
put 0 into N
103
107
while N is less than NumItems
104
108
begin
@@ -114,7 +118,7 @@ Restart:
114
118
create Cell in Row
115
119
set the style of Cell to `width:100%;display:flex`
116
120
create EditButton in Cell
117
- set the style of EditButton to `flex:1`
121
+ set the style of EditButton to `height:2em; flex:1`
118
122
set the text of EditButton to ItemName
119
123
if N is 0
120
124
begin
@@ -133,7 +137,7 @@ Restart:
133
137
set the style of DeleteItem to `width:1em;margin:0.2em 0 0 0.2em`
134
138
set attribute `src` of DeleteItem to `/resources/icon/stop.png`
135
139
create Editor in Row
136
- set the style of Editor to `margin:0.5em;border:1px solid black;padding:0.2em;display:none`
140
+ set the style of Editor to `margin:0.5em;border:1px solid black;padding:0.2em;display:none;flex-direction:column `
137
141
add 1 to N
138
142
end
139
143
on click EditButton
@@ -169,7 +173,7 @@ Restart:
169
173
index Editor to SelectedItem
170
174
if style `display` of Editor is `none`
171
175
begin
172
- set style `display` of Editor to `block `
176
+ set style `display` of Editor to `flex `
173
177
set style `background-color` of EditButton to `lightgray`
174
178
put element SelectedItem of Items into Item
175
179
ReloadEditor:
@@ -229,7 +233,6 @@ ReloadEditor:
229
233
create DurationInput in Row
230
234
set the style of DurationInput to `flex:1`
231
235
put property `duration` of Item into Value
232
- ! if Value is empty put 1 into Value
233
236
set the text of DurationInput to Value
234
237
235
238
create Row in Editor
@@ -263,7 +266,7 @@ ReloadEditor:
263
266
set the text of EndYOffsetInput to Value
264
267
end
265
268
create Row in Editor
266
- set the style of Row to `display:flex;margin-top:0.5em`
269
+ set the style of Row to `height:2em; display:flex;margin-top:0.5em`
267
270
create SaveButton in Row
268
271
set the style of SaveButton to `flex:1;margin-right:0.2em`
269
272
set the text of SaveButton to `Save`
0 commit comments