Skip to content

Commit

Permalink
midground layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragzouken committed Jun 1, 2024
1 parent c302af0 commit 851898b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/event-behaviors.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,18 @@
| image layer | meaning
|--|--
| background | below the room, events, and dialogue
| midground | above the room, but below the events and dialogue
| foreground | above the room and events, but below the dialogue
| overlay | above the room, events, and dialogue

| name | type | meaning
|--|--|--
| background | text | show named image on background layer
| midground | text | show named image on midground layer
| foreground | text | show named image on foreground layer
| overlay | text | show named image on overlay layer
| clear-background | tag | clear image on background layer
| clear-midground | tag | clear image on midground layer
| clear-foreground | tag | clear image on foreground layer
| clear-overlay | tag | clear image on overlay layer

Expand Down
7 changes: 7 additions & 0 deletions src/scripts/playback.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,13 @@ if (backgrounds.length > 0) {
HIDE_IMAGE("BACKGROUND");
}
let midgrounds = FIELDS_OR_LIBRARY("midground");
if (midgrounds.length > 0) {
SHOW_IMAGE("MIDGROUND", midgrounds, 1, 0, 0);
} else if (IS_TAGGED(EVENT, "clear-midground")) {
HIDE_IMAGE("MIDGROUND");
}
let foregrounds = FIELDS_OR_LIBRARY("foreground");
if (foregrounds.length > 0) {
SHOW_IMAGE("FOREGROUND", foregrounds, 2, 0, 0);
Expand Down

0 comments on commit 851898b

Please sign in to comment.