- New speed adjustable slider.

This commit is contained in:
Tanasart 2024-07-26 14:38:39 +07:00
parent 2ea20b9496
commit 2308f01ecb
43 changed files with 347 additions and 506 deletions

View file

@ -380,7 +380,6 @@
{"name":"__raymarching","order":4,"path":"scripts/__raymarching/__raymarching.yy",}, {"name":"__raymarching","order":4,"path":"scripts/__raymarching/__raymarching.yy",},
{"name":"__rectangle","order":7,"path":"scripts/__rectangle/__rectangle.yy",}, {"name":"__rectangle","order":7,"path":"scripts/__rectangle/__rectangle.yy",},
{"name":"__shapes","order":3,"path":"scripts/__shapes/__shapes.yy",}, {"name":"__shapes","order":3,"path":"scripts/__shapes/__shapes.yy",},
{"name":"__sliderRange","order":3,"path":"scripts/__sliderRange/__sliderRange.yy",},
{"name":"__strandSim","order":2,"path":"scripts/__strandSim/__strandSim.yy",}, {"name":"__strandSim","order":2,"path":"scripts/__strandSim/__strandSim.yy",},
{"name":"__surface","order":7,"path":"scripts/__surface/__surface.yy",}, {"name":"__surface","order":7,"path":"scripts/__surface/__surface.yy",},
{"name":"__vec2","order":7,"path":"scripts/__vec2/__vec2.yy",}, {"name":"__vec2","order":7,"path":"scripts/__vec2/__vec2.yy",},

View file

@ -853,7 +853,6 @@
{"id":{"name":"__raymarching","path":"scripts/__raymarching/__raymarching.yy",},}, {"id":{"name":"__raymarching","path":"scripts/__raymarching/__raymarching.yy",},},
{"id":{"name":"__rectangle","path":"scripts/__rectangle/__rectangle.yy",},}, {"id":{"name":"__rectangle","path":"scripts/__rectangle/__rectangle.yy",},},
{"id":{"name":"__shapes","path":"scripts/__shapes/__shapes.yy",},}, {"id":{"name":"__shapes","path":"scripts/__shapes/__shapes.yy",},},
{"id":{"name":"__sliderRange","path":"scripts/__sliderRange/__sliderRange.yy",},},
{"id":{"name":"__strandSim","path":"scripts/__strandSim/__strandSim.yy",},}, {"id":{"name":"__strandSim","path":"scripts/__strandSim/__strandSim.yy",},},
{"id":{"name":"__surface","path":"scripts/__surface/__surface.yy",},}, {"id":{"name":"__surface","path":"scripts/__surface/__surface.yy",},},
{"id":{"name":"__vec2","path":"scripts/__vec2/__vec2.yy",},}, {"id":{"name":"__vec2","path":"scripts/__vec2/__vec2.yy",},},

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

