diff --git a/desktop/resources/dream-2.mp3 b/desktop/resources/dream-2.mp3 new file mode 100644 index 00000000..8bd196d2 Binary files /dev/null and b/desktop/resources/dream-2.mp3 differ diff --git a/desktop/resources/dream/music.ogg b/desktop/resources/dream/music.ogg new file mode 100644 index 00000000..68f74abb Binary files /dev/null and b/desktop/resources/dream/music.ogg differ diff --git a/desktop/resources/dream/music.wav b/desktop/resources/dream/music.wav new file mode 100644 index 00000000..e7629076 Binary files /dev/null and b/desktop/resources/dream/music.wav differ diff --git a/desktop/resources/ego/crawl.png b/desktop/resources/ego/crawl.png new file mode 100644 index 00000000..a7769ad2 Binary files /dev/null and b/desktop/resources/ego/crawl.png differ diff --git a/desktop/resources/ego/crawl.pxa/0.pxi b/desktop/resources/ego/crawl.pxa/0.pxi new file mode 100644 index 00000000..4bd31d7b Binary files /dev/null and b/desktop/resources/ego/crawl.pxa/0.pxi differ diff --git a/desktop/resources/ego/crawl.pxa/1.pxi b/desktop/resources/ego/crawl.pxa/1.pxi new file mode 100644 index 00000000..ee03488a Binary files /dev/null and b/desktop/resources/ego/crawl.pxa/1.pxi differ diff --git a/desktop/resources/ego/crawl.pxa/2.pxi b/desktop/resources/ego/crawl.pxa/2.pxi new file mode 100644 index 00000000..8d4c4e36 Binary files /dev/null and b/desktop/resources/ego/crawl.pxa/2.pxi differ diff --git a/desktop/resources/ego/crawl.pxa/3.pxi b/desktop/resources/ego/crawl.pxa/3.pxi new file mode 100644 index 00000000..3d84404a Binary files /dev/null and b/desktop/resources/ego/crawl.pxa/3.pxi differ diff --git a/desktop/resources/ego/crawl.pxa/4.pxi b/desktop/resources/ego/crawl.pxa/4.pxi new file mode 100644 index 00000000..51135a86 Binary files /dev/null and b/desktop/resources/ego/crawl.pxa/4.pxi differ diff --git a/desktop/resources/ego/crawl.pxa/5.pxi b/desktop/resources/ego/crawl.pxa/5.pxi new file mode 100644 index 00000000..1ded6e4c Binary files /dev/null and b/desktop/resources/ego/crawl.pxa/5.pxi differ diff --git a/desktop/resources/ego/crawl.pxa/6.pxi b/desktop/resources/ego/crawl.pxa/6.pxi new file mode 100644 index 00000000..de96f0bb Binary files /dev/null and b/desktop/resources/ego/crawl.pxa/6.pxi differ diff --git a/desktop/resources/ego/crawl.pxa/CelData.plist b/desktop/resources/ego/crawl.pxa/CelData.plist new file mode 100644 index 00000000..8f638e26 --- /dev/null +++ b/desktop/resources/ego/crawl.pxa/CelData.plist @@ -0,0 +1,34 @@ + + + + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + diff --git a/desktop/resources/ego/scoot.png b/desktop/resources/ego/scoot.png new file mode 100644 index 00000000..4b52dc94 Binary files /dev/null and b/desktop/resources/ego/scoot.png differ diff --git a/desktop/resources/ego/standup.png b/desktop/resources/ego/standup.png new file mode 100644 index 00000000..a95d52f3 Binary files /dev/null and b/desktop/resources/ego/standup.png differ diff --git a/desktop/resources/ego/standup.pxa/0.pxi b/desktop/resources/ego/standup.pxa/0.pxi new file mode 100644 index 00000000..675118cf Binary files /dev/null and b/desktop/resources/ego/standup.pxa/0.pxi differ diff --git a/desktop/resources/ego/standup.pxa/1.pxi b/desktop/resources/ego/standup.pxa/1.pxi new file mode 100644 index 00000000..5cd8779e Binary files /dev/null and b/desktop/resources/ego/standup.pxa/1.pxi differ diff --git a/desktop/resources/ego/standup.pxa/2.pxi b/desktop/resources/ego/standup.pxa/2.pxi new file mode 100644 index 00000000..1e8195ee Binary files /dev/null and b/desktop/resources/ego/standup.pxa/2.pxi differ diff --git a/desktop/resources/ego/standup.pxa/3.pxi b/desktop/resources/ego/standup.pxa/3.pxi new file mode 100644 index 00000000..d27612b0 Binary files /dev/null and b/desktop/resources/ego/standup.pxa/3.pxi differ diff --git a/desktop/resources/ego/standup.pxa/4.pxi b/desktop/resources/ego/standup.pxa/4.pxi new file mode 100644 index 00000000..ffec646d Binary files /dev/null and b/desktop/resources/ego/standup.pxa/4.pxi differ diff --git a/desktop/resources/ego/standup.pxa/CelData.plist b/desktop/resources/ego/standup.pxa/CelData.plist new file mode 100644 index 00000000..1ff35422 --- /dev/null +++ b/desktop/resources/ego/standup.pxa/CelData.plist @@ -0,0 +1,26 @@ + + + + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + diff --git a/desktop/resources/ego/suspended.png b/desktop/resources/ego/suspended.png index 3210d3e8..ca4d17eb 100644 Binary files a/desktop/resources/ego/suspended.png and b/desktop/resources/ego/suspended.png differ diff --git a/desktop/resources/ego/suspended.pxa/0.pxi b/desktop/resources/ego/suspended.pxa/0.pxi index 1d1994bb..be4cd190 100644 Binary files a/desktop/resources/ego/suspended.pxa/0.pxi and b/desktop/resources/ego/suspended.pxa/0.pxi differ diff --git a/desktop/resources/ego/suspended.pxa/1.pxi b/desktop/resources/ego/suspended.pxa/1.pxi index be4cd190..117c1033 100644 Binary files a/desktop/resources/ego/suspended.pxa/1.pxi and b/desktop/resources/ego/suspended.pxa/1.pxi differ diff --git a/desktop/resources/ego/suspended.pxa/2.pxi b/desktop/resources/ego/suspended.pxa/2.pxi new file mode 100644 index 00000000..ceffb877 Binary files /dev/null and b/desktop/resources/ego/suspended.pxa/2.pxi differ diff --git a/desktop/resources/ego/suspended.pxa/3.pxi b/desktop/resources/ego/suspended.pxa/3.pxi new file mode 100644 index 00000000..dc242963 Binary files /dev/null and b/desktop/resources/ego/suspended.pxa/3.pxi differ diff --git a/desktop/resources/ego/suspended.pxa/4.pxi b/desktop/resources/ego/suspended.pxa/4.pxi new file mode 100644 index 00000000..1d1994bb Binary files /dev/null and b/desktop/resources/ego/suspended.pxa/4.pxi differ diff --git a/desktop/resources/ego/suspended.pxa/5.pxi b/desktop/resources/ego/suspended.pxa/5.pxi new file mode 100644 index 00000000..6d01fee0 Binary files /dev/null and b/desktop/resources/ego/suspended.pxa/5.pxi differ diff --git a/desktop/resources/ego/suspended.pxa/6.pxi b/desktop/resources/ego/suspended.pxa/6.pxi new file mode 100644 index 00000000..531b56ac Binary files /dev/null and b/desktop/resources/ego/suspended.pxa/6.pxi differ diff --git a/desktop/resources/ego/suspended.pxa/CelData.plist b/desktop/resources/ego/suspended.pxa/CelData.plist index 29c78f8b..8f638e26 100644 --- a/desktop/resources/ego/suspended.pxa/CelData.plist +++ b/desktop/resources/ego/suspended.pxa/CelData.plist @@ -10,5 +10,25 @@ duration 1 + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + + + duration + 1 + diff --git a/desktop/resources/held/dot.png b/desktop/resources/held/dot.png new file mode 100644 index 00000000..9b630c47 Binary files /dev/null and b/desktop/resources/held/dot.png differ diff --git a/desktop/resources/held/explode b/desktop/resources/held/explode new file mode 100644 index 00000000..4cdc42de --- /dev/null +++ b/desktop/resources/held/explode @@ -0,0 +1,276 @@ +Untitled +- Delay - +active: false +- Duration - +lowMin: 1000.0 +lowMax: 1000.0 +- Count - +min: 0 +max: 300 +- Emission - +lowMin: 0.0 +lowMax: 0.0 +highMin: 200.0 +highMax: 50.0 +relative: false +scalingCount: 2 +scaling0: 1.0 +scaling1: 0.63265306 +timelineCount: 2 +timeline0: 0.0 +timeline1: 1.0 +- Life - +lowMin: 0.0 +lowMax: 0.0 +highMin: 3000.0 +highMax: 3000.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Life Offset - +active: false +- X Offset - +active: false +- Y Offset - +active: false +- Spawn Shape - +shape: point +- Spawn Width - +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Spawn Height - +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Scale - +lowMin: 0.0 +lowMax: 0.0 +highMin: 32.0 +highMax: 32.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Velocity - +active: true +lowMin: 75.0 +lowMax: 75.0 +highMin: 800.0 +highMax: 800.0 +relative: false +scalingCount: 3 +scaling0: 1.0 +scaling1: 0.8979592 +scaling2: 0.3877551 +timelineCount: 3 +timeline0: 0.0 +timeline1: 0.11643836 +timeline2: 1.0 +- Angle - +active: true +lowMin: -90.0 +lowMax: -90.0 +highMin: 0.0 +highMax: 360.0 +relative: false +scalingCount: 2 +scaling0: 1.0 +scaling1: 1.0 +timelineCount: 2 +timeline0: 0.0 +timeline1: 0.4178082 +- Rotation - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: 3600.0 +highMax: -3600.0 +relative: false +scalingCount: 2 +scaling0: 0.3265306 +scaling1: 1.0 +timelineCount: 2 +timeline0: 0.0 +timeline1: 1.0 +- Wind - +active: false +- Gravity - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 3 +scaling0: 1.0 +scaling1: 1.0 +scaling2: 1.0 +timelineCount: 3 +timeline0: 0.0 +timeline1: 0.15068494 +timeline2: 0.48630136 +- Tint - +colorsCount: 3 +colors0: 1.0 +colors1: 1.0 +colors2: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Transparency - +lowMin: 0.0 +lowMax: 0.0 +highMin: 1.0 +highMax: 1.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Options - +attached: false +continuous: false +aligned: false +additive: false +behind: false +premultipliedAlpha: false +- Image Path - +flesh.png + + +Untitled +- Delay - +active: false +- Duration - +lowMin: 1000.0 +lowMax: 1000.0 +- Count - +min: 0 +max: 500 +- Emission - +lowMin: 0.0 +lowMax: 0.0 +highMin: 500.0 +highMax: 500.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Life - +lowMin: 0.0 +lowMax: 0.0 +highMin: 500.0 +highMax: 500.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Life Offset - +active: false +- X Offset - +active: false +- Y Offset - +active: false +- Spawn Shape - +shape: point +- Spawn Width - +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Spawn Height - +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Scale - +lowMin: 0.0 +lowMax: 0.0 +highMin: 1.0 +highMax: 8.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Velocity - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: 500.0 +highMax: 500.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Angle - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 360.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Rotation - +active: false +- Wind - +active: false +- Gravity - +active: false +- Tint - +colorsCount: 3 +colors0: 1.0 +colors1: 0.10980392 +colors2: 0.03137255 +timelineCount: 1 +timeline0: 0.0 +- Transparency - +lowMin: 0.0 +lowMax: 0.0 +highMin: 1.0 +highMax: 1.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Options - +attached: false +continuous: false +aligned: false +additive: false +behind: false +premultipliedAlpha: false +- Image Path - +dot.png diff --git a/desktop/resources/held/flesh.png b/desktop/resources/held/flesh.png new file mode 100644 index 00000000..4387a9fc Binary files /dev/null and b/desktop/resources/held/flesh.png differ diff --git a/desktop/resources/secret-hideout.mp3 b/desktop/resources/secret-hideout.mp3 new file mode 100644 index 00000000..51228a7d Binary files /dev/null and b/desktop/resources/secret-hideout.mp3 differ diff --git a/desktop/resources/secret-hideout.ogg b/desktop/resources/secret-hideout.ogg new file mode 100644 index 00000000..fef151d1 Binary files /dev/null and b/desktop/resources/secret-hideout.ogg differ diff --git a/desktop/resources/secret-hideout.wav b/desktop/resources/secret-hideout.wav new file mode 100644 index 00000000..282f5e20 Binary files /dev/null and b/desktop/resources/secret-hideout.wav differ diff --git a/desktop/resources/space/grow-explode b/desktop/resources/space/grow-explode new file mode 100644 index 00000000..8de337ea --- /dev/null +++ b/desktop/resources/space/grow-explode @@ -0,0 +1,291 @@ +Untitled +- Delay - +active: false +- Duration - +lowMin: 300.0 +lowMax: 300.0 +- Count - +min: 0 +max: 300 +- Emission - +lowMin: 0.0 +lowMax: 0.0 +highMin: 400.0 +highMax: 50.0 +relative: false +scalingCount: 2 +scaling0: 1.0 +scaling1: 0.63265306 +timelineCount: 2 +timeline0: 0.0 +timeline1: 1.0 +- Life - +lowMin: 0.0 +lowMax: 0.0 +highMin: 3000.0 +highMax: 3000.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Life Offset - +active: false +- X Offset - +active: false +- Y Offset - +active: false +- Spawn Shape - +shape: point +- Spawn Width - +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Spawn Height - +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Scale - +lowMin: 0.0 +lowMax: 0.0 +highMin: 14.0 +highMax: 14.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Velocity - +active: true +lowMin: 75.0 +lowMax: 75.0 +highMin: 300.0 +highMax: 300.0 +relative: false +scalingCount: 3 +scaling0: 1.0 +scaling1: 0.8979592 +scaling2: 0.3877551 +timelineCount: 3 +timeline0: 0.0 +timeline1: 0.11643836 +timeline2: 1.0 +- Angle - +active: true +lowMin: -90.0 +lowMax: -90.0 +highMin: 0.0 +highMax: 360.0 +relative: false +scalingCount: 2 +scaling0: 1.0 +scaling1: 1.0 +timelineCount: 2 +timeline0: 0.0 +timeline1: 0.4178082 +- Rotation - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: 3600.0 +highMax: -3600.0 +relative: false +scalingCount: 2 +scaling0: 0.3265306 +scaling1: 1.0 +timelineCount: 2 +timeline0: 0.0 +timeline1: 1.0 +- Wind - +active: false +- Gravity - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 3 +scaling0: 1.0 +scaling1: 1.0 +scaling2: 1.0 +timelineCount: 3 +timeline0: 0.0 +timeline1: 0.15068494 +timeline2: 0.48630136 +- Tint - +colorsCount: 3 +colors0: 1.0 +colors1: 1.0 +colors2: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Transparency - +lowMin: 0.0 +lowMax: 0.0 +highMin: 1.0 +highMax: 1.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Options - +attached: false +continuous: false +aligned: false +additive: false +behind: false +premultipliedAlpha: false +- Image Path - +flesh.png + + +Untitled +- Delay - +active: false +- Duration - +lowMin: 300.0 +lowMax: 300.0 +- Count - +min: 0 +max: 500 +- Emission - +lowMin: 0.0 +lowMax: 0.0 +highMin: 500.0 +highMax: 500.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Life - +lowMin: 0.0 +lowMax: 0.0 +highMin: 500.0 +highMax: 500.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Life Offset - +active: false +- X Offset - +active: false +- Y Offset - +active: false +- Spawn Shape - +shape: point +- Spawn Width - +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Spawn Height - +lowMin: 0.0 +lowMax: 0.0 +highMin: 0.0 +highMax: 0.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Scale - +lowMin: 1.0 +lowMax: 1.0 +highMin: 5.0 +highMax: 3.0 +relative: false +scalingCount: 2 +scaling0: 1.0 +scaling1: 0.0 +timelineCount: 2 +timeline0: 0.0 +timeline1: 1.0 +- Velocity - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: 200.0 +highMax: 200.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Angle - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: -360.0 +highMax: 360.0 +relative: false +scalingCount: 2 +scaling0: 1.0 +scaling1: 1.0 +timelineCount: 2 +timeline0: 0.0 +timeline1: 1.0 +- Rotation - +active: true +lowMin: 0.0 +lowMax: 0.0 +highMin: 360.0 +highMax: -360.0 +relative: false +scalingCount: 2 +scaling0: 0.0 +scaling1: 1.0 +timelineCount: 2 +timeline0: 0.0 +timeline1: 1.0 +- Wind - +active: false +- Gravity - +active: false +- Tint - +colorsCount: 3 +colors0: 1.0 +colors1: 0.101960786 +colors2: 0.03137255 +timelineCount: 1 +timeline0: 0.0 +- Transparency - +lowMin: 0.0 +lowMax: 0.0 +highMin: 1.0 +highMax: 1.0 +relative: false +scalingCount: 1 +scaling0: 1.0 +timelineCount: 1 +timeline0: 0.0 +- Options - +attached: false +continuous: false +aligned: false +additive: false +behind: false +premultipliedAlpha: false +- Image Path - +dot.png diff --git a/desktop/resources/space/susp.png b/desktop/resources/space/susp.png new file mode 100644 index 00000000..ca4d17eb Binary files /dev/null and b/desktop/resources/space/susp.png differ diff --git a/desktop/resources/ui/slider-bar-hover.png b/desktop/resources/ui/slider-bar-hover.png new file mode 100644 index 00000000..66c72c5a Binary files /dev/null and b/desktop/resources/ui/slider-bar-hover.png differ diff --git a/desktop/resources/ui/slider-bar.png b/desktop/resources/ui/slider-bar.png index a31eed34..3b41f6b2 100644 Binary files a/desktop/resources/ui/slider-bar.png and b/desktop/resources/ui/slider-bar.png differ diff --git a/desktop/resources/ui/ui.atlas b/desktop/resources/ui/ui.atlas index 6f4af589..89331bba 100644 --- a/desktop/resources/ui/ui.atlas +++ b/desktop/resources/ui/ui.atlas @@ -1,12 +1,12 @@ ui.png -size: 32,128 +size: 128,64 format: RGBA8888 filter: Nearest,Nearest repeat: none slider rotate: false - xy: 2, 2 + xy: 46, 42 size: 20, 20 split: 8, 8, 8, 8 orig: 20, 20 @@ -14,8 +14,15 @@ slider index: -1 slider-bar rotate: false - xy: 2, 24 - size: 20, 40 - orig: 20, 40 + xy: 2, 2 + size: 20, 60 + orig: 20, 60 + offset: 0, 0 + index: -1 +slider-bar-hover + rotate: false + xy: 24, 2 + size: 20, 60 + orig: 20, 60 offset: 0, 0 index: -1 diff --git a/desktop/resources/ui/ui.json b/desktop/resources/ui/ui.json index 0721c40a..83f4bb5a 100644 --- a/desktop/resources/ui/ui.json +++ b/desktop/resources/ui/ui.json @@ -2,4 +2,5 @@ com.badlogic.gdx.scenes.scene2d.ui.Slider$SliderStyle: { default-horizontal: { background: slider, knob: slider-bar } + default-horizontal-hover: { background: slider, knob: slider-bar-hover } }} diff --git a/desktop/resources/ui/ui.png b/desktop/resources/ui/ui.png index 815bcc24..2e479721 100644 Binary files a/desktop/resources/ui/ui.png and b/desktop/resources/ui/ui.png differ diff --git a/desktop/settings.edn b/desktop/settings.edn index 61ad08f4..cc4e8079 100644 --- a/desktop/settings.edn +++ b/desktop/settings.edn @@ -1 +1 @@ -{:sound-volume 0.0, :music-volume 0.0} \ No newline at end of file +{:sound-volume 86.0, :music-volume 59.0} \ No newline at end of file diff --git a/desktop/src-common/advent/actions.clj b/desktop/src-common/advent/actions.clj index 7b452af1..174591f4 100644 --- a/desktop/src-common/advent/actions.clj +++ b/desktop/src-common/advent/actions.clj @@ -622,8 +622,8 @@ old-music (get-music (get-in entities [:room :music]) (get-in entities [:state :time])) entities (as-> entities e (assoc-in e [:room] (get-in entities [:rooms new-background])) - (if between (between screen e) e) (assoc-in e [:room :entities :ego] ego) + (if between (between screen e) e) (assoc-in e [:state :last-room] new-background) (assoc-in e [:tweens :fade-in] (tween/tween :fade-in screen [:fade :opacity] 1.0 0.0 time)) (if-not (get-in entities [:cam :paused?]) diff --git a/desktop/src-common/advent/screens/rooms/cat_tree.clj b/desktop/src-common/advent/screens/rooms/cat_tree.clj index 084e7bba..718c206d 100644 --- a/desktop/src-common/advent/screens/rooms/cat_tree.clj +++ b/desktop/src-common/advent/screens/rooms/cat_tree.clj @@ -235,7 +235,7 @@ (actions/do-dialogue entities :ego "I wonder what all of these magic devices do.")))} :grass {:box [26 105 60 160] :script (actions/get-script entities - (if (not (actions/has-item? entities :grass)) + (if (not (actions/has-obtained? entities :grass)) (do (actions/walk-to entities :ego [60 100] :face :left) (actions/play-animation entities :ego :reach) diff --git a/desktop/src-common/advent/screens/rooms/common.clj b/desktop/src-common/advent/screens/rooms/common.clj index ae5358b0..aa46ec3d 100644 --- a/desktop/src-common/advent/screens/rooms/common.clj +++ b/desktop/src-common/advent/screens/rooms/common.clj @@ -5,6 +5,7 @@ [advent.screens.items :as items] [advent.utils :as utils] [advent.pathfind] + [advent.tween :as tween] [clojure.zip :as zip] [play-clj.core :refer :all] [play-clj.ui :refer :all] @@ -14,7 +15,7 @@ (defn go-to-jail [entities] (actions/update-state entities #(assoc % :time :night)) - (actions/update-state entities #(assoc % :chest-contents (concat (remove #{:key} (:inventory %)) (:chest-contents %)))) + (actions/update-state entities #(assoc % :chest-contents (concat (remove #{:key :ladder} (:inventory %)) (:chest-contents %)))) (actions/update-state entities #(assoc % :inventory [])) (actions/update-state entities #(assoc % :opened-bars? false)) (actions/transition-background entities :inside-jail [130 85])) @@ -96,6 +97,70 @@ ((rand-nth [listen-1 listen-2 listen-3]) entities)) +(defn explode [entities] + + (actions/run-action entities + (begin [this screen entities] + + + (-> entities + (update-in [:room :entities :bloodclot] #(actions/start-animation screen % :explode)) + (update-in [:room :entities] dissoc :bloodclot-head) + (assoc-in [:room :entities :ego :facing] :right) + (update-in [:room :entities :ego] #(actions/start-animation screen % :crawl)))) + + (continue [this screen entities] + (if (= 170 (get-in entities [:room :entities :bloodclot :current-frame-index])) + (particle-effect! (get-in entities [:room :entities :grow-explode]) :start)) + + (let [move-speed (* 0.17 + (/ (:delta-time screen) + (/ 1.0 60.0))) + entities (update-in entities [:room :entities :ego :x] #(max 80 (- % move-speed)))] + (if (= 80 (get-in entities [:room :entities :ego :x])) + (update-in entities [:room :entities :ego] #(actions/start-animation screen % :crawl-hide)) + + entities ))) + + (done? [this screen entities] + (= (get-in entities [:room :entities :bloodclot :current-frame-index]) 176)) + + (terminate [this screen entities] + (-> entities + (update-in [:room :entities] dissoc :bloodclot) + (assoc-in [:tweens :flash] (tween/tween :flash screen [:white-fade :opacity] 0.0 1.0 0.2 :ease tween/ease-in-cubic)))) + (can-skip? [this screen entities] + false)) + (actions/run-action entities + (begin [this screen entities] + entities) + + (continue [this screen entities] + entities) + + (done? [this screen entities] + (not (get-in entities [:tweens :flash]))) + + (terminate [this screen entities] + entities) + (can-skip? [this screen entities] + false)) + + (actions/run-action entities + (begin [this screen entities] + (assoc-in entities [:tweens :flash] (tween/tween :flash screen [:white-fade :opacity] 1.0 0.0 4.0 :ease tween/ease-in-cubic))) + + (continue [this screen entities] + entities) + + (done? [this screen entities] + (not (get-in entities [:tweens :flash]))) + + (terminate [this screen entities] + (update-in entities [:room :entities :ego] dissoc :stand-override)) + (can-skip? [this screen entities] + false))) + (defn win [] (actions/get-script entities (actions/do-dialogue entities @@ -103,13 +168,17 @@ :ego "I have this potion which will make me as strong as you!" :bloodclot-head "What?!" :bloodclot-head "Give it here!") - (actions/transition-background entities :space [200 45]) + (actions/transition-background entities :space [200 45] :between (fn [s e] + (-> e + (assoc-in [:room :entities :ego :stand-override] :crawl-stand) + (update-in [:room :entities :ego] #(actions/start-animation s % :crawl-stand))) + )) (actions/do-dialogue entities :bloodclot-head "Yes!" :bloodclot-head "Ultimate power is mine!" :bloodclot-head "If I drink this entire bottle, I'll be as powerful as a god!") - (actions/remove-entity entities :bloodclot-head) - - #_(particle-effect! (get-in @entities [:room :entities :blowup] ) :start) - (actions/play-animation entities :bloodclot :explode) - (Thread/sleep 15000))) + + (explode entities) + (actions/play-animation entities :ego :standup) + (Thread/sleep 15000) + )) diff --git a/desktop/src-common/advent/screens/rooms/dream.clj b/desktop/src-common/advent/screens/rooms/dream.clj index 9b11e782..aa52915c 100644 --- a/desktop/src-common/advent/screens/rooms/dream.clj +++ b/desktop/src-common/advent/screens/rooms/dream.clj @@ -72,6 +72,13 @@ (can-skip? [this screen entities] false))) + +(defn face-fairy [entities] + (if (< (get-in @entities [:room :entities :fairy-godfather :x]) + (get-in @entities [:room :entities :ego :x])) + (actions/do-stop entities :ego :face :left) + (actions/do-stop entities :ego :face :right))) + (defn read-sword-plaque [entities] (actions/walk-to entities :ego [168 76] :face :left) (actions/talk entities :ego "There's a plaque here.") @@ -82,9 +89,11 @@ :ego "'Because maidens love guys with might.'" :ego "Awesome!" :ego "If I become a knight, maybe Georgia McGorgeous will love me!") - (actions/in-love entities) + (when-not (get-in @entities [:state :plaques-read :sword]) + (actions/in-love entities)) (actions/stop-walking entities :ego :face :right) (when-not (get-in @entities [:room :entities :fairy-godfather :distracted?]) + (face-fairy entities) (actions/do-dialogue entities :fairy-godfather "Tick, I told you that you can't be a knight." :fairy-godfather "I think you'd be much better suited for a more menial job." @@ -106,6 +115,7 @@ (actions/play-animation entities :ego :sigh) (when-not (get-in @entities [:room :entities :fairy-godfather :distracted?]) + (face-fairy entities) (actions/talk entities :ego "So can I at least slay ghouls with this broom?") (actions/stop-walking entities :ego :face :left) (actions/do-dialogue entities :fairy-godfather "Not quite, young Tick." @@ -125,6 +135,7 @@ :ego "'Gals dislike guys who bury souls.'") (actions/play-animation entities :ego :sigh) (when-not (get-in @entities [:room :entities :fairy-godfather :distracted?]) + (face-fairy entities) (actions/do-dialogue entities :fairy-godfather "Don't be dismayed, young Tick." :fairy-godfather "Remember, these destinies can't be mistaken." @@ -165,24 +176,24 @@ :fairy-godfather "These, young Tick, represent the potential destinies for your life." :fairy-godfather "They have been selected since the dawn of time." :fairy-godfather "These destinies are never mistaken." - :ego "Soo, I've been destined to be a shovel since the dawn of time?" + :ego "So, I've been destined to be a shovel since the dawn of time?" :fairy-godfather "No, no, no!") (actions/update-entities entities #(update-in % [:room :entities :fairy-godfather] dissoc :path)) - (actions/walk-straight-to entities :fairy-godfather [87 120] :speed 3.0 :update-baseline? false) + (actions/walk-straight-to entities :fairy-godfather [87 120] :speed 1.75 :update-baseline? false) (actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] assoc :path (catmull-rom-spline (map #(apply vector-2* %) [[87 120] [87 124]]) true)))) (actions/do-dialogue entities :fairy-godfather "This shovel represents the job of grave-digger." :fairy-godfather "A simple job, for a simple fellow." :ego "Hey! " :ego "I'm not simple.") (actions/update-entities entities #(update-in % [:room :entities :fairy-godfather] dissoc :path)) - (actions/walk-straight-to entities :fairy-godfather [260 120] :speed 3.0 :update-baseline? false) + (actions/walk-straight-to entities :fairy-godfather [260 120] :speed 1.75 :update-baseline? false) (actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] assoc :path (catmull-rom-spline (map #(apply vector-2* %) [[260 120] [260 124]]) true)))) (actions/do-dialogue entities :fairy-godfather "Next, we have the broom, representing the humble job of a janitor." :ego "I'm not going to be a janitor!" :ego "I'm going to take the sword and be a knight!" :fairy-godfather "Hmm? Sword?") (actions/update-entities entities #(update-in % [:room :entities :fairy-godfather] dissoc :path)) - (actions/walk-straight-to entities :fairy-godfather [192 120] :speed 3.0 :update-baseline? false) + (actions/walk-straight-to entities :fairy-godfather [192 120] :speed 1.75 :update-baseline? false) (actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] assoc :path (catmull-rom-spline (map #(apply vector-2* %) [[192 118] [192 124]]) true)))) (actions/do-dialogue entities :fairy-godfather "Sword...?" @@ -249,10 +260,11 @@ :fairy-godfather "Let me go check it out.") (actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] dissoc :path))) (actions/update-entities entities (fn [e] (update-in e [:room :entities :fairy-godfather] assoc :distracted? true))) - (actions/walk-straight-to entities :fairy-godfather [211 210] )) + (actions/walk-straight-to entities :fairy-godfather [211 210] :face :left)) (defn talk-to-fairy [entities] (do + (face-fairy entities) (actions/do-dialogue entities :fairy-godfather "Young Tick, you must choose your destiny!") (actions/present-choices entities {:choices ["What if I don't like any of these choices?" {:run #(do (actions/respond entities % @@ -269,8 +281,8 @@ :ego "I saw a, um...")) :choices ["... a dragon!" {:run #(distract entities % "dragon")} - "... a flying zebra!" - {:run #(distract entities % "flying zebra")} + "... a ghost!" + {:run #(distract entities % "ghost")} "... a fairy godfather-eating plant!" {:run #(distract entities % "fairy godfather-eating plant")}] } @@ -293,7 +305,7 @@ (defn make [screen] (let [fairy-godfather-anim (utils/make-anim "dream/fairy-godfather.png" [63 77] 0.15 [0 1 2 3 2 1 0 1 4 3 2 1]) fairy-godfather-talk-anim (utils/make-anim "dream/fairy-godfather.png" [63 77] 0.15 [5 6 7 8 7 6])] - (rooms/make :music :town-1 + (rooms/make :music :dream :interactions {:pit {:box [54 0 219 36] :script (actions/get-script entities (actions/walk-to entities :ego [154 41]) @@ -307,7 +319,7 @@ (actions/play-animation entities :ego :reach-stop :stop? true) (actions/do-dialogue entities :ego "I can't bring myself to do it." - :ego "That sounds horrible!" + :ego "It seems like misery!" :ego "Plus, how can I ever win the heart of my true love, Georgia McGorgeous?")) :broom (actions/get-script entities (actions/walk-to entities :ego [154 41]) @@ -318,7 +330,7 @@ (actions/play-animation entities :ego :reach-stop :stop? true) (actions/do-dialogue entities :ego "I can't bring myself to do it." - :ego "That sounds horrible!" + :ego "It seems like misery!" :ego "Plus, how can I ever win the heart of my true love, Georgia McGorgeous?"))}}} :timers {:return [15.0 15.0 return-from-island]} :layers [(assoc (texture "dream/clouds1.png") :x -10 :y 0 :baseline -1 :parallax 0.2 :scale-x 1.1 :scale-y 1.1) @@ -350,8 +362,9 @@ (actions/remove-item entities :dream-sword) (actions/remove-item entities :broom) (actions/remove-item entities :shovel) - (actions/transition-background entities :inside-castle [79 145] :time 5.0) + (actions/transition-background entities :inside-castle [92 150] :time 8.0) (actions/resume-camera entities) + (actions/walk-straight-to entities :ego [79 145] :stop? false) (actions/walk-to entities :ego [159 74]) (actions/do-dialogue entities :ego "Man! What a dream!" diff --git a/desktop/src-common/advent/screens/rooms/inside_jail.clj b/desktop/src-common/advent/screens/rooms/inside_jail.clj index 9018203f..1a0889c8 100644 --- a/desktop/src-common/advent/screens/rooms/inside_jail.clj +++ b/desktop/src-common/advent/screens/rooms/inside_jail.clj @@ -60,15 +60,27 @@ (defn do-warden-dialogue [entities] (actions/do-dialogue entities :ego "Hey, who are you? Why am I in this cell?" - :warden "You're under arrest for theft of public property." - :ego "Under arrest? But I'm the good guy!\nThe game is named after me!" - :warden "Sorry chap. The law's the law.") + :warden "You're under arrest for theft of property." + :ego "Under arrest? Theft of property?" + :ego "I didn't steal the Sword of Blergh, I fulfilled the prophecy." + :warden "Slow down there, chap." + :warden "You're not under arrest for theft of the sword." + :warden "You're under arrest for stealing the Duke of Remington's ladder." + :ego "But I'm the good guy!\nThe game is named after me!" + :warden "Sorry chap. The law's the law." + ) (actions/present-choices entities {:choices ["But I'm just a kid." {:run #(actions/respond entities % :warden "The Duke of Remington is a very stern chap." :warden "He doesn't bend the rules, even for young thieves.") :choices actions/previous-choices} + "Took, son of Luke, son of Puke gave me that ladder!" + {:run #(actions/respond entities % + :warden "It wasn't his to give." + :warden "In fact, he's off to the gallows come dawn." + :ego "Oh, no.") + :choices actions/previous-choices} "But I was going to teach Bloodclot a lesson!" {:run #(actions/respond entities % :warden "Sure you were. If he even exists." diff --git a/desktop/src-common/advent/screens/rooms/inside_stash.clj b/desktop/src-common/advent/screens/rooms/inside_stash.clj index 638f922c..8cabbd17 100644 --- a/desktop/src-common/advent/screens/rooms/inside_stash.clj +++ b/desktop/src-common/advent/screens/rooms/inside_stash.clj @@ -48,7 +48,7 @@ (defn make [screen] - (rooms/make :music {:day :town-2 :night :night} + (rooms/make :music {:day :secret-hideout :night :secret-hideout} :interactions {:left-dir {:box [91 60 125 140] :script (actions/get-script diff --git a/desktop/src-common/advent/screens/rooms/outside_house.clj b/desktop/src-common/advent/screens/rooms/outside_house.clj index 037b4f22..945fbfc2 100644 --- a/desktop/src-common/advent/screens/rooms/outside_house.clj +++ b/desktop/src-common/advent/screens/rooms/outside_house.clj @@ -346,7 +346,7 @@ (if (= :night (get-in @entities [:state :time])) (actions/talk entities :ego "It's locked.") (do (actions/transition-background entities :inside-house [237 0] :between (fn [s e] - (if (= 1 (rand-int 3)) + (if (= 1 (rand-int 10)) (assoc-in e [:room :entities :experiment] (get-in e [:room :experiment])) e))) (when (get-in @entities [:room :entities :experiment]) @@ -419,7 +419,8 @@ (walk-to-sheep entities) (actions/talk entities :ego "Come on girl, get the grass!") (actions/play-animation entities :ego :reach) - (actions/talk entities :ego "I think she's not interested.")) + (actions/talk entities :ego "I think she's not interested.") + (leave-sheep entities)) :carrot (actions/get-script entities (walk-to-sheep entities) (actions/talk entities :ego "Come on girl, get the carrot!") diff --git a/desktop/src-common/advent/screens/rooms/space.clj b/desktop/src-common/advent/screens/rooms/space.clj index 558f0c26..e5f75851 100644 --- a/desktop/src-common/advent/screens/rooms/space.clj +++ b/desktop/src-common/advent/screens/rooms/space.clj @@ -182,7 +182,8 @@ bloodclot-explode (utils/make-anim "space/bloodclot-explode.png" [106 165] 0.075 [0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 5 5 5 4 4 4 4 5 5 5 5 5 4 4 4 4 5 5 4 4 4 4 5 5 5 4 5 5 5 5 5 5 5 5 6 5 5 5 5 6 6 5 5 5 5 5 5 5 6 6 6 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 7 6 7 7 5 6 6 6 6 6 7 7 7 7 6 6 6 6 6 6 6 6 6 6 7 7 7 7 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 10 11 12 13 14 15 16 17 18 19]) bullet (utils/make-anim "space/bullet.png" [24 24] 0.0075 [0 1 2 0 1 2 0 1 2 0 1 2 0 1 2 3 3 3 4 4 5 5 6 5 4 7]) effect (particle-effect "space/appear") - blowup-effect (particle-effect "space/blowup")] + blowup-effect (particle-effect "space/blowup") + grow-explode (particle-effect "space/grow-explode")] (rooms/make :music :fight :interactions {} @@ -192,6 +193,9 @@ :entities {:appear (assoc effect :x 240 :y 50 :baseline 200) + :grow-explode (assoc grow-explode + :x 240 :y 130 + :baseline 200) :blowup (assoc blowup-effect :x 225 :y 175 :baseline 240) diff --git a/desktop/src-common/advent/screens/scene.clj b/desktop/src-common/advent/screens/scene.clj index ef5bee62..b82892b1 100644 --- a/desktop/src-common/advent/screens/scene.clj +++ b/desktop/src-common/advent/screens/scene.clj @@ -364,7 +364,11 @@ void main() axe (utils/make-anim "ego/axe.png" [60 70] 0.10 (flatten [1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 (range 7)])) axe-wood (utils/make-anim "ego/axe-wood.png" [60 70] 0.10 (flatten [1 1 1 1 1 0 0 0 1 1 1 1 1 0 0 0 0 (range 11)])) suspended (utils/make-anim "ego/suspended.png" [18 36] 0.10 [0]) - suspended-talk (utils/make-anim "ego/suspended.png" [18 36] 0.20 [0 1]) + suspended-talk (utils/make-anim "ego/suspended.png" [18 36] 0.20 (range 7)) + crawl (utils/make-anim "ego/crawl.png" [39 25] 0.2 (range 4)) + crawl-stand (utils/make-anim "ego/crawl.png" [39 25] 0.2 [0]) + crawl-hide (utils/make-anim "ego/crawl.png" [39 25] 0.1 (flatten [(repeat 10 3) (range 4 7) (repeat 50 6) (reverse (range 4 7) ) (repeat 20 3)])) + standup (utils/make-anim "ego/standup.png" [45 55] 0.2 (range 5)) ego {:right {:walk walk-right :stand stand-anim @@ -411,6 +415,10 @@ void main() :axe-wood axe-wood :suspended suspended :suspended-talk suspended-talk + :crawl crawl + :crawl-stand crawl-stand + :crawl-hide crawl-hide + :standup standup } :left {:walk (utils/flip walk-right) :stand (utils/flip stand-anim) @@ -448,6 +456,10 @@ void main() :axe-wood (utils/flip axe-wood) :suspended (utils/flip suspended) :suspended-talk (utils/flip suspended-talk) + :crawl (utils/flip crawl) + :crawl-stand (utils/flip crawl-stand) + :crawl-hide (utils/flip crawl-hide) + :standup (utils/flip standup) } :baseline (- 240 (last start-pos)) :facing :right @@ -534,6 +546,10 @@ void main() :anim-merges {(get-in ego [:right :shock]) {:origin-x 15} (get-in ego [:left :swing-shovel]) {:origin-x 26} (get-in ego [:right :swing-shovel]) {:origin-x 26} + (get-in ego [:right :standup]) {:origin-x 32} + (get-in ego [:right :crawl]) {:origin-x 32} + (get-in ego [:right :crawl-hide]) {:origin-x 32} + (get-in ego [:right :crawl-stand]) {:origin-x 32} (get-in ego [:right :axe]) {:origin-x 17} (get-in ego [:right :axe-wood]) {:origin-x 17} (get-in ego [:left :love]) {:origin-x 36} @@ -684,6 +700,7 @@ void main() (when shader (.setUniformf shader "multiply_amount" (float (or multiply-amount 1.0))) (.setUniformf shader "hue_amount" (float (or hue-amount 1.0)))) + (.setColor batch (color (:r e 1.0) (:g e 1.0) (:b e 1.0) (:opacity e 1.0))) @@ -765,7 +782,9 @@ void main() :inside-fangald (utils/make-music "inside-fangald.ogg") :fight (utils/make-music "megaboss.mp3") :pull-sword (utils/make-music "pull-sword.ogg") - :night (utils/make-music "night.ogg")} + :night (utils/make-music "night.ogg") + :dream (utils/make-music "dream/music.ogg") + :secret-hideout (utils/make-music "secret-hideout.ogg")} :state (get-state) :time-profiles {:object nil :default utils/default-night-merge diff --git a/desktop/src-common/advent/screens/title.clj b/desktop/src-common/advent/screens/title.clj index 3475aff0..48732ecd 100644 --- a/desktop/src-common/advent/screens/title.clj +++ b/desktop/src-common/advent/screens/title.clj @@ -15,6 +15,7 @@ (:import [com.badlogic.gdx.graphics Pixmap Pixmap$Filter Texture Texture$TextureFilter] [com.badlogic.gdx.graphics.g2d TextureRegion] [com.badlogic.gdx.utils.viewport FitViewport] + [com.badlogic.gdx.scenes.scene2d.ui Slider$SliderStyle] [com.badlogic.gdx.scenes.scene2d.utils Align] [com.badlogic.gdx Application Audio Files Game Gdx Graphics Input InputMultiplexer InputProcessor Net Preferences Screen])) @@ -29,6 +30,12 @@ (label! e :set-style (style :label font (get-color e mouse-pos))) e) +(defn style-slider [s mouse-pos] + (if (utils/intersects? s mouse-pos) + (slider! s :set-style (:hover s)) + (slider! s :set-style (:default s))) + s) + (defn center [e] (assoc e :x (- (/ 1280 2) (/ (.getWidth (:object e)) 2)))) @@ -39,9 +46,9 @@ (utils/setup-viewport screen 1280 960) (utils/load-settings!) (let [font (utils/get-font "ego/font.fnt") - start-playing (assoc (label "Embark on thy adventure" (style :label font (color 0.6 1.0 1.0 1.0))) :x 0 :y 100 :height 32 :origin-x 0 :origin-y 0) + start-playing (assoc (label "Begin quest" (style :label font (color 0.6 1.0 1.0 1.0))) :x 0 :y 300 :height 64 :origin-x 0 :origin-y 0) start-playing (center start-playing) - quit (assoc (label "Quit thy adventure" (style :label font (color 0.6 1.0 1.0 1.0))) :x 0 :y 65 :height 32 :origin-x 0 :origin-y 0) + quit (assoc (label "End quest" (style :label font (color 0.6 1.0 1.0 1.0))) :x 0 :y 65 :height 32 :origin-x 0 :origin-y 0) quit (center quit) music (utils/make-music "intro.ogg") ui-skin (skin "ui/ui.json")] @@ -55,17 +62,30 @@ :opacity 1.0 :origin-x 0 :origin-y 0) - :music-volume-slider (assoc (slider {:min 0 :max 100 :step 1} ui-skin :set-value (:music-volume @utils/settings)) - :x ( - (/ 1280 2) - 150) - :width 300 - :y 200) + + :music-label (-> (label "Music" (style :label font (color 1.0 1.0 1.0 1.0))) + (assoc :x 0 :y 240 :height 32 :origin-x 0 :origin-y 0) + center) + :music-volume-slider (-> (slider {:min 0 :max 100 :step 1} ui-skin :set-value (:music-volume @utils/settings)) + (assoc :x (- (/ 1280 2) 150) + :width 300 + :y 195 + :hover (skin! ui-skin :get "default-horizontal-hover" Slider$SliderStyle) + :default (skin! ui-skin :get "default-horizontal" Slider$SliderStyle))) + + :sound-label (-> + (label "FX" (style :label font (color 1.0 1.0 1.0 1.0))) + (assoc :x 0 :y 150 :height 32 :origin-x 0 :origin-y 0) + center) + + :sound-volume-slider (assoc (slider {:min 0 :max 100 :step 1 } ui-skin :set-value (:sound-volume @utils/settings)) :width 300 :x ( - (/ 1280 2) 150) - :y 150) - + :y 105 + :hover (skin! ui-skin :get "default-horizontal-hover" Slider$SliderStyle) + :default (skin! ui-skin :get "default-horizontal" Slider$SliderStyle)) :font font :music music :volume 1.0 @@ -81,7 +101,8 @@ (clear!) (let [entities (utils/apply-tweens screen entities (:tweens entities))] (music! (:music entities) :set-volume (utils/current-music-volume (:volume entities))) - (render! screen [(:overlay entities) (:start-playing entities) (:quit entities) (:music-volume-slider entities) (:sound-volume-slider entities) (:fade entities) ]) + () + (render! screen [(:overlay entities) (:start-playing entities) (:quit entities) (:music-label entities) (:music-volume-slider entities) (:sound-label entities) (:sound-volume-slider entities) (:fade entities) ]) entities)) :show-screen (fn [entities] @@ -91,6 +112,8 @@ (let [[x y] (utils/unproject screen)] (style-label (:start-playing entities) (get-in entities [:font]) [x y]) (style-label (:quit entities) (get-in entities [:font]) [x y]) + (style-slider (:music-volume-slider entities) [x y]) + (style-slider (:sound-volume-slider entities) [x y]) entities)) :on-ui-changed (fn [screen [entities]]