Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+2)

Hah, forgot to lock the canvas and discovered you can "scratch" the slider if you do try to drag it. Fixed that. :P

(1 edit) (+2)

In the process of making a horizontal version I discovered the transparency mask on the slider is a mess because the card I used got all polluted by some sprite assets I subsequently removed. I've fixed the paste and also here's that horizontal one!

%%WGT0{"w":[{"name":"hSlider1","type":"contraption","size":[144,48],"pos":[358,244],"script":"on change val do\n hs.text:val\nend","def":"hSlider","widgets":{"sliderVal":{},"can":{},"buttonTop":{},"buttonBottom":{},"button1":{},"button2":{},"button3":{},"button4":{},"button5":{},"button6":{},"button7":{}}}],"d":{"hSlider":{"name":"hSlider","size":[144,48],"margin":[0,0,0,0],"description":"Horizontal version of the vertSslider widget.","script":"sliderTop:image[\"%%IMG2ADAAEAD/AGYBBgAoAQIgBgECACUBASADAQQgAwEBACMBASACAQMgAgEDIAIBAQAiAQEgAQECIAYBAiABAQEAIQEBIAIBASAIAQEgAgEBACABASABAQIgAwECIAMBAiABAQEAIAEBIAEBASADAQQgAwEBIAEBAQAgAQEgAQEBIAMBBCADAQEgAQEBABA=\"].transform[\"left\"]\nsliderT:image[\"%%IMG2ADAAEAAQAQEgAQEBIAMBBCADAQEgAQEBACABASABAQEgAwEEIAMBASABAQEAHwESAB0BASASAQEAHAEBIBIBAQAbARYAGQEBIBYBAQATAQQAAQEBIAEBFCABAQEAAQEEAA4BBAABAQEgAQEUIAEBAQABAQQAEwEBIBYBAQAZARYAGwEBIBIBAQAcAQEgEgEBAB0BEgAfAQEgAQEBIAMBBCADAQEgAQEBACABASABAQEgAwEEIAMBASABAQEAEA==\"].transform[\"left\"]\nsliderF:image[\"%%IMG2ADAAEAAQAQEgAQEBIAMBBCADAQEgAQEBACABASABAQEgAwEEIAMBASABAQEAIAEBIAEBASADAQQgAwEBIAEBAQAgAQEgAQEBIAMBBCADAQEgAQEBACABASABAQEgAwEEIAMBASABAQEAIAEBIAEBASADAQQgAwEBIAEBAQAgAQEgAQEBIAMBBCADAQEgAQEBABcBBAAFAQEgAQEBIAMBBCADAQEgAQEBAAUBBAAOAQQABQEBIAEBASADAQQgAwEBIAEBAQAFAQQAFwEBIAEBASADAQQgAwEBIAEBAQAgAQEgAQEBIAMBBCADAQEgAQEBACABASABAQEgAwEEIAMBASABAQEAIAEBIAEBASADAQQgAwEBIAEBAQAgAQEgAQEBIAMBBCADAQEgAQEBACABASABAQEgAwEEIAMBASABAQEAIAEBIAEBASADAQQgAwEBIAEBAQAQ\"].transform[\"left\"]\nsliderBottom:image[\"%%IMG2ADAAEAAQAQEgAQEBIAMBBCADAQEgAQEBACABASABAQEgAwEEIAMBASABAQEAIAEBIAEBAiADAQIgAwECIAEBAQAgAQEgAgEBIAgBASACAQEAIQEBIAEBAiAGAQIgAQEBACIBASACAQMgAgEDIAIBAQAjAQEgAwEEIAMBAQAlAQIgBgECACgBBgD/AGY=\"].transform[\"left\"]\n\non get_value do sliderVal.text+0 end\non set_value v do sliderVal.text:v end\n\non view do\n can.clear[]\n can.paste[sliderTop 0,0]\n can.paste[sliderBottom 128,0]\n \n each x in range 7\n  can.paste[sliderF (16+x*16),0 1]\n end\n \n can.paste[sliderT (16+get_value[]*16),0 1]\nend\n\non change val do\n sliderVal.text:val\n card.event[\"change\" val]\n view[]\nend","template":"on change val do\n \nend","attributes":{"name":["value"],"label":["Value"],"type":["string"]},"widgets":{"sliderVal":{"type":"field","size":[21,20],"pos":[160,0],"show":"none","border":1,"value":"0"},"can":{"type":"canvas","size":[144,48],"pos":[0,0],"locked":1,"script":"on click pos do\n \nend\n\non drag pos do\n \nend\n\non release pos do\n \nend","show":"transparent","border":0,"image":"%%IMG2AJAAMAD/AP8A/wD/AAsBAgAOAQIADgECAA4BAgAOAQIADgECAA4BAgAuAQIADgECAA4BAgAOAQIADgECAA4BAgAOAQIALgECAA4BAgAOAQIADgECAA4BAgAOAQIADgECAC4BAgAOAQIADgECAA4BAgAOAQIADgECAA4BAgC9AQQAiwEBIAQBAQCIAQMgAQECIAEBAwCFAQEgAgEBIAEBAiABAQEgAgEBAH4BByACAQEgAQECIAEBASACAWcAFgECIAYBASACAQEgAQECIAEBASACAQEgZgECABMBASADAQYgAgEBIAEBAiABAQEgAgFmIAMBAQARAQEgAgEDIAQBASACAQEgAQECIAEBASACAQEgZAEDIAIBAQAQAQEgAQECIAYBASACAQEgAQECIAEBASACAQEgZgECIAEBAQAPAQEgAgEBIAcBASACAQEgAQECIAEBASACAQEgZwEBIAIBAQAOAQEgAQECIAMBBSACAQEgAQECIAEBASACAWUgAwECIAEBAQAOAQEgAQEBIAMBBiACAQEgAQECIAEBASACAWYgAwEBIAEBAQAOAQEgAQEBIAMBBiACAQEgAQECIAEBASACAWYgAwEBIAEBAQAOAQEgAQECIAMBBSACAQEgAQECIAEBASACAWUgAwECIAEBAQAOAQEgAgEBIAcBASACAQEgAQECIAEBASACAQEgZwEBIAIBAQAPAQEgAQECIAYBASACAQEgAQECIAEBASACAQEgZgECIAEBAQAQAQEgAgEDIAQBASACAQEgAQECIAEBASACAQEgZAEDIAIBAQARAQEgAwEGIAIBASABAQIgAQEBIAIBZiADAQEAEwECIAYBASACAQEgAQECIAEBASACAQEgZgECABYBByACAQEgAQECIAEBASACAWcAHgEBIAIBASABAQIgAQEBIAIBAQCFAQMgAQECIAEBAwCIAQEgBAEBAIsBBAD/AB4BAgAOAQIADgECAA4BAgAOAQIADgECAA4BAgAuAQIADgECAA4BAgAOAQIADgECAA4BAgAOAQIALgECAA4BAgAOAQIADgECAA4BAgAOAQIADgECAC4BAgAOAQIADgECAA4BAgAOAQIADgECAA4BAgD/AP8A/wD/AAs=","scale":1},"buttonTop":{"type":"button","size":[16,48],"pos":[0,0],"script":"on click do\n v:sliderVal.text+0\n if v\n  sliderVal.text:v-1\n end\n card.event[\"change\" get_value[]]\n view[]\nend","style":"invisible"},"buttonBottom":{"type":"button","size":[16,48],"pos":[128,0],"script":"on click do\n v:sliderVal.text+0\n if v<6\n  sliderVal.text:v+1\n end\n card.event[\"change\" get_value[]]\n view[]\nend","style":"invisible"},"button1":{"type":"button","size":[16,48],"pos":[16,0],"script":"on click do\n sliderVal.text:0\n card.event[\"change\" get_value[]]\n view[]\nend","style":"invisible"},"button2":{"type":"button","size":[16,48],"pos":[32,0],"script":"on click do\n sliderVal.text:1\n card.event[\"change\" get_value[]]\n view[]\nend","style":"invisible"},"button3":{"type":"button","size":[16,48],"pos":[48,0],"script":"on click do\n sliderVal.text:2\n card.event[\"change\" get_value[]]\n view[]\nend","style":"invisible"},"button4":{"type":"button","size":[16,48],"pos":[64,0],"script":"on click do\n sliderVal.text:3\n card.event[\"change\" get_value[]]\n view[]\nend","style":"invisible"},"button5":{"type":"button","size":[16,48],"pos":[80,0],"script":"on click do\n sliderVal.text:4\n card.event[\"change\" get_value[]]\n view[]\nend","style":"invisible"},"button6":{"type":"button","size":[16,48],"pos":[96,0],"script":"on click do\n sliderVal.text:5\n card.event[\"change\" get_value[]]\n view[]\nend","style":"invisible"},"button7":{"type":"button","size":[16,48],"pos":[112,0],"script":"on click do\n sliderVal.text:6\n card.event[\"change\" get_value[]]\n view[]\nend","style":"invisible"}}}}}