we have made things that can play music & even controlled some sounds via libraries. but lets look at controlling volume with our own ui & controls.
we start by creating a new project. heading into our 'Button.hx' that we copied from episode 047. editing it by adding a bool.
then we go into 'Project.hx' & setup some buttons, a volume indicator & our sound.
we create the mouse controls & aso extra functions that affect the volume indicator & the sounds volume.
we then make sure our indicator & sound does not go above or below the highest & lowest points & lastly render everything on screen.
p.s.
ive created an extra special edit for some reason. more for myself to laugh at since its so silly, but hope you enjoy it. i plan to do more like it in the future when needed. not always the same, but something fun ;)
the music in the edit, is from this album:
https://lewislepton.bandcamp.com/album/playground
source code:
https://github.com/lewislepton/kha-tutorial-series
SUPPORT ON PATREON FROM AS LITTLE AS $1:
https://patreon.com/lewislepton
intro & outro music is from this EP:
https://lewislepton.bandcamp.com/album/coat-noise-ep
like, share & subscribe to stay up to date.
https://lewislepton.com
https://patreon.com/lewislepton
https://twitter.com/lewislepton
https://facebook.com/lewislepton
https://lewislepton.bandcamp.com
https://soundcloud.com/lewislepton
https://github.com/lewislepton