Skip to content

Commit 065f29b

Browse files
committed
Formatting and bug fixes
1 parent 8644aa2 commit 065f29b

File tree

3 files changed

+29
-14
lines changed

3 files changed

+29
-14
lines changed

iwsy/iwsy.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ const IWSY = (playerElement, scriptObject) => {
326326
}
327327
if (!vfx.continueFlag) {
328328
if (script.runMode === `manual`) {
329-
enterManualMode(step);
329+
enterManualMode(vfx.step);
330330
} else {
331331
vfx.step.next();
332332
}
@@ -360,6 +360,7 @@ const IWSY = (playerElement, scriptObject) => {
360360
block.element.style.display = `none`;
361361
}
362362
}
363+
step.next();
363364
} else {
364365
for (const block of stepBlocks)
365366
{
@@ -494,9 +495,17 @@ const IWSY = (playerElement, scriptObject) => {
494495
}
495496
};
496497
delete(vfx.start);
497-
requestAnimationFrame(timestamp => {
498-
animatePanzoom(timestamp, vfx);
499-
});
498+
if (script.speed === `scan`) {
499+
vfx.image.style.width = `${vfx.w2}px`;
500+
vfx.image.style.height = `${vfx.h2}px`;
501+
vfx.image.style.left = `${vfx.xoff2}px`;
502+
vfx.image.style.top = `${vfx.yoff2}px`;
503+
step.next();
504+
} else {
505+
requestAnimationFrame(timestamp => {
506+
animatePanzoom(timestamp, vfx);
507+
});
508+
}
500509
break;
501510
}
502511
}
@@ -505,7 +514,7 @@ const IWSY = (playerElement, scriptObject) => {
505514
}
506515
};
507516

508-
// Animate blocks
517+
// Animate a block
509518
const animate = step => {
510519
let continueFlag = true;
511520
for (const block of script.blocks) {

iwsy/resources/ecs/blocks.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
script Blocks
44

5-
import div Panel and variable Presentation
5+
import div Container and variable Presentation
66

7+
div Panel
78
div Editor
89
div Title
910
div Table
@@ -58,9 +59,11 @@ Start:
5859

5960
Restart:
6061
put property `blocks` of Presentation into Blocks
61-
clear Panel
62+
clear Container
63+
create Panel in Container
64+
set the style of Panel to `height:100%;display:flex;flex-direction:column`
6265
create Row in Panel
63-
set the style of Row to `display:flex`
66+
set the style of Row to `height:2em;display:flex`
6467
create Title in Row
6568
set the style of Title to
6669
`flex:1;font-size:110%;font-weight:bold;background:lightgray;text-align:center;margin-bottom:0.5em`
@@ -99,7 +102,7 @@ Restart:
99102
set the elements of DeleteBlock to NBlocks
100103
end
101104
create Table in Panel
102-
set the style of Table to `width:100%`
105+
set the style of Table to `flex:1;width:100%;overflow-y:scroll`
103106
put 0 into N
104107
while N is less than NBlocks
105108
begin

iwsy/resources/ecs/content.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
script Content
44

5-
import div Panel and variable Presentation
5+
import div Container and variable Presentation
66

7+
div Panel
78
div Editor
89
div Title
910
div Table
@@ -57,9 +58,11 @@ Restart:
5758
add 1 to N
5859
end
5960

60-
clear Panel
61+
clear Container
62+
create Panel in Container
63+
set the style of Panel to `height:100%;display:flex;flex-direction:column`
6164
create Row in Panel
62-
set the style of Row to `display:flex`
65+
set the style of Row to `height:2em;display:flex`
6366
create Title in Row
6467
set the style of Title to
6568
`flex:1;font-size:110%;font-weight:bold;background:lightgray;text-align:center;margin-bottom:0.5em`
@@ -93,7 +96,7 @@ Restart:
9396
set the elements of TextArea to NumItems
9497
end
9598
create Table in Panel
96-
set the style of Table to `width:100%`
99+
set the style of Table to `flex:1;width:100%;overflow-y:scroll`
97100
put 0 into N
98101
while N is less than NumItems
99102
begin
@@ -109,7 +112,7 @@ Restart:
109112
create Cell in Row
110113
set the style of Cell to `width:100%;display:flex`
111114
create EditButton in Cell
112-
set the style of EditButton to `flex:1`
115+
set the style of EditButton to `height:2em;flex:1`
113116
set the text of EditButton to ItemName
114117
if N is 0
115118
begin

0 commit comments

Comments
 (0)