@ -9,105 +9,105 @@
"canGenerateBitmap":true, "canGenerateBitmap":true,
"charset":0, "charset":0,
"first":0, "first":0,
"fontName":"Noto Sans", "fontName":"Noto Sans SemiBold",
"glyphOperations":0, "glyphOperations":0,
"glyphs":{ "glyphs":{
"32":{"character":32,"h":15,"offset":0,"shift":3,"w":3,"x":2,"y":2,}, "32":{"character":32,"h":15,"offset":0,"shift":3,"w":3,"x":2,"y":2,},
"33":{"character":33,"h":15,"offset":0,"shift":3,"w":3,"x":66,"y":70,}, "33":{"character":33,"h":15,"offset":0,"shift":3,"w":3,"x":37,"y":70,},
"34":{"character":34,"h":15,"offset":0,"shift":5,"w":5,"x":59,"y":70,}, "34":{"character":34,"h":15,"offset":0,"shift":5,"w":5,"x":30,"y":70,},
"35":{"character":35,"h":15,"offset":0,"shift":7,"w":7,"x":50,"y":70,}, "35":{"character":35,"h":15,"offset":0,"shift":7,"w":7,"x":21,"y":70,},
"36":{"character":36,"h":15,"offset":0,"shift":6,"w":6,"x":42,"y":70,}, "36":{"character":36,"h":15,"offset":0,"shift":6,"w":6,"x":13,"y":70,},
"37":{"character":37,"h":15,"offset":0,"shift":10,"w":10,"x":30,"y":70,}, "37":{"character":37,"h":15,"offset":0,"shift":9,"w":9,"x":2,"y":70,},
"38":{"character":38,"h":15,"offset":0,"shift":8,"w":9,"x":19,"y":70,}, "38":{"character":38,"h":15,"offset":0,"shift":8,"w":8,"x":115,"y":53,},
"39":{"character":39,"h":15,"offset":0,"shift":3,"w":3,"x":14,"y":70,}, "39":{"character":39,"h":15,"offset":0,"shift":3,"w":2,"x":111,"y":53,},
"40":{"character":40,"h":15,"offset":0,"shift":4,"w":4,"x":8,"y":70,}, "40":{"character":40,"h":15,"offset":0,"shift":3,"w":4,"x":105,"y":53,},
"41":{"character":41,"h":15,"offset":0,"shift":4,"w":4,"x":2,"y":70,}, "41":{"character":41,"h":15,"offset":0,"shift":3,"w":4,"x":99,"y":53,},
"42":{"character":42,"h":15,"offset":0,"shift":6,"w":6,"x":71,"y":70,}, "42":{"character":42,"h":15,"offset":0,"shift":6,"w":6,"x":42,"y":70,},
"43":{"character":43,"h":15,"offset":0,"shift":6,"w":6,"x":117,"y":53,}, "43":{"character":43,"h":15,"offset":0,"shift":6,"w":6,"x":91,"y":53,},
"44":{"character":44,"h":15,"offset":0,"shift":3,"w":3,"x":104,"y":53,}, "44":{"character":44,"h":15,"offset":0,"shift":3,"w":3,"x":78,"y":53,},
"45":{"character":45,"h":15,"offset":0,"shift":4,"w":4,"x":98,"y":53,}, "45":{"character":45,"h":15,"offset":0,"shift":3,"w":4,"x":72,"y":53,},
"46":{"character":46,"h":15,"offset":0,"shift":3,"w":3,"x":93,"y":53,}, "46":{"character":46,"h":15,"offset":0,"shift":3,"w":3,"x":67,"y":53,},
"47":{"character":47,"h":15,"offset":0,"shift":5,"w":5,"x":86,"y":53,}, "47":{"character":47,"h":15,"offset":0,"shift":4,"w":5,"x":60,"y":53,},
"48":{"character":48,"h":15,"offset":0,"shift":6,"w":6,"x":78,"y":53,}, "48":{"character":48,"h":15,"offset":0,"shift":6,"w":6,"x":52,"y":53,},
"49":{"character":49,"h":15,"offset":0,"shift":6,"w":5,"x":71,"y":53,}, "49":{"character":49,"h":15,"offset":0,"shift":6,"w":5,"x":45,"y":53,},
"50":{"character":50,"h":15,"offset":0,"shift":6,"w":6,"x":63,"y":53,}, "50":{"character":50,"h":15,"offset":0,"shift":6,"w":6,"x":37,"y":53,},
"51":{"character":51,"h":15,"offset":0,"shift":6,"w":6,"x":55,"y":53,}, "51":{"character":51,"h":15,"offset":0,"shift":6,"w":6,"x":29,"y":53,},
"52":{"character":52,"h":15,"offset":0,"shift":6,"w":7,"x":46,"y":53,}, "52":{"character":52,"h":15,"offset":0,"shift":6,"w":6,"x":21,"y":53,},
"53":{"character":53,"h":15,"offset":0,"shift":6,"w":6,"x":109,"y":53,}, "53":{"character":53,"h":15,"offset":0,"shift":6,"w":6,"x":83,"y":53,},
"54":{"character":54,"h":15,"offset":0,"shift":6,"w":6,"x":79,"y":70,}, "54":{"character":54,"h":15,"offset":0,"shift":6,"w":6,"x":50,"y":70,},
"55":{"character":55,"h":15,"offset":0,"shift":6,"w":6,"x":87,"y":70,}, "55":{"character":55,"h":15,"offset":0,"shift":6,"w":6,"x":58,"y":70,},
"56":{"character":56,"h":15,"offset":0,"shift":6,"w":6,"x":95,"y":70,}, "56":{"character":56,"h":15,"offset":0,"shift":6,"w":6,"x":66,"y":70,},
"57":{"character":57,"h":15,"offset":0,"shift":6,"w":6,"x":28,"y":104,}, "57":{"character":57,"h":15,"offset":0,"shift":6,"w":6,"x":114,"y":87,},
"58":{"character":58,"h":15,"offset":0,"shift":3,"w":3,"x":23,"y":104,}, "58":{"character":58,"h":15,"offset":0,"shift":3,"w":3,"x":109,"y":87,},
"59":{"character":59,"h":15,"offset":0,"shift":3,"w":3,"x":18,"y":104,}, "59":{"character":59,"h":15,"offset":0,"shift":3,"w":3,"x":104,"y":87,},
"60":{"character":60,"h":15,"offset":0,"shift":6,"w":6,"x":10,"y":104,}, "60":{"character":60,"h":15,"offset":0,"shift":6,"w":6,"x":96,"y":87,},
"61":{"character":61,"h":15,"offset":0,"shift":6,"w":6,"x":2,"y":104,}, "61":{"character":61,"h":15,"offset":0,"shift":6,"w":6,"x":88,"y":87,},
"62":{"character":62,"h":15,"offset":0,"shift":6,"w":6,"x":117,"y":87,}, "62":{"character":62,"h":15,"offset":0,"shift":6,"w":6,"x":80,"y":87,},
"63":{"character":63,"h":15,"offset":0,"shift":5,"w":5,"x":110,"y":87,}, "63":{"character":63,"h":15,"offset":0,"shift":5,"w":5,"x":73,"y":87,},
"64":{"character":64,"h":15,"offset":0,"shift":10,"w":10,"x":98,"y":87,}, "64":{"character":64,"h":15,"offset":0,"shift":10,"w":10,"x":61,"y":87,},
"65":{"character":65,"h":15,"offset":0,"shift":8,"w":8,"x":88,"y":87,}, "65":{"character":65,"h":15,"offset":0,"shift":7,"w":8,"x":51,"y":87,},
"66":{"character":66,"h":15,"offset":0,"shift":7,"w":7,"x":79,"y":87,}, "66":{"character":66,"h":15,"offset":1,"shift":7,"w":6,"x":43,"y":87,},
"67":{"character":67,"h":15,"offset":0,"shift":7,"w":7,"x":70,"y":87,}, "67":{"character":67,"h":15,"offset":0,"shift":7,"w":7,"x":34,"y":87,},
"68":{"character":68,"h":15,"offset":0,"shift":8,"w":8,"x":60,"y":87,}, "68":{"character":68,"h":15,"offset":1,"shift":8,"w":7,"x":25,"y":87,},
"69":{"character":69,"h":15,"offset":0,"shift":6,"w":6,"x":52,"y":87,}, "69":{"character":69,"h":15,"offset":1,"shift":6,"w":5,"x":18,"y":87,},
"70":{"character":70,"h":15,"offset":0,"shift":6,"w":6,"x":44,"y":87,}, "70":{"character":70,"h":15,"offset":1,"shift":6,"w":5,"x":11,"y":87,},
"71":{"character":71,"h":15,"offset":0,"shift":8,"w":8,"x":34,"y":87,}, "71":{"character":71,"h":15,"offset":0,"shift":8,"w":7,"x":2,"y":87,},
"72":{"character":72,"h":15,"offset":0,"shift":8,"w":8,"x":24,"y":87,}, "72":{"character":72,"h":15,"offset":1,"shift":8,"w":7,"x":111,"y":70,},
"73":{"character":73,"h":15,"offset":0,"shift":4,"w":4,"x":18,"y":87,}, "73":{"character":73,"h":15,"offset":0,"shift":4,"w":4,"x":105,"y":70,},
"74":{"character":74,"h":15,"offset":-1,"shift":4,"w":4,"x":12,"y":87,}, "74":{"character":74,"h":15,"offset":-1,"shift":3,"w":4,"x":99,"y":70,},
"75":{"character":75,"h":15,"offset":0,"shift":7,"w":8,"x":2,"y":87,}, "75":{"character":75,"h":15,"offset":1,"shift":7,"w":6,"x":91,"y":70,},
"76":{"character":76,"h":15,"offset":0,"shift":6,"w":6,"x":115,"y":70,}, "76":{"character":76,"h":15,"offset":1,"shift":6,"w":5,"x":84,"y":70,},
"77":{"character":77,"h":15,"offset":0,"shift":10,"w":10,"x":103,"y":70,}, "77":{"character":77,"h":15,"offset":1,"shift":10,"w":8,"x":74,"y":70,},
"78":{"character":78,"h":15,"offset":0,"shift":9,"w":8,"x":36,"y":53,}, "78":{"character":78,"h":15,"offset":1,"shift":8,"w":7,"x":12,"y":53,},
"79":{"character":79,"h":15,"offset":0,"shift":9,"w":9,"x":25,"y":53,}, "79":{"character":79,"h":15,"offset":0,"shift":8,"w":8,"x":2,"y":53,},
"80":{"character":80,"h":15,"offset":0,"shift":7,"w":7,"x":16,"y":53,}, "80":{"character":80,"h":15,"offset":1,"shift":7,"w":6,"x":115,"y":36,},
"81":{"character":81,"h":15,"offset":0,"shift":9,"w":9,"x":68,"y":19,}, "81":{"character":81,"h":15,"offset":0,"shift":8,"w":8,"x":51,"y":19,},
"82":{"character":82,"h":15,"offset":0,"shift":7,"w":8,"x":52,"y":19,}, "82":{"character":82,"h":15,"offset":1,"shift":7,"w":6,"x":37,"y":19,},
"83":{"character":83,"h":15,"offset":0,"shift":6,"w":6,"x":44,"y":19,}, "83":{"character":83,"h":15,"offset":0,"shift":6,"w":6,"x":29,"y":19,},
"84":{"character":84,"h":15,"offset":0,"shift":6,"w":7,"x":35,"y":19,}, "84":{"character":84,"h":15,"offset":0,"shift":6,"w":6,"x":21,"y":19,},
"85":{"character":85,"h":15,"offset":0,"shift":8,"w":8,"x":25,"y":19,}, "85":{"character":85,"h":15,"offset":0,"shift":8,"w":8,"x":11,"y":19,},
"86":{"character":86,"h":15,"offset":0,"shift":7,"w":8,"x":15,"y":19,}, "86":{"character":86,"h":15,"offset":0,"shift":7,"w":7,"x":2,"y":19,},
"87":{"character":87,"h":15,"offset":0,"shift":11,"w":11,"x":2,"y":19,}, "87":{"character":87,"h":15,"offset":0,"shift":10,"w":11,"x":114,"y":2,},
"88":{"character":88,"h":15,"offset":0,"shift":7,"w":8,"x":110,"y":2,}, "88":{"character":88,"h":15,"offset":0,"shift":7,"w":7,"x":105,"y":2,},
"89":{"character":89,"h":15,"offset":0,"shift":7,"w":7,"x":101,"y":2,}, "89":{"character":89,"h":15,"offset":0,"shift":6,"w":7,"x":96,"y":2,},
"90":{"character":90,"h":15,"offset":0,"shift":6,"w":7,"x":92,"y":2,}, "90":{"character":90,"h":15,"offset":0,"shift":6,"w":6,"x":88,"y":2,},
"91":{"character":91,"h":15,"offset":0,"shift":4,"w":4,"x":62,"y":19,}, "91":{"character":91,"h":15,"offset":0,"shift":4,"w":4,"x":45,"y":19,},
"92":{"character":92,"h":15,"offset":0,"shift":5,"w":5,"x":85,"y":2,}, "92":{"character":92,"h":15,"offset":0,"shift":4,"w":5,"x":81,"y":2,},
"93":{"character":93,"h":15,"offset":0,"shift":4,"w":3,"x":73,"y":2,}, "93":{"character":93,"h":15,"offset":0,"shift":4,"w":3,"x":69,"y":2,},
"94":{"character":94,"h":15,"offset":0,"shift":6,"w":7,"x":64,"y":2,}, "94":{"character":94,"h":15,"offset":0,"shift":6,"w":6,"x":61,"y":2,},
"95":{"character":95,"h":15,"offset":-1,"shift":5,"w":6,"x":56,"y":2,}, "95":{"character":95,"h":15,"offset":-1,"shift":5,"w":6,"x":53,"y":2,},
"96":{"character":96,"h":15,"offset":0,"shift":4,"w":4,"x":50,"y":2,}, "96":{"character":96,"h":15,"offset":0,"shift":4,"w":4,"x":47,"y":2,},
"97":{"character":97,"h":15,"offset":0,"shift":7,"w":6,"x":42,"y":2,}, "97":{"character":97,"h":15,"offset":0,"shift":6,"w":6,"x":39,"y":2,},
"98":{"character":98,"h":15,"offset":0,"shift":7,"w":7,"x":33,"y":2,}, "98":{"character":98,"h":15,"offset":0,"shift":7,"w":7,"x":30,"y":2,},
"99":{"character":99,"h":15,"offset":0,"shift":6,"w":6,"x":25,"y":2,}, "99":{"character":99,"h":15,"offset":0,"shift":5,"w":5,"x":23,"y":2,},
"100":{"character":100,"h":15,"offset":0,"shift":7,"w":7,"x":16,"y":2,}, "100":{"character":100,"h":15,"offset":0,"shift":7,"w":6,"x":15,"y":2,},
"101":{"character":101,"h":15,"offset":0,"shift":7,"w":7,"x":7,"y":2,}, "101":{"character":101,"h":15,"offset":0,"shift":6,"w":6,"x":7,"y":2,},
"102":{"character":102,"h":15,"offset":0,"shift":4,"w":5,"x":78,"y":2,}, "102":{"character":102,"h":15,"offset":0,"shift":4,"w":5,"x":74,"y":2,},
"103":{"character":103,"h":15,"offset":0,"shift":7,"w":7,"x":79,"y":19,}, "103":{"character":103,"h":15,"offset":0,"shift":7,"w":6,"x":61,"y":19,},
"104":{"character":104,"h":15,"offset":0,"shift":7,"w":7,"x":41,"y":36,}, "104":{"character":104,"h":15,"offset":0,"shift":7,"w":7,"x":18,"y":36,},
"105":{"character":105,"h":15,"offset":0,"shift":3,"w":3,"x":88,"y":19,}, "105":{"character":105,"h":15,"offset":0,"shift":3,"w":3,"x":69,"y":19,},
"106":{"character":106,"h":15,"offset":-1,"shift":3,"w":4,"x":2,"y":53,}, "106":{"character":106,"h":15,"offset":-1,"shift":3,"w":4,"x":102,"y":36,},
"107":{"character":107,"h":15,"offset":0,"shift":7,"w":7,"x":117,"y":36,}, "107":{"character":107,"h":15,"offset":0,"shift":6,"w":7,"x":93,"y":36,},
"108":{"character":108,"h":15,"offset":0,"shift":3,"w":3,"x":112,"y":36,}, "108":{"character":108,"h":15,"offset":0,"shift":3,"w":3,"x":88,"y":36,},
"109":{"character":109,"h":15,"offset":0,"shift":11,"w":10,"x":100,"y":36,}, "109":{"character":109,"h":15,"offset":0,"shift":10,"w":10,"x":76,"y":36,},
"110":{"character":110,"h":15,"offset":0,"shift":7,"w":7,"x":91,"y":36,}, "110":{"character":110,"h":15,"offset":0,"shift":7,"w":7,"x":67,"y":36,},
"111":{"character":111,"h":15,"offset":0,"shift":7,"w":7,"x":82,"y":36,}, "111":{"character":111,"h":15,"offset":0,"shift":7,"w":7,"x":58,"y":36,},
"112":{"character":112,"h":15,"offset":0,"shift":7,"w":7,"x":73,"y":36,}, "112":{"character":112,"h":15,"offset":0,"shift":7,"w":7,"x":49,"y":36,},
"113":{"character":113,"h":15,"offset":0,"shift":7,"w":7,"x":64,"y":36,}, "113":{"character":113,"h":15,"offset":0,"shift":7,"w":6,"x":41,"y":36,},
"114":{"character":114,"h":15,"offset":0,"shift":5,"w":5,"x":57,"y":36,}, "114":{"character":114,"h":15,"offset":0,"shift":5,"w":5,"x":34,"y":36,},
"115":{"character":115,"h":15,"offset":0,"shift":5,"w":6,"x":8,"y":53,}, "115":{"character":115,"h":15,"offset":0,"shift":5,"w":5,"x":108,"y":36,},
"116":{"character":116,"h":15,"offset":0,"shift":5,"w":5,"x":50,"y":36,}, "116":{"character":116,"h":15,"offset":0,"shift":4,"w":5,"x":27,"y":36,},
"117":{"character":117,"h":15,"offset":0,"shift":7,"w":7,"x":32,"y":36,}, "117":{"character":117,"h":15,"offset":0,"shift":7,"w":6,"x":10,"y":36,},
"118":{"character":118,"h":15,"offset":0,"shift":6,"w":7,"x":23,"y":36,}, "118":{"character":118,"h":15,"offset":0,"shift":6,"w":6,"x":2,"y":36,},
"119":{"character":119,"h":15,"offset":0,"shift":9,"w":10,"x":11,"y":36,}, "119":{"character":119,"h":15,"offset":0,"shift":9,"w":9,"x":113,"y":19,},
"120":{"character":120,"h":15,"offset":0,"shift":6,"w":7,"x":2,"y":36,}, "120":{"character":120,"h":15,"offset":0,"shift":6,"w":6,"x":105,"y":19,},
"121":{"character":121,"h":15,"offset":0,"shift":6,"w":7,"x":118,"y":19,}, "121":{"character":121,"h":15,"offset":0,"shift":6,"w":6,"x":97,"y":19,},
"122":{"character":122,"h":15,"offset":0,"shift":5,"w":6,"x":110,"y":19,}, "122":{"character":122,"h":15,"offset":0,"shift":5,"w":5,"x":90,"y":19,},
"123":{"character":123,"h":15,"offset":0,"shift":4,"w":4,"x":104,"y":19,}, "123":{"character":123,"h":15,"offset":0,"shift":4,"w":4,"x":84,"y":19,},
"124":{"character":124,"h":15,"offset":2,"shift":6,"w":2,"x":100,"y":19,}, "124":{"character":124,"h":15,"offset":2,"shift":6,"w":2,"x":80,"y":19,},
"125":{"character":125,"h":15,"offset":0,"shift":4,"w":5,"x":93,"y":19,}, "125":{"character":125,"h":15,"offset":0,"shift":4,"w":4,"x":74,"y":19,},
"126":{"character":126,"h":15,"offset":0,"shift":6,"w":6,"x":36,"y":104,}, "126":{"character":126,"h":15,"offset":0,"shift":6,"w":6,"x":2,"y":104,},
"9647":{"character":9647,"h":15,"offset":2,"shift":11,"w":7,"x":44,"y":104,}, "9647":{"character":9647,"h":15,"offset":2,"shift":11,"w":7,"x":10,"y":104,},
}, },
"hinting":0, "hinting":0,
"includeTTF":false, "includeTTF":false,
@ -133,7 +133,7 @@
"sampleText":"abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", "sampleText":"abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)",
"sdfSpread":8, "sdfSpread":8,
"size":8.0, "size":8.0,
"styleName":"Bold", "styleName":"SemiBold",
"textureGroupId":{ "textureGroupId":{
"name":"Default", "name":"Default",
"path":"texturegroups/Default", "path":"texturegroups/Default",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -9,105 +9,105 @@
"canGenerateBitmap":true, "canGenerateBitmap":true,
"charset":0, "charset":0,
"first":0, "first":0,
"fontName":"Noto Sans SemiBold", "fontName":"Noto Sans",
"glyphOperations":0, "glyphOperations":0,
"glyphs":{ "glyphs":{
"32":{"character":32,"h":15,"offset":0,"shift":3,"w":3,"x":2,"y":2,}, "32":{"character":32,"h":15,"offset":0,"shift":3,"w":3,"x":2,"y":2,},
"33":{"character":33,"h":15,"offset":0,"shift":3,"w":3,"x":37,"y":70,}, "33":{"character":33,"h":15,"offset":0,"shift":3,"w":3,"x":66,"y":70,},
"34":{"character":34,"h":15,"offset":0,"shift":5,"w":5,"x":30,"y":70,}, "34":{"character":34,"h":15,"offset":0,"shift":5,"w":5,"x":59,"y":70,},
"35":{"character":35,"h":15,"offset":0,"shift":7,"w":7,"x":21,"y":70,}, "35":{"character":35,"h":15,"offset":0,"shift":7,"w":7,"x":50,"y":70,},
"36":{"character":36,"h":15,"offset":0,"shift":6,"w":6,"x":13,"y":70,}, "36":{"character":36,"h":15,"offset":0,"shift":6,"w":6,"x":42,"y":70,},
"37":{"character":37,"h":15,"offset":0,"shift":9,"w":9,"x":2,"y":70,}, "37":{"character":37,"h":15,"offset":0,"shift":10,"w":10,"x":30,"y":70,},
"38":{"character":38,"h":15,"offset":0,"shift":8,"w":8,"x":115,"y":53,}, "38":{"character":38,"h":15,"offset":0,"shift":8,"w":9,"x":19,"y":70,},
"39":{"character":39,"h":15,"offset":0,"shift":3,"w":2,"x":111,"y":53,}, "39":{"character":39,"h":15,"offset":0,"shift":3,"w":3,"x":14,"y":70,},
"40":{"character":40,"h":15,"offset":0,"shift":3,"w":4,"x":105,"y":53,}, "40":{"character":40,"h":15,"offset":0,"shift":4,"w":4,"x":8,"y":70,},
"41":{"character":41,"h":15,"offset":0,"shift":3,"w":4,"x":99,"y":53,}, "41":{"character":41,"h":15,"offset":0,"shift":4,"w":4,"x":2,"y":70,},
"42":{"character":42,"h":15,"offset":0,"shift":6,"w":6,"x":42,"y":70,}, "42":{"character":42,"h":15,"offset":0,"shift":6,"w":6,"x":71,"y":70,},
"43":{"character":43,"h":15,"offset":0,"shift":6,"w":6,"x":91,"y":53,}, "43":{"character":43,"h":15,"offset":0,"shift":6,"w":6,"x":117,"y":53,},
"44":{"character":44,"h":15,"offset":0,"shift":3,"w":3,"x":78,"y":53,}, "44":{"character":44,"h":15,"offset":0,"shift":3,"w":3,"x":104,"y":53,},
"45":{"character":45,"h":15,"offset":0,"shift":3,"w":4,"x":72,"y":53,}, "45":{"character":45,"h":15,"offset":0,"shift":4,"w":4,"x":98,"y":53,},
"46":{"character":46,"h":15,"offset":0,"shift":3,"w":3,"x":67,"y":53,}, "46":{"character":46,"h":15,"offset":0,"shift":3,"w":3,"x":93,"y":53,},
"47":{"character":47,"h":15,"offset":0,"shift":4,"w":5,"x":60,"y":53,}, "47":{"character":47,"h":15,"offset":0,"shift":5,"w":5,"x":86,"y":53,},
"48":{"character":48,"h":15,"offset":0,"shift":6,"w":6,"x":52,"y":53,}, "48":{"character":48,"h":15,"offset":0,"shift":6,"w":6,"x":78,"y":53,},
"49":{"character":49,"h":15,"offset":0,"shift":6,"w":5,"x":45,"y":53,}, "49":{"character":49,"h":15,"offset":0,"shift":6,"w":5,"x":71,"y":53,},
"50":{"character":50,"h":15,"offset":0,"shift":6,"w":6,"x":37,"y":53,}, "50":{"character":50,"h":15,"offset":0,"shift":6,"w":6,"x":63,"y":53,},
"51":{"character":51,"h":15,"offset":0,"shift":6,"w":6,"x":29,"y":53,}, "51":{"character":51,"h":15,"offset":0,"shift":6,"w":6,"x":55,"y":53,},
"52":{"character":52,"h":15,"offset":0,"shift":6,"w":6,"x":21,"y":53,}, "52":{"character":52,"h":15,"offset":0,"shift":6,"w":7,"x":46,"y":53,},
"53":{"character":53,"h":15,"offset":0,"shift":6,"w":6,"x":83,"y":53,}, "53":{"character":53,"h":15,"offset":0,"shift":6,"w":6,"x":109,"y":53,},
"54":{"character":54,"h":15,"offset":0,"shift":6,"w":6,"x":50,"y":70,}, "54":{"character":54,"h":15,"offset":0,"shift":6,"w":6,"x":79,"y":70,},
"55":{"character":55,"h":15,"offset":0,"shift":6,"w":6,"x":58,"y":70,}, "55":{"character":55,"h":15,"offset":0,"shift":6,"w":6,"x":87,"y":70,},
"56":{"character":56,"h":15,"offset":0,"shift":6,"w":6,"x":66,"y":70,}, "56":{"character":56,"h":15,"offset":0,"shift":6,"w":6,"x":95,"y":70,},
"57":{"character":57,"h":15,"offset":0,"shift":6,"w":6,"x":114,"y":87,}, "57":{"character":57,"h":15,"offset":0,"shift":6,"w":6,"x":28,"y":104,},
"58":{"character":58,"h":15,"offset":0,"shift":3,"w":3,"x":109,"y":87,}, "58":{"character":58,"h":15,"offset":0,"shift":3,"w":3,"x":23,"y":104,},
"59":{"character":59,"h":15,"offset":0,"shift":3,"w":3,"x":104,"y":87,}, "59":{"character":59,"h":15,"offset":0,"shift":3,"w":3,"x":18,"y":104,},
"60":{"character":60,"h":15,"offset":0,"shift":6,"w":6,"x":96,"y":87,}, "60":{"character":60,"h":15,"offset":0,"shift":6,"w":6,"x":10,"y":104,},
"61":{"character":61,"h":15,"offset":0,"shift":6,"w":6,"x":88,"y":87,}, "61":{"character":61,"h":15,"offset":0,"shift":6,"w":6,"x":2,"y":104,},
"62":{"character":62,"h":15,"offset":0,"shift":6,"w":6,"x":80,"y":87,}, "62":{"character":62,"h":15,"offset":0,"shift":6,"w":6,"x":117,"y":87,},
"63":{"character":63,"h":15,"offset":0,"shift":5,"w":5,"x":73,"y":87,}, "63":{"character":63,"h":15,"offset":0,"shift":5,"w":5,"x":110,"y":87,},
"64":{"character":64,"h":15,"offset":0,"shift":10,"w":10,"x":61,"y":87,}, "64":{"character":64,"h":15,"offset":0,"shift":10,"w":10,"x":98,"y":87,},
"65":{"character":65,"h":15,"offset":0,"shift":7,"w":8,"x":51,"y":87,}, "65":{"character":65,"h":15,"offset":0,"shift":8,"w":8,"x":88,"y":87,},
"66":{"character":66,"h":15,"offset":1,"shift":7,"w":6,"x":43,"y":87,}, "66":{"character":66,"h":15,"offset":0,"shift":7,"w":7,"x":79,"y":87,},
"67":{"character":67,"h":15,"offset":0,"shift":7,"w":7,"x":34,"y":87,}, "67":{"character":67,"h":15,"offset":0,"shift":7,"w":7,"x":70,"y":87,},
"68":{"character":68,"h":15,"offset":1,"shift":8,"w":7,"x":25,"y":87,}, "68":{"character":68,"h":15,"offset":0,"shift":8,"w":8,"x":60,"y":87,},
"69":{"character":69,"h":15,"offset":1,"shift":6,"w":5,"x":18,"y":87,}, "69":{"character":69,"h":15,"offset":0,"shift":6,"w":6,"x":52,"y":87,},
"70":{"character":70,"h":15,"offset":1,"shift":6,"w":5,"x":11,"y":87,}, "70":{"character":70,"h":15,"offset":0,"shift":6,"w":6,"x":44,"y":87,},
"71":{"character":71,"h":15,"offset":0,"shift":8,"w":7,"x":2,"y":87,}, "71":{"character":71,"h":15,"offset":0,"shift":8,"w":8,"x":34,"y":87,},
"72":{"character":72,"h":15,"offset":1,"shift":8,"w":7,"x":111,"y":70,}, "72":{"character":72,"h":15,"offset":0,"shift":8,"w":8,"x":24,"y":87,},
"73":{"character":73,"h":15,"offset":0,"shift":4,"w":4,"x":105,"y":70,}, "73":{"character":73,"h":15,"offset":0,"shift":4,"w":4,"x":18,"y":87,},
"74":{"character":74,"h":15,"offset":-1,"shift":3,"w":4,"x":99,"y":70,}, "74":{"character":74,"h":15,"offset":-1,"shift":4,"w":4,"x":12,"y":87,},
"75":{"character":75,"h":15,"offset":1,"shift":7,"w":6,"x":91,"y":70,}, "75":{"character":75,"h":15,"offset":0,"shift":7,"w":8,"x":2,"y":87,},
"76":{"character":76,"h":15,"offset":1,"shift":6,"w":5,"x":84,"y":70,}, "76":{"character":76,"h":15,"offset":0,"shift":6,"w":6,"x":115,"y":70,},
"77":{"character":77,"h":15,"offset":1,"shift":10,"w":8,"x":74,"y":70,}, "77":{"character":77,"h":15,"offset":0,"shift":10,"w":10,"x":103,"y":70,},
"78":{"character":78,"h":15,"offset":1,"shift":8,"w":7,"x":12,"y":53,}, "78":{"character":78,"h":15,"offset":0,"shift":9,"w":8,"x":36,"y":53,},
"79":{"character":79,"h":15,"offset":0,"shift":8,"w":8,"x":2,"y":53,}, "79":{"character":79,"h":15,"offset":0,"shift":9,"w":9,"x":25,"y":53,},
"80":{"character":80,"h":15,"offset":1,"shift":7,"w":6,"x":115,"y":36,}, "80":{"character":80,"h":15,"offset":0,"shift":7,"w":7,"x":16,"y":53,},
"81":{"character":81,"h":15,"offset":0,"shift":8,"w":8,"x":51,"y":19,}, "81":{"character":81,"h":15,"offset":0,"shift":9,"w":9,"x":68,"y":19,},
"82":{"character":82,"h":15,"offset":1,"shift":7,"w":6,"x":37,"y":19,}, "82":{"character":82,"h":15,"offset":0,"shift":7,"w":8,"x":52,"y":19,},
"83":{"character":83,"h":15,"offset":0,"shift":6,"w":6,"x":29,"y":19,}, "83":{"character":83,"h":15,"offset":0,"shift":6,"w":6,"x":44,"y":19,},
"84":{"character":84,"h":15,"offset":0,"shift":6,"w":6,"x":21,"y":19,}, "84":{"character":84,"h":15,"offset":0,"shift":6,"w":7,"x":35,"y":19,},
"85":{"character":85,"h":15,"offset":0,"shift":8,"w":8,"x":11,"y":19,}, "85":{"character":85,"h":15,"offset":0,"shift":8,"w":8,"x":25,"y":19,},
"86":{"character":86,"h":15,"offset":0,"shift":7,"w":7,"x":2,"y":19,}, "86":{"character":86,"h":15,"offset":0,"shift":7,"w":8,"x":15,"y":19,},
"87":{"character":87,"h":15,"offset":0,"shift":10,"w":11,"x":114,"y":2,}, "87":{"character":87,"h":15,"offset":0,"shift":11,"w":11,"x":2,"y":19,},
"88":{"character":88,"h":15,"offset":0,"shift":7,"w":7,"x":105,"y":2,}, "88":{"character":88,"h":15,"offset":0,"shift":7,"w":8,"x":110,"y":2,},
"89":{"character":89,"h":15,"offset":0,"shift":6,"w":7,"x":96,"y":2,}, "89":{"character":89,"h":15,"offset":0,"shift":7,"w":7,"x":101,"y":2,},
"90":{"character":90,"h":15,"offset":0,"shift":6,"w":6,"x":88,"y":2,}, "90":{"character":90,"h":15,"offset":0,"shift":6,"w":7,"x":92,"y":2,},
"91":{"character":91,"h":15,"offset":0,"shift":4,"w":4,"x":45,"y":19,}, "91":{"character":91,"h":15,"offset":0,"shift":4,"w":4,"x":62,"y":19,},
"92":{"character":92,"h":15,"offset":0,"shift":4,"w":5,"x":81,"y":2,}, "92":{"character":92,"h":15,"offset":0,"shift":5,"w":5,"x":85,"y":2,},
"93":{"character":93,"h":15,"offset":0,"shift":4,"w":3,"x":69,"y":2,}, "93":{"character":93,"h":15,"offset":0,"shift":4,"w":3,"x":73,"y":2,},
"94":{"character":94,"h":15,"offset":0,"shift":6,"w":6,"x":61,"y":2,}, "94":{"character":94,"h":15,"offset":0,"shift":6,"w":7,"x":64,"y":2,},
"95":{"character":95,"h":15,"offset":-1,"shift":5,"w":6,"x":53,"y":2,}, "95":{"character":95,"h":15,"offset":-1,"shift":5,"w":6,"x":56,"y":2,},
"96":{"character":96,"h":15,"offset":0,"shift":4,"w":4,"x":47,"y":2,}, "96":{"character":96,"h":15,"offset":0,"shift":4,"w":4,"x":50,"y":2,},
"97":{"character":97,"h":15,"offset":0,"shift":6,"w":6,"x":39,"y":2,}, "97":{"character":97,"h":15,"offset":0,"shift":7,"w":6,"x":42,"y":2,},
"98":{"character":98,"h":15,"offset":0,"shift":7,"w":7,"x":30,"y":2,}, "98":{"character":98,"h":15,"offset":0,"shift":7,"w":7,"x":33,"y":2,},
"99":{"character":99,"h":15,"offset":0,"shift":5,"w":5,"x":23,"y":2,}, "99":{"character":99,"h":15,"offset":0,"shift":6,"w":6,"x":25,"y":2,},
"100":{"character":100,"h":15,"offset":0,"shift":7,"w":6,"x":15,"y":2,}, "100":{"character":100,"h":15,"offset":0,"shift":7,"w":7,"x":16,"y":2,},
"101":{"character":101,"h":15,"offset":0,"shift":6,"w":6,"x":7,"y":2,}, "101":{"character":101,"h":15,"offset":0,"shift":7,"w":7,"x":7,"y":2,},
"102":{"character":102,"h":15,"offset":0,"shift":4,"w":5,"x":74,"y":2,}, "102":{"character":102,"h":15,"offset":0,"shift":4,"w":5,"x":78,"y":2,},
"103":{"character":103,"h":15,"offset":0,"shift":7,"w":6,"x":61,"y":19,}, "103":{"character":103,"h":15,"offset":0,"shift":7,"w":7,"x":79,"y":19,},
"104":{"character":104,"h":15,"offset":0,"shift":7,"w":7,"x":18,"y":36,}, "104":{"character":104,"h":15,"offset":0,"shift":7,"w":7,"x":41,"y":36,},
"105":{"character":105,"h":15,"offset":0,"shift":3,"w":3,"x":69,"y":19,}, "105":{"character":105,"h":15,"offset":0,"shift":3,"w":3,"x":88,"y":19,},
"106":{"character":106,"h":15,"offset":-1,"shift":3,"w":4,"x":102,"y":36,}, "106":{"character":106,"h":15,"offset":-1,"shift":3,"w":4,"x":2,"y":53,},
"107":{"character":107,"h":15,"offset":0,"shift":6,"w":7,"x":93,"y":36,}, "107":{"character":107,"h":15,"offset":0,"shift":7,"w":7,"x":117,"y":36,},
"108":{"character":108,"h":15,"offset":0,"shift":3,"w":3,"x":88,"y":36,}, "108":{"character":108,"h":15,"offset":0,"shift":3,"w":3,"x":112,"y":36,},
"109":{"character":109,"h":15,"offset":0,"shift":10,"w":10,"x":76,"y":36,}, "109":{"character":109,"h":15,"offset":0,"shift":11,"w":10,"x":100,"y":36,},
"110":{"character":110,"h":15,"offset":0,"shift":7,"w":7,"x":67,"y":36,}, "110":{"character":110,"h":15,"offset":0,"shift":7,"w":7,"x":91,"y":36,},
"111":{"character":111,"h":15,"offset":0,"shift":7,"w":7,"x":58,"y":36,}, "111":{"character":111,"h":15,"offset":0,"shift":7,"w":7,"x":82,"y":36,},
"112":{"character":112,"h":15,"offset":0,"shift":7,"w":7,"x":49,"y":36,}, "112":{"character":112,"h":15,"offset":0,"shift":7,"w":7,"x":73,"y":36,},
"113":{"character":113,"h":15,"offset":0,"shift":7,"w":6,"x":41,"y":36,}, "113":{"character":113,"h":15,"offset":0,"shift":7,"w":7,"x":64,"y":36,},
"114":{"character":114,"h":15,"offset":0,"shift":5,"w":5,"x":34,"y":36,}, "114":{"character":114,"h":15,"offset":0,"shift":5,"w":5,"x":57,"y":36,},
"115":{"character":115,"h":15,"offset":0,"shift":5,"w":5,"x":108,"y":36,}, "115":{"character":115,"h":15,"offset":0,"shift":5,"w":6,"x":8,"y":53,},
"116":{"character":116,"h":15,"offset":0,"shift":4,"w":5,"x":27,"y":36,}, "116":{"character":116,"h":15,"offset":0,"shift":5,"w":5,"x":50,"y":36,},
"117":{"character":117,"h":15,"offset":0,"shift":7,"w":6,"x":10,"y":36,}, "117":{"character":117,"h":15,"offset":0,"shift":7,"w":7,"x":32,"y":36,},
"118":{"character":118,"h":15,"offset":0,"shift":6,"w":6,"x":2,"y":36,}, "118":{"character":118,"h":15,"offset":0,"shift":6,"w":7,"x":23,"y":36,},
"119":{"character":119,"h":15,"offset":0,"shift":9,"w":9,"x":113,"y":19,}, "119":{"character":119,"h":15,"offset":0,"shift":9,"w":10,"x":11,"y":36,},
"120":{"character":120,"h":15,"offset":0,"shift":6,"w":6,"x":105,"y":19,}, "120":{"character":120,"h":15,"offset":0,"shift":6,"w":7,"x":2,"y":36,},
"121":{"character":121,"h":15,"offset":0,"shift":6,"w":6,"x":97,"y":19,}, "121":{"character":121,"h":15,"offset":0,"shift":6,"w":7,"x":118,"y":19,},
"122":{"character":122,"h":15,"offset":0,"shift":5,"w":5,"x":90,"y":19,}, "122":{"character":122,"h":15,"offset":0,"shift":5,"w":6,"x":110,"y":19,},
"123":{"character":123,"h":15,"offset":0,"shift":4,"w":4,"x":84,"y":19,}, "123":{"character":123,"h":15,"offset":0,"shift":4,"w":4,"x":104,"y":19,},
"124":{"character":124,"h":15,"offset":2,"shift":6,"w":2,"x":80,"y":19,}, "124":{"character":124,"h":15,"offset":2,"shift":6,"w":2,"x":100,"y":19,},
"125":{"character":125,"h":15,"offset":0,"shift":4,"w":4,"x":74,"y":19,}, "125":{"character":125,"h":15,"offset":0,"shift":4,"w":5,"x":93,"y":19,},
"126":{"character":126,"h":15,"offset":0,"shift":6,"w":6,"x":2,"y":104,}, "126":{"character":126,"h":15,"offset":0,"shift":6,"w":6,"x":36,"y":104,},
"9647":{"character":9647,"h":15,"offset":2,"shift":11,"w":7,"x":10,"y":104,}, "9647":{"character":9647,"h":15,"offset":2,"shift":11,"w":7,"x":44,"y":104,},
}, },
"hinting":0, "hinting":0,
"includeTTF":false, "includeTTF":false,
@ -133,7 +133,7 @@
"sampleText":"abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)", "sampleText":"abcdef ABCDEF\n0123456789 .,<>\"'&!?\nthe quick brown fox jumps over the lazy dog\nTHE QUICK BROWN FOX JUMPS OVER THE LAZY DOG\nDefault character: ▯ (9647)",
"sdfSpread":8, "sdfSpread":8,
"size":8.0, "size":8.0,
"styleName":"SemiBold", "styleName":"Bold",
"textureGroupId":{ "textureGroupId":{
"name":"Default", "name":"Default",
"path":"texturegroups/Default", "path":"texturegroups/Default",

View file

@ -148,6 +148,12 @@ event_inherited();
ds_list_add(pref_global, __txt("Save/Load")); ds_list_add(pref_global, __txt("Save/Load"));
ds_list_add(pref_appr, new __Panel_Linear_Setting_Item_Preference(
__txtx("pref_auto_save_time", "Autosave delay (-1 to disable)"),
"auto_save_time",
new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ { PREFERENCES.auto_save_time = val; PREF_SAVE(); })
));
ds_list_add(pref_global, new __Panel_Linear_Setting_Item_Preference( ds_list_add(pref_global, new __Panel_Linear_Setting_Item_Preference(
__txtx("pref_save_layout", "Save layout"), __txtx("pref_save_layout", "Save layout"),
"save_layout", "save_layout",
@ -331,12 +337,6 @@ event_inherited();
ds_list_add(pref_appr, __txt("Splash")); ds_list_add(pref_appr, __txt("Splash"));
ds_list_add(pref_appr, new __Panel_Linear_Setting_Item_Preference(
__txtx("pref_auto_save_time", "Autosave delay (-1 to disable)"),
"auto_save_time",
new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ { PREFERENCES.auto_save_time = val; PREF_SAVE(); })
));
if(IS_PATREON) if(IS_PATREON)
ds_list_add(pref_appr, new __Panel_Linear_Setting_Item_Preference( ds_list_add(pref_appr, new __Panel_Linear_Setting_Item_Preference(
__txtx("pref_supporter_icon", "Show supporter icon"), __txtx("pref_supporter_icon", "Show supporter icon"),

View file

@ -1,5 +1,5 @@
/// @description slider /// @description slider
drag_mx = mouse_mx; anim = 0;
drag_sx = 0; anim_prog = 0;
drag_msx = 0;
drag_sw = 0; depth = -10000;

View file

@ -0,0 +1,38 @@
if(anim == 0) {
anim_prog = lerp_float(anim_prog, 1, 5);
} else if(anim == 1) {
anim_prog = lerp_float(anim_prog, 0, 5);
if(anim_prog == 0) instance_destroy();
}
var _h_top = clamp( text.slider_mulp + 1, 1, 2) * ui(18) * anim_prog;
var _h_bot = clamp(-text.slider_mulp + 1, 1, 2) * ui(18) * anim_prog;
var _y = y - _h_top;
var _h = h + _h_top + _h_bot;
draw_sprite_stretched_ext(THEME.textbox, 3, x, _y, w, _h, COLORS._main_icon, 1);
draw_sprite_stretched_ext(THEME.textbox, 3, x, y, w, h, c_white, 1);
draw_sprite_stretched_ext(THEME.textbox, 1, x, _y, w, _h, c_white, 1);
if(anim == 0) {
draw_set_text(f_p4, fa_center, fa_bottom, text.slider_mulp == 1? COLORS._main_text_accent : COLORS._main_icon);
draw_text(x + w / 2, y, "x10");
if(text.slider_mulp >= 1) {
draw_set_color(text.slider_mulp == 2? COLORS._main_text_accent : COLORS._main_icon);
draw_text(x + w / 2, y - ui(18), "x100");
}
draw_set_text(f_p4, fa_center, fa_top, text.slider_mulp == -1? COLORS._main_text_accent : COLORS._main_icon);
draw_text(x + w / 2, y + h, "x0.1");
if(text.slider_mulp <= -1) {
draw_set_color(text.slider_mulp == -2? COLORS._main_text_accent : COLORS._main_icon);
draw_text(x + w / 2, y + h + ui(18), "x0.01");
}
}
BLEND_ALPHA
draw_surface_safe(text.text_surface, x + text.padding, y);
BLEND_NORMAL

View file

@ -1,4 +1 @@
/// @description Insert description here /// @description Insert description here
var dx = mouse_mx - drag_mx;
drag_mx = mouse_mx;
drag_sx += dx;

View file

@ -2,8 +2,9 @@
"$GMObject":"", "$GMObject":"",
"%Name":"slider_Slider", "%Name":"slider_Slider",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"slider_Slider", "name":"slider_Slider",

View file

@ -1,131 +0,0 @@
/*
function __sliderRange(_min, _max, _step, _onModify) : widget() constructor {
minn = _min;
maxx = _max;
stepSize = _step;
spr = THEME.slider_def;
onModify = _onModify;
dragging = noone;
drag_sv = 0;
tb_value_min = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(clamp(val, minn, maxx), 0); });
tb_value_max = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(clamp(val, minn, maxx), 1); });
tb_value_min.slidable = true;
tb_value_max.slidable = true;
static setSlideSpeed = function(speed) { #region
tb_value_min.setSlidable(speed);
tb_value_max.setSlidable(speed);
} #endregion
static setInteract = function(interactable = noone) { #region
self.interactable = interactable;
tb_value_min.interactable = interactable;
tb_value_max.interactable = interactable;
} #endregion
static register = function(parent = noone) { #region
tb_value_min.register(parent);
tb_value_max.register(parent);
} #endregion
static drawParam = function(params) { #region
return draw(params.x, params.y, params.w, params.h, params.data, params.m);
} #endregion
static draw = function(_x, _y, _w, _h, _data, _m) { #region
x = _x;
y = _y;
w = _w;
h = _h;
if(!is_real(_data[0])) return h;
if(!is_real(_data[1])) return h;
var tb_w = ui(64);
var sw = _w - (tb_w + ui(16)) * 2;
tb_value_min.setFocusHover(active, hover);
tb_value_min.draw(_x, _y, tb_w, TEXTBOX_HEIGHT, _data[0], _m);
tb_value_max.setFocusHover(active, hover);
tb_value_max.draw(_x + _w - tb_w, _y, tb_w, TEXTBOX_HEIGHT, _data[1], _m);
var _x0 = _x + tb_w + ui(16);
draw_sprite_stretched(spr, 0, _x0, _y + _h / 2 - ui(4), sw, ui(8));
if(stepSize >= 1 && sw / ((maxx - minn) / stepSize) > ui(16)) {
for( var i = minn; i <= maxx; i += stepSize ) {
var _v = round(i / stepSize) * stepSize;
var _cx = _x0 + clamp((_v - minn) / (maxx - minn), 0, 1) * sw;
draw_sprite_stretched_ext(spr, 4, _cx - ui(4), _y + _h / 2 - ui(4), ui(8), ui(8), COLORS.widget_slider_step, 1);
}
}
var _slider_x0 = _x0 + clamp((_data[0] - minn) / (maxx - minn), 0, 1) * sw;
var _slider_x1 = _x0 + clamp((_data[1] - minn) / (maxx - minn), 0, 1) * sw;
draw_sprite_stretched_ext(spr, 4, min(_slider_x0, _slider_x1), _y + _h / 2 - ui(4), abs(_slider_x1 - _slider_x0), ui(8), COLORS._main_accent, 1);
draw_sprite_stretched(spr, 1, _slider_x0 - ui(10), _y, ui(20), _h);
draw_sprite_stretched(spr, 1, _slider_x1 - ui(10), _y, ui(20), _h);
if(dragging) {
if(dragging_index == 0)
draw_sprite_stretched_ext(spr, 3, _slider_x0 - ui(10), _y, ui(20), _h, COLORS._main_accent, 1);
else if(dragging_index == 1)
draw_sprite_stretched_ext(spr, 3, _slider_x1 - ui(10), _y, ui(20), _h, COLORS._main_accent, 1);
var val = (dragging.drag_sx - dragging.drag_msx) / dragging.drag_sw * (maxx - minn) + minn;
val = round(val / stepSize) * stepSize;
val = clamp(val, minn, maxx);
if(key_mod_press(CTRL))
val = round(val);
if(onModify(val, dragging_index))
UNDO_HOLDING = true;
MOUSE_BLOCK = true;
if(mouse_check_button_pressed(mb_right)) {
onModify(drag_sv, dragging_index);
instance_destroy(dragging);
dragging = noone;
UNDO_HOLDING = false;
} else if(mouse_release(mb_left)) {
instance_destroy(dragging);
dragging = noone;
UNDO_HOLDING = false;
}
} else if(hover) {
var _hover = -1;
if(point_in_rectangle(_m[0], _m[1], _slider_x0 - ui(10), _y, _slider_x0 + ui(10), _y + _h)) {
draw_sprite_stretched(spr, 2, _slider_x0 - ui(10), _y, ui(20), _h);
_hover = 0;
}
if(point_in_rectangle(_m[0], _m[1], _slider_x1 - ui(10), _y, _slider_x1 + ui(10), _y + _h)) {
draw_sprite_stretched(spr, 2, _slider_x1 - ui(10), _y, ui(20), _h);
_hover = 1;
}
if(_hover > -1 && mouse_press(mb_left, active)) {
dragging = instance_create(0, 0, slider_Slider);
dragging_index = _hover;
dragging.drag_sx = _m[0];
dragging.drag_msx = _x0;
dragging.drag_sw = sw;
drag_sv = _data[_hover];
}
}
resetFocus();
return h;
} #endregion
}

View file

@ -1,13 +0,0 @@
{
"$GMScript":"",
"%Name":"__sliderRange",
"isCompatibility":false,
"isDnD":false,
"name":"__sliderRange",
"parent":{
"name":"sliders",
"path":"folders/widgets/sliders.yy",
},
"resourceType":"GMScript",
"resourceVersion":"2.0",
}

View file

@ -97,11 +97,6 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
tb[i].hide = true; tb[i].hide = true;
} }
static setSlideSpeed = function(speed) {
for(var i = 0; i < 4; i++)
tb[i].setSlidable(speed);
}
static setInteract = function(interactable = noone) { static setInteract = function(interactable = noone) {
self.interactable = interactable; self.interactable = interactable;
for(var i = 0; i < 4; i++) for(var i = 0; i < 4; i++)

View file

@ -26,8 +26,7 @@ function controlPointBox(_onModify) : widget() constructor {
tbH = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(max(0, toNumber(val)), PUPPET_CONTROL.height); }); tbH.hide = true; tbH.slidable = true; tbH = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(max(0, toNumber(val)), PUPPET_CONTROL.height); }); tbH.hide = true; tbH.slidable = true;
rot = new rotator(function(val) { return onModify(toNumber(val), PUPPET_CONTROL.fy); }); rot = new rotator(function(val) { return onModify(toNumber(val), PUPPET_CONTROL.fy); });
sW = new textBox(TEXTBOX_INPUT.number, function(val) { onModify(toNumber(val), PUPPET_CONTROL.width); }) sW = new textBox(TEXTBOX_INPUT.number, function(val) { onModify(toNumber(val), PUPPET_CONTROL.width); });
.setSlidable(0.01, false, [ 1, 32 ]);
tbCx.label = "cx"; tbCx.label = "cx";
tbCy.label = "cy"; tbCy.label = "cy";

View file

@ -30,11 +30,6 @@ function cornerBox(_onModify, _unit = noone) : widget() constructor {
tb[i].hide = true; tb[i].hide = true;
} }
static setSlideSpeed = function(speed) {
for(var i = 0; i < 4; i++)
tb[i].setSlidable(speed);
}
static setInteract = function(interactable = noone) { static setInteract = function(interactable = noone) {
self.interactable = interactable; self.interactable = interactable;
b_link.interactable = interactable; b_link.interactable = interactable;

View file

@ -33,8 +33,8 @@ function curveBox(_onModify) : widget() constructor {
cw = 0; cw = 0;
ch = 0; ch = 0;
tb_shift = new textBox(TEXTBOX_INPUT.number, function(val) { var _data = array_clone(curr_data); _data[0] = val; onModify(_data); }).setSlidable(1 / 100); tb_shift = new textBox(TEXTBOX_INPUT.number, function(val) { var _data = array_clone(curr_data); _data[0] = val; onModify(_data); });
tb_scale = new textBox(TEXTBOX_INPUT.number, function(val) { var _data = array_clone(curr_data); _data[1] = val; onModify(_data); }).setSlidable(1 / 100); tb_scale = new textBox(TEXTBOX_INPUT.number, function(val) { var _data = array_clone(curr_data); _data[1] = val; onModify(_data); });
tb_shift.label = "Shift"; tb_shift.label = "Shift";
tb_scale.label = "Scale"; tb_scale.label = "Scale";

View file

@ -6,7 +6,7 @@ function materialBox(_onModify) : widget() constructor {
sb_filtering = new scrollBox(["Pixel", "Bilinear"], function(val) { currMat.texFilter = val; onModify(currMat); }) sb_filtering = new scrollBox(["Pixel", "Bilinear"], function(val) { currMat.texFilter = val; onModify(currMat); })
for(var i = 0; i < 5; i++) tb[i] = new textBox(TEXTBOX_INPUT.number, noone).setSlidable(); for(var i = 0; i < 5; i++) tb[i] = new textBox(TEXTBOX_INPUT.number, noone);
tb[0].onModify = function(val) { currMat.diffuse = val; onModify(currMat); } tb[0].onModify = function(val) { currMat.diffuse = val; onModify(currMat); }
tb[1].onModify = function(val) { currMat.specular = val; onModify(currMat); } tb[1].onModify = function(val) { currMat.specular = val; onModify(currMat); }

View file

@ -72,11 +72,6 @@ function matrixGrid(_type, _size, _onModify, _unit = noone) : widget() construct
unit.triggerButton.register(parent); unit.triggerButton.register(parent);
} }
static setSlideSpeed = function(speed) {
for(var i = 0; i < inputs; i++)
tb[i].setSlidable(speed);
}
static isHovering = function() { static isHovering = function() {
for( var i = 0, n = array_length(tb); i < n; i++ ) if(tb[i].isHovering()) return true; for( var i = 0, n = array_length(tb); i < n; i++ ) if(tb[i].isHovering()) return true;
return false; return false;

View file

@ -252,7 +252,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
]; ];
tool_attribute.size = 1; tool_attribute.size = 1;
tool_size_edit = new textBox(TEXTBOX_INPUT.number, function(val) { tool_attribute.size = max(1, round(val)); }).setSlidable(0.1, true, [ 1, 999999 ]) tool_size_edit = new textBox(TEXTBOX_INPUT.number, function(val) { tool_attribute.size = max(1, round(val)); }).setSlideType(true)
.setFont(f_p3) .setFont(f_p3)
.setSideButton(button(function() { dialogPanelCall(new Panel_Node_Canvas_Pressure(self), mouse_mx, mouse_my, { anchor: ANCHOR.top | ANCHOR.left }) }) .setSideButton(button(function() { dialogPanelCall(new Panel_Node_Canvas_Pressure(self), mouse_mx, mouse_my, { anchor: ANCHOR.top | ANCHOR.left }) })
.setIcon(THEME.pen_pressure, 0, COLORS._main_icon)); .setIcon(THEME.pen_pressure, 0, COLORS._main_icon));
@ -262,7 +262,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
tool_attribute.pressure_size = [ 1, 1 ]; tool_attribute.pressure_size = [ 1, 1 ];
tool_attribute.thres = 0; tool_attribute.thres = 0;
tool_thrs_edit = new textBox(TEXTBOX_INPUT.number, function(val) { tool_attribute.thres = clamp(val, 0, 1); }).setSlidable(0.01, false, [ 0, 1 ]).setFont(f_p3); tool_thrs_edit = new textBox(TEXTBOX_INPUT.number, function(val) { tool_attribute.thres = clamp(val, 0, 1); }).setSlideRange(0, 1).setFont(f_p3);
tool_thrs = [ "Threshold", tool_thrs_edit, "thres", tool_attribute ]; tool_thrs = [ "Threshold", tool_thrs_edit, "thres", tool_attribute ];
tool_attribute.fillType = 0; tool_attribute.fillType = 0;

View file

@ -26,8 +26,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
inputs[| 8] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1], "Range of the path to draw.") inputs[| 8] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 1], "Range of the path to draw.")
.setDisplay(VALUE_DISPLAY.slider_range); .setDisplay(VALUE_DISPLAY.slider_range);
inputs[| 9] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) inputs[| 9] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
.setDisplay(VALUE_DISPLAY._default, { slide_speed: 1 / 64 });
inputs[| 10] = nodeValue("Color over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); inputs[| 10] = nodeValue("Color over length", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) );

View file

@ -74,7 +74,6 @@ function Node_Number(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
for( var i = 0; i < 1; i++ ) { for( var i = 0; i < 1; i++ ) {
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
inputs[| i].editWidget.setSlidable(int? 0.1 : 0.01);
} }
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);

View file

@ -6,8 +6,7 @@ function Node_Scale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1);
.setDisplay(VALUE_DISPLAY._default, { slide_speed: 0.01 });
inputs[| 2] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) inputs[| 2] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.enum_button, [ "Upscale", "Scale to fit" ]); .setDisplay(VALUE_DISPLAY.enum_button, [ "Upscale", "Scale to fit" ]);

View file

@ -536,9 +536,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
switch(display_type) { switch(display_type) {
case VALUE_DISPLAY._default : #region case VALUE_DISPLAY._default : #region
editWidget = new textBox(_txt, function(val) { return setValueInspector(val); } ); editWidget = new textBox(_txt, function(val) { return setValueInspector(val); } );
editWidget.setSlidable();
if(struct_has(display_data, "slide_speed")) editWidget.setSlidable(display_data.slide_speed);
if(struct_has(display_data, "unit")) editWidget.unit = display_data.unit; if(struct_has(display_data, "unit")) editWidget.unit = display_data.unit;
if(struct_has(display_data, "front_button")) editWidget.front_button = display_data.front_button; if(struct_has(display_data, "front_button")) editWidget.front_button = display_data.front_button;
@ -548,8 +546,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
case VALUE_DISPLAY.range : #region case VALUE_DISPLAY.range : #region
editWidget = new rangeBox(_txt, function(val, index) { return setValueInspector(val, index); } ); editWidget = new rangeBox(_txt, function(val, index) { return setValueInspector(val, index); } );
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
if(!struct_has(display_data, "linked")) display_data.linked = false; if(!struct_has(display_data, "linked")) display_data.linked = false;
for( var i = 0, n = array_length(animators); i < n; i++ ) for( var i = 0, n = array_length(animators); i < n; i++ )
@ -569,9 +565,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
if(struct_has(display_data, "linkable")) editWidget.linkable = display_data.linkable; if(struct_has(display_data, "linkable")) editWidget.linkable = display_data.linkable;
if(struct_has(display_data, "per_line")) editWidget.per_line = display_data.per_line; if(struct_has(display_data, "per_line")) editWidget.per_line = display_data.per_line;
if(struct_has(display_data, "linked")) editWidget.linked = display_data.linked; if(struct_has(display_data, "linked")) editWidget.linked = display_data.linked;
if(struct_has(display_data, "slideSpeed")) editWidget.setSlideSpeed(display_data.slideSpeed);
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
if(len == 2) { if(len == 2) {
var _dim = struct_try_get(display_data, "useGlobal", true); var _dim = struct_try_get(display_data, "useGlobal", true);
@ -601,7 +594,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
editWidget = new vectorRangeBox(array_length(val), _txt, function(val, index) { return setValueInspector(val, index); }, unit ); editWidget = new vectorRangeBox(array_length(val), _txt, function(val, index) { return setValueInspector(val, index); }, unit );
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
if(!struct_has(display_data, "linked")) display_data.linked = false; if(!struct_has(display_data, "linked")) display_data.linked = false;
if(!struct_has(display_data, "ranged")) display_data.ranged = false; if(!struct_has(display_data, "ranged")) display_data.ranged = false;
@ -641,10 +633,10 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
break; #endregion break; #endregion
case VALUE_DISPLAY.slider : #region case VALUE_DISPLAY.slider : #region
var _range = struct_try_get(display_data, "range", [ 0, 1, 0.01 ]); var _range = struct_try_get(display_data, "range", [ 0, 1 ]);
editWidget = new textBox(TEXTBOX_INPUT.number, function(val) { return setValueInspector(toNumber(val)); } ) editWidget = new textBox(TEXTBOX_INPUT.number, function(val) { return setValueInspector(toNumber(val)); } )
.setSlidable(_range[2], type == VALUE_TYPE.integer, [ _range[0], _range[1] ]); .setSlideRange(_range[0], _range[1]);
if(struct_has(display_data, "update_stat")) if(struct_has(display_data, "update_stat"))
editWidget.update_stat = display_data.update_stat; editWidget.update_stat = display_data.update_stat;
@ -667,8 +659,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
case VALUE_DISPLAY.area : #region case VALUE_DISPLAY.area : #region
editWidget = new areaBox(function(val, index) { return setValueInspector(val, index); }, unit); editWidget = new areaBox(function(val, index) { return setValueInspector(val, index); }, unit);
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
editWidget.onSurfaceSize = struct_try_get(display_data, "onSurfaceSize", noone); editWidget.onSurfaceSize = struct_try_get(display_data, "onSurfaceSize", noone);
editWidget.showShape = struct_try_get(display_data, "useShape", true); editWidget.showShape = struct_try_get(display_data, "useShape", true);
@ -680,7 +670,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
case VALUE_DISPLAY.padding : #region case VALUE_DISPLAY.padding : #region
editWidget = new paddingBox(function(val, index) { return setValueInspector(val, index); }, unit); editWidget = new paddingBox(function(val, index) { return setValueInspector(val, index); }, unit);
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
for( var i = 0, n = array_length(animators); i < n; i++ ) for( var i = 0, n = array_length(animators); i < n; i++ )
animators[i].suffix = " " + array_safe_get_fast(global.displaySuffix_Padding, i); animators[i].suffix = " " + array_safe_get_fast(global.displaySuffix_Padding, i);
@ -690,7 +679,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
case VALUE_DISPLAY.corner : #region case VALUE_DISPLAY.corner : #region
editWidget = new cornerBox(function(val, index) { return setValueInspector(val, index); }, unit); editWidget = new cornerBox(function(val, index) { return setValueInspector(val, index); }, unit);
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
for( var i = 0, n = array_length(animators); i < n; i++ ) for( var i = 0, n = array_length(animators); i < n; i++ )
animators[i].suffix = " " + array_safe_get_fast(global.displaySuffix_Padding, i); animators[i].suffix = " " + array_safe_get_fast(global.displaySuffix_Padding, i);
@ -733,7 +721,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
case VALUE_DISPLAY.matrix : #region case VALUE_DISPLAY.matrix : #region
editWidget = new matrixGrid(_txt, display_data.size, function(val, index) { return setValueInspector(val, index); }, unit ); editWidget = new matrixGrid(_txt, display_data.size, function(val, index) { return setValueInspector(val, index); }, unit );
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
for( var i = 0, n = array_length(animators); i < n; i++ ) for( var i = 0, n = array_length(animators); i < n; i++ )
animators[i].suffix = $" {i}"; animators[i].suffix = $" {i}";
@ -778,6 +765,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
break; #endregion break; #endregion
} }
if(editWidget && struct_has(editWidget, "setSlideType")) editWidget.setSlideType(type == VALUE_TYPE.integer);
break; break;
case VALUE_TYPE.boolean : #region case VALUE_TYPE.boolean : #region

View file

@ -109,10 +109,8 @@ function Node_Vector2(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var int = getInputData(2); var int = getInputData(2);
var disp = getInputData(3); var disp = getInputData(3);
for( var i = 0; i < 2; i++ ) { for( var i = 0; i < 2; i++ )
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
inputs[| i].editWidget.setSlidable(int? 0.1 : 0.01);
}
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);

View file

@ -1,4 +1,4 @@
function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { #region function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Vector3"; name = "Vector3";
color = COLORS.node_blend_number; color = COLORS.node_blend_number;
setDimension(96, 32 + 24 * 3); setDimension(96, 32 + 24 * 3);
@ -17,25 +17,23 @@ function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
outputs[| 0] = nodeValue("Vector", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0 ]) outputs[| 0] = nodeValue("Vector", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector); .setDisplay(VALUE_DISPLAY.vector);
static step = function() { #region static step = function() {
var int = getInputData(3); var int = getInputData(3);
for( var i = 0; i < 3; i++ ) { for( var i = 0; i < 3; i++ )
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
inputs[| i].editWidget.setSlidable(int? 0.1 : 0.01);
}
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
} #endregion }
static processData = function(_output, _data, _output_index, _array_index = 0) { #region static processData = function(_output, _data, _output_index, _array_index = 0) {
var vec = [ _data[0], _data[1], _data[2] ]; var vec = [ _data[0], _data[1], _data[2] ];
for( var i = 0, n = array_length(vec); i < n; i++ ) for( var i = 0, n = array_length(vec); i < n; i++ )
vec[i] = _data[3]? round(vec[i]) : vec[i]; vec[i] = _data[3]? round(vec[i]) : vec[i];
return vec; return vec;
} #endregion }
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text);
var vec = getSingleValue(0,, true); var vec = getSingleValue(0,, true);
var v0 = array_safe_get_fast(vec, 0); var v0 = array_safe_get_fast(vec, 0);
@ -47,5 +45,5 @@ function Node_Vector3(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var bbox = drawGetBbox(xx, yy, _s); var bbox = drawGetBbox(xx, yy, _s);
var ss = string_scale(str, bbox.w, bbox.h); var ss = string_scale(str, bbox.w, bbox.h);
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
} #endregion }
} #endregion }

View file

@ -1,4 +1,4 @@
function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { #region function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Vector4"; name = "Vector4";
color = COLORS.node_blend_number; color = COLORS.node_blend_number;
setDimension(96, 32 + 24 * 4); setDimension(96, 32 + 24 * 4);
@ -20,25 +20,23 @@ function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
outputs[| 0] = nodeValue("Vector", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) outputs[| 0] = nodeValue("Vector", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector); .setDisplay(VALUE_DISPLAY.vector);
static step = function() { #region static step = function() {
var int = getInputData(4); var int = getInputData(4);
for( var i = 0; i < 4; i++ ) { for( var i = 0; i < 4; i++ )
inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); inputs[| i].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
inputs[| i].editWidget.setSlidable(int? 0.1 : 0.01);
}
outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float); outputs[| 0].setType(int? VALUE_TYPE.integer : VALUE_TYPE.float);
} #endregion }
static processData = function(_output, _data, _output_index, _array_index = 0) { #region static processData = function(_output, _data, _output_index, _array_index = 0) {
var vec = [ _data[0], _data[1], _data[2], _data[3] ]; var vec = [ _data[0], _data[1], _data[2], _data[3] ];
for( var i = 0, n = array_length(vec); i < n; i++ ) for( var i = 0, n = array_length(vec); i < n; i++ )
vec[i] = _data[4]? round(vec[i]) : vec[i]; vec[i] = _data[4]? round(vec[i]) : vec[i];
return vec; return vec;
} #endregion }
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text);
var vec = getSingleValue(0,, true); var vec = getSingleValue(0,, true);
var v0 = array_safe_get_fast(vec, 0); var v0 = array_safe_get_fast(vec, 0);
@ -51,5 +49,5 @@ function Node_Vector4(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var bbox = drawGetBbox(xx, yy, _s); var bbox = drawGetBbox(xx, yy, _s);
var ss = string_scale(str, bbox.w, bbox.h); var ss = string_scale(str, bbox.w, bbox.h);
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0); draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
} #endregion }
} #endregion }

View file

@ -40,8 +40,6 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor {
tb[1].label = "t"; tb[1].label = "t";
tb[3].label = "b"; tb[3].label = "b";
static setSlideSpeed = function(speed) { for(var i = 0; i < 4; i++) tb[i].setSlidable(speed); }
static setInteract = function(interactable = noone) { static setInteract = function(interactable = noone) {
self.interactable = interactable; self.interactable = interactable;
b_link.interactable = interactable; b_link.interactable = interactable;

View file

@ -487,7 +487,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
toolbars_distrib_space = [ toolbars_distrib_space = [
[ THEME.obj_distribute_h, function() /*=>*/ {return 0}, function() /*=>*/ {return ""}, function(param) /*=>*/ { node_hdistribute_dist(nodes_selecting, nodes_select_anchor, distribution_spacing); } ], [ THEME.obj_distribute_h, function() /*=>*/ {return 0}, function() /*=>*/ {return ""}, function(param) /*=>*/ { node_hdistribute_dist(nodes_selecting, nodes_select_anchor, distribution_spacing); } ],
[ THEME.obj_distribute_v, function() /*=>*/ {return 0}, function() /*=>*/ {return ""}, function(param) /*=>*/ { node_vdistribute_dist(nodes_selecting, nodes_select_anchor, distribution_spacing); } ], [ THEME.obj_distribute_v, function() /*=>*/ {return 0}, function() /*=>*/ {return ""}, function(param) /*=>*/ { node_vdistribute_dist(nodes_selecting, nodes_select_anchor, distribution_spacing); } ],
[ new textBox(TEXTBOX_INPUT.number, function(val) { distribution_spacing = value_snap(val, 4); } ).setSlidable(1).setPadding(4), function() /*=>*/ {return distribution_spacing} ], [ new textBox(TEXTBOX_INPUT.number, function(val) { distribution_spacing = value_snap(val, 4); } ).setPadding(4), function() /*=>*/ {return distribution_spacing} ],
]; ];
toolbars = [ toolbars_general ]; toolbars = [ toolbars_general ];

View file

@ -19,7 +19,7 @@ function Panel_Graph_Connection_Setting() : Panel_Linear_Setting() constructor {
new __Panel_Linear_Setting_Item_Preference( new __Panel_Linear_Setting_Item_Preference(
__txtx("dialog_connection_radius", "Corner radius"), __txtx("dialog_connection_radius", "Corner radius"),
"connection_line_corner", "connection_line_corner",
new textBox(TEXTBOX_INPUT.number, function(str) { PREFERENCES.connection_line_corner = max(0, real(str)); }).setSlidable(), new textBox(TEXTBOX_INPUT.number, function(str) { PREFERENCES.connection_line_corner = max(0, real(str)); }),
), ),
new __Panel_Linear_Setting_Item_Preference( new __Panel_Linear_Setting_Item_Preference(
__txtx("pref_connection_quality", "Render quality"), __txtx("pref_connection_quality", "Render quality"),

View file

@ -16,7 +16,7 @@ function Panel_Keyframe_Driver(key) : Panel_Linear_Setting() constructor {
prop_linear = [ prop_linear = [
new __Panel_Linear_Setting_Item( new __Panel_Linear_Setting_Item(
__txt("Speed"), __txt("Speed"),
new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.speed = val; }).setSlidable(), new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.speed = val; }),
function() { return key.drivers.speed; } function() { return key.drivers.speed; }
), ),
]; ];
@ -24,7 +24,7 @@ function Panel_Keyframe_Driver(key) : Panel_Linear_Setting() constructor {
prop_wiggle = [ prop_wiggle = [
new __Panel_Linear_Setting_Item( new __Panel_Linear_Setting_Item(
__txt("Seed"), __txt("Seed"),
new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.seed = val; }).setSlidable(), new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.seed = val; }),
function() { return key.drivers.seed; } function() { return key.drivers.seed; }
), ),
new __Panel_Linear_Setting_Item( new __Panel_Linear_Setting_Item(
@ -34,17 +34,17 @@ function Panel_Keyframe_Driver(key) : Panel_Linear_Setting() constructor {
), ),
new __Panel_Linear_Setting_Item( new __Panel_Linear_Setting_Item(
__txt("Frequency"), __txt("Frequency"),
new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.frequency = val; }).setSlidable(), new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.frequency = val; }),
function() { return key.drivers.frequency; } function() { return key.drivers.frequency; }
), ),
new __Panel_Linear_Setting_Item( new __Panel_Linear_Setting_Item(
__txt("Amplitude"), __txt("Amplitude"),
new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.amplitude = val; }).setSlidable(), new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.amplitude = val; }),
function() { return key.drivers.amplitude; } function() { return key.drivers.amplitude; }
), ),
new __Panel_Linear_Setting_Item( new __Panel_Linear_Setting_Item(
__txt("Octave"), __txt("Octave"),
new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.octave = val; }).setSlidable(), new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.octave = val; }),
function() { return key.drivers.octave; } function() { return key.drivers.octave; }
), ),
]; ];
@ -57,17 +57,17 @@ function Panel_Keyframe_Driver(key) : Panel_Linear_Setting() constructor {
), ),
new __Panel_Linear_Setting_Item( new __Panel_Linear_Setting_Item(
__txt("Frequency"), __txt("Frequency"),
new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.frequency = val; }).setSlidable(), new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.frequency = val; }),
function() { return key.drivers.frequency; } function() { return key.drivers.frequency; }
), ),
new __Panel_Linear_Setting_Item( new __Panel_Linear_Setting_Item(
__txt("Amplitude"), __txt("Amplitude"),
new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.amplitude = val; }).setSlidable(), new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.amplitude = val; }),
function() { return key.drivers.amplitude; } function() { return key.drivers.amplitude; }
), ),
new __Panel_Linear_Setting_Item( new __Panel_Linear_Setting_Item(
__txt("Phase"), __txt("Phase"),
new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.phase = val; }).setSlidable(), new textBox( TEXTBOX_INPUT.number, function(val) { key.drivers.phase = val; }),
function() { return key.drivers.phase ; } function() { return key.drivers.phase ; }
), ),
]; ];

View file

@ -21,11 +21,6 @@ function pathAnchorBox(_onModify) : widget() constructor {
tb[4].setPrecision(2).setLabel("dx1"); tb[4].setPrecision(2).setLabel("dx1");
tb[5].setPrecision(2).setLabel("dy1"); tb[5].setPrecision(2).setLabel("dy1");
static setSlideSpeed = function(speed) {
for( var i = 0, n = array_length(tb); i < n; i++ )
tb[i].setSlidable(speed);
}
static setInteract = function(interactable = noone) { static setInteract = function(interactable = noone) {
self.interactable = interactable; self.interactable = interactable;

View file

@ -45,11 +45,6 @@ function quarternionBox(_onModify) : widget() constructor {
tb[i].label = axis[i]; tb[i].label = axis[i];
} }
static setSlideSpeed = function(speed) {
for(var i = 0; i < size; i++)
tb[i].setSlidable(speed);
}
static setInteract = function(interactable) { static setInteract = function(interactable) {
self.interactable = interactable; self.interactable = interactable;

View file

@ -35,11 +35,6 @@ function rangeBox(_type, _onModify) : widget() constructor {
tb[i].label = labels[i]; tb[i].label = labels[i];
} }
static setSlideSpeed = function(speed) {
tb[0].setSlidable(speed);
tb[1].setSlidable(speed);
}
static setInteract = function(interactable = noone) { static setInteract = function(interactable = noone) {
self.interactable = interactable; self.interactable = interactable;

View file

@ -6,13 +6,12 @@ function rotator(_onModify, _step = -1) : widget() constructor {
dragging = noone; dragging = noone;
drag_sv = 0; drag_sv = 0;
real_val = 0; real_val = 0;
slide_speed = 1 / 10;
side_button = noone; side_button = noone;
spr_bg = THEME.rotator_bg; spr_bg = THEME.rotator_bg;
spr_knob = THEME.rotator_knob; spr_knob = THEME.rotator_knob;
tb_value = new textBox(TEXTBOX_INPUT.number, onModify).setSlidable([ 0.1, 15 ], true); tb_value = new textBox(TEXTBOX_INPUT.number, onModify).setSlideStep(15);
tb_value.hide = true; tb_value.hide = true;
halign = fa_center; halign = fa_center;

View file

@ -9,10 +9,10 @@ function rotatorRandom(_onModify) : widget() constructor {
knob_hovering = noone; knob_hovering = noone;
mode = 0; mode = 0;
tb_min_0 = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 1); } ).setSlidable([ 0.1, 15 ], true); tb_min_0.hide = true; tb_min_0 = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 1); } ).setSlideStep(15); tb_min_0.hide = true;
tb_max_0 = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 2); } ).setSlidable([ 0.1, 15 ], true); tb_max_0.hide = true; tb_max_0 = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 2); } ).setSlideStep(15); tb_max_0.hide = true;
tb_min_1 = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 3); } ).setSlidable([ 0.1, 15 ], true); tb_min_1.hide = true; tb_min_1 = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 3); } ).setSlideStep(15); tb_min_1.hide = true;
tb_max_1 = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 4); } ).setSlidable([ 0.1, 15 ], true); tb_max_1.hide = true; tb_max_1 = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 4); } ).setSlideStep(15); tb_max_1.hide = true;
tooltip = new tooltipSelector("Mode", [ tooltip = new tooltipSelector("Mode", [
__txtx("widget_rotator_random_range", "Range"), __txtx("widget_rotator_random_range", "Range"),

View file

@ -8,8 +8,8 @@ function rotatorRange(_onModify) : widget() constructor {
knob_hovering = noone; knob_hovering = noone;
tb_min = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 0); } ).setSlidable([ 0.1, 15 ], true); tb_min.hide = true; tb_min = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 0); } ).setSlideStep(15); tb_min.hide = true;
tb_max = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 1); } ).setSlidable([ 0.1, 15 ], true); tb_max.hide = true; tb_max = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(val, 1); } ).setSlideStep(15); tb_max.hide = true;
static setInteract = function(interactable = noone) { static setInteract = function(interactable = noone) {
self.interactable = interactable; self.interactable = interactable;

View file

@ -6,6 +6,6 @@ enum SLIDER_UPDATE {
function slider(_min, _max, _step, _onModify = noone, _onRelease = noone) { function slider(_min, _max, _step, _onModify = noone, _onRelease = noone) {
return new textBox( TEXTBOX_INPUT.number, _onModify ) return new textBox( TEXTBOX_INPUT.number, _onModify )
.setSlidable(_step / 10, false, [ _min, _max ]) .setSlideRange(_min, _max)
.setOnRelease(_onRelease); .setOnRelease(_onRelease);
} }

View file

@ -6,17 +6,15 @@ function sliderRange(_step, _int, _range, _onModify) : widget() constructor {
onModify = _onModify; onModify = _onModify;
tb_value_min = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(clamp(val, curr_range[0], curr_range[1]), 0); }).setSlidable(_step, _int, _range); tb_value_min = new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ {return onModify(clamp(val, curr_range[0], curr_range[1]), 0)})
tb_value_max = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(clamp(val, curr_range[0], curr_range[1]), 1); }).setSlidable(_step, _int, _range); .setSlideType(_int).setSlideStep(_step).setSlideRange(_range);
tb_value_max = new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ {return onModify(clamp(val, curr_range[0], curr_range[1]), 1)})
.setSlideType(_int).setSlideStep(_step).setSlideRange(_range);
tb_value_min.hide = true; tb_value_min.hide = true;
tb_value_max.hide = true; tb_value_max.hide = true;
static setSlideSpeed = function(speed) {
tb_value_min.setSlidable(speed);
tb_value_max.setSlidable(speed);
}
static setInteract = function(interactable = noone) { static setInteract = function(interactable = noone) {
self.interactable = interactable; self.interactable = interactable;
tb_value_min.interactable = interactable; tb_value_min.interactable = interactable;
@ -66,11 +64,10 @@ function sliderRange(_step, _int, _range, _onModify) : widget() constructor {
var tb_w = _w / 2; var tb_w = _w / 2;
if(tb_value_min.selecting || tb_value_max.selecting) { if(tb_value_min.selecting || tb_value_max.selecting)
draw_sprite_stretched_ext(THEME.textbox, 1, _x, _y, _w, _h, boxColor, 1); draw_sprite_stretched_ext(THEME.textbox, 1, _x, _y, _w, _h, boxColor, 1);
} else { else
draw_sprite_stretched_ext(THEME.textbox, 0, _x, _y, _w, _h, boxColor, 0.5 + 0.5 * interactable); draw_sprite_stretched_ext(THEME.textbox, 0, _x, _y, _w, _h, boxColor, 0.5 + 0.5 * interactable);
}
tb_value_min.curr_range[0] = curr_range[0]; tb_value_min.curr_range[0] = curr_range[0];
tb_value_min.curr_range[1] = curr_range[1]; tb_value_min.curr_range[1] = curr_range[1];

View file

@ -1,7 +1,4 @@
enum TEXTBOX_INPUT { enum TEXTBOX_INPUT { text, number }
text,
number
}
function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
onRelease = noone; onRelease = noone;
@ -18,18 +15,24 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
no_empty = true; no_empty = true;
slidable = false; slidable = true;
sliding = false; sliding = false;
slidePen = false; slidePen = false;
slide_delta = 0; slide_delta = 0;
slide_int = false; slide_int = false;
slide_speed = 1 / 25; slide_speed = 0.01;
slide_snap = 0; slide_snap = 0;
slide_range = noone; slide_range = noone;
curr_range = [ 0, 1 ]; curr_range = [ 0, 1 ];
slider_dy = 0;
slider_my = 0;
slider_mulp = 0;
slider_def_val = 0; slider_def_val = 0;
slider_cur_val = 0; slider_cur_val = 0;
slider_cur_del = 0;
slider_object = noone;
label = ""; label = "";
labelColor = COLORS._main_text_sub; labelColor = COLORS._main_text_sub;
@ -80,15 +83,9 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
onModify(value); onModify(value);
} }
static setSlidable = function(slideStep = slide_speed, _slide_int = false, _slide_range = noone) { static setSlideType = function(_slide_int = false) { slide_int = _slide_int; return self; }
slidable = true; static setSlideStep = function(_slide_step = 0) { slide_snap = _slide_step; return self; }
slide_speed = is_array(slideStep)? slideStep[0] : slideStep; static setSlideRange = function(_min = 0, _max = 1) { slide_range = [_min, _max]; return self; }
slide_snap = is_array(slideStep)? slideStep[1] : 0;
slide_int = _slide_int;
slide_range = _slide_range;
return self;
}
static setRange = function(_rng_min, _rng_max) { static setRange = function(_rng_min, _rng_max) {
use_range = true; use_range = true;
@ -514,8 +511,11 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
var _defval = toNumber(_current_text); var _defval = toNumber(_current_text);
slider_def_val = _defval; slider_def_val = _defval;
slider_cur_val = _defval; slider_cur_val = _defval;
slider_cur_del = 0;
slidePen = PEN_USE; slidePen = PEN_USE;
slider_dy = 0;
slider_mulp = 0;
if(!slidePen) { if(!slidePen) {
CURSOR_LOCK_X = mouse_mx; CURSOR_LOCK_X = mouse_mx;
@ -523,12 +523,26 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
} }
sliding = 2; sliding = 2;
slider_object = instance_create_depth(rx + _x, ry + _y, -16000, slider_Slider, { w: _w, h: _h });
slider_object.text = self;
} }
var _mdx = slidePen? PEN_X_DELTA : window_mouse_get_delta_x();
var _mdy = slidePen? PEN_Y_DELTA : window_mouse_get_delta_y();
if(sliding == 2) { if(sliding == 2) {
if(!slidePen && PREFERENCES.slider_lock_mouse) CURSOR_LOCK = true; if(!slidePen && PREFERENCES.slider_lock_mouse) CURSOR_LOCK = true;
if(mouse_press(mb_right)) { if(abs(_mdy) > abs(_mdx))
slider_dy += slidePen? PEN_Y_DELTA : window_mouse_get_delta_y();
var _mulp = slider_mulp;
if(slider_dy < -160 * (1 + abs(slider_mulp) * .5)) { slider_mulp = clamp(slider_mulp + 1, -2, 2); slider_dy = 0; }
else if(slider_dy > 160 * (1 + abs(slider_mulp) * .5)) { slider_mulp = clamp(slider_mulp - 1, -2, 2); slider_dy = 0; }
if(_mulp != slider_mulp) slider_cur_del = 0;
if(mouse_press(mb_right)) { //cancel
_input_text = string_real(slider_def_val); _input_text = string_real(slider_def_val);
sliding = 0; sliding = 0;
apply(); apply();
@ -539,19 +553,17 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
} else { } else {
MOUSE_BLOCK = true; MOUSE_BLOCK = true;
var _s = slide_speed; var _s = slide_speed;
_s *= power(10, slider_mulp);
var _mdx = slidePen? PEN_X_DELTA : window_mouse_get_delta_x();
var _mdy = slidePen? PEN_Y_DELTA : window_mouse_get_delta_y();
var _dx = abs(_mdx) > abs(_mdy)? _mdx : -_mdy; var _dx = abs(_mdx) > abs(_mdy)? _mdx : -_mdy;
if(key_mod_press(CTRL) && !slide_snap) _s *= 10; if(key_mod_press(CTRL) && !slide_snap) _s *= 10;
if(key_mod_press(ALT)) _s /= 10; if(key_mod_press(ALT)) _s /= 10;
slider_cur_val += _dx * _s; slider_cur_del += _dx;
slider_cur_val = slider_def_val + slider_cur_del * _s;
if(slide_range != noone) if(slide_range != noone) slider_cur_val = clamp(slider_cur_val, curr_range[0], curr_range[1]);
slider_cur_val = clamp(slider_cur_val, curr_range[0], curr_range[1]);
var _val = value_snap(slider_cur_val, _s); var _val = value_snap(slider_cur_val, _s);
@ -575,7 +587,13 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
_update = true; _update = true;
UNDO_HOLDING = false; UNDO_HOLDING = false;
} }
} #endregion
} else {
if(slider_object) {
slider_object.anim = 1;
slider_object = noone;
}
}
if(selecting) { if(selecting) {
if(hide < 2) { if(hide < 2) {

View file

@ -60,12 +60,6 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor {
return self; return self;
} }
static setSlideSpeed = function(speed) {
for(var i = 0; i < size; i++)
tb[i].setSlidable(speed);
return self;
}
static setInteract = function(interactable) { static setInteract = function(interactable) {
self.interactable = interactable; self.interactable = interactable;
@ -118,8 +112,6 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor {
var sz = min(size, array_length(_data)); var sz = min(size, array_length(_data));
var _bs = min(_h, ui(32)); var _bs = min(_h, ui(32));
if(unit && unit.reference != noone) for(var i = 0; i < sz; i++) tb[i].slide_int = unit.mode == VALUE_UNIT.constant? true : false;
if((_w - _bs) / sz > ui(48)) { if((_w - _bs) / sz > ui(48)) {
if(side_button) { if(side_button) {
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);

View file

@ -50,8 +50,6 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const
tb[i].hide = true; tb[i].hide = true;
} }
static setSlideSpeed = function(speed) { for(var i = 0; i < size; i++) tb[i].setSlidable(speed); }
static setInteract = function(interactable = noone) { static setInteract = function(interactable = noone) {
self.interactable = interactable; self.interactable = interactable;
for( var i = 0; i < size; i++ ) tb[i].interactable = interactable; for( var i = 0; i < size; i++ ) tb[i].interactable = interactable;