- [HLSL] Fix color value does not work.

This commit is contained in:
Tanasart 2024-07-27 10:46:16 +07:00
parent 4f9c076b12
commit fb2065f004
28 changed files with 658 additions and 65 deletions

View file

@ -240,6 +240,7 @@
{"name":"Steamworks","order":2,"path":"extensions/Steamworks/Steamworks.yy",}, {"name":"Steamworks","order":2,"path":"extensions/Steamworks/Steamworks.yy",},
{"name":"TabletStuff","order":15,"path":"extensions/TabletStuff/TabletStuff.yy",}, {"name":"TabletStuff","order":15,"path":"extensions/TabletStuff/TabletStuff.yy",},
{"name":"YYFirebaseFirestore","order":1,"path":"extensions/YYFirebaseFirestore/YYFirebaseFirestore.yy",}, {"name":"YYFirebaseFirestore","order":1,"path":"extensions/YYFirebaseFirestore/YYFirebaseFirestore.yy",},
{"name":"_f_code_s","order":18,"path":"fonts/_f_code_s/_f_code_s.yy",},
{"name":"_f_code","order":9,"path":"fonts/_f_code/_f_code.yy",}, {"name":"_f_code","order":9,"path":"fonts/_f_code/_f_code.yy",},
{"name":"_f_h1","order":11,"path":"fonts/_f_h1/_f_h1.yy",}, {"name":"_f_h1","order":11,"path":"fonts/_f_h1/_f_h1.yy",},
{"name":"_f_h2","order":12,"path":"fonts/_f_h2/_f_h2.yy",}, {"name":"_f_h2","order":12,"path":"fonts/_f_h2/_f_h2.yy",},
@ -1217,6 +1218,7 @@
{"name":"panel_notification","order":2,"path":"scripts/panel_notification/panel_notification.yy",}, {"name":"panel_notification","order":2,"path":"scripts/panel_notification/panel_notification.yy",},
{"name":"panel_palette_mixer","order":3,"path":"scripts/panel_palette_mixer/panel_palette_mixer.yy",}, {"name":"panel_palette_mixer","order":3,"path":"scripts/panel_palette_mixer/panel_palette_mixer.yy",},
{"name":"panel_patreon","order":2,"path":"scripts/panel_patreon/panel_patreon.yy",}, {"name":"panel_patreon","order":2,"path":"scripts/panel_patreon/panel_patreon.yy",},
{"name":"panel_presets","order":4,"path":"scripts/panel_presets/panel_presets.yy",},
{"name":"panel_preview_3d_sdf_setting","order":10,"path":"scripts/panel_preview_3d_sdf_setting/panel_preview_3d_sdf_setting.yy",}, {"name":"panel_preview_3d_sdf_setting","order":10,"path":"scripts/panel_preview_3d_sdf_setting/panel_preview_3d_sdf_setting.yy",},
{"name":"panel_preview_3d_setting","order":2,"path":"scripts/panel_preview_3d_setting/panel_preview_3d_setting.yy",}, {"name":"panel_preview_3d_setting","order":2,"path":"scripts/panel_preview_3d_setting/panel_preview_3d_setting.yy",},
{"name":"panel_preview_grid_setting","order":4,"path":"scripts/panel_preview_grid_setting/panel_preview_grid_setting.yy",}, {"name":"panel_preview_grid_setting","order":4,"path":"scripts/panel_preview_grid_setting/panel_preview_grid_setting.yy",},

View file

@ -689,6 +689,7 @@
{"id":{"name":"Steamworks","path":"extensions/Steamworks/Steamworks.yy",},}, {"id":{"name":"Steamworks","path":"extensions/Steamworks/Steamworks.yy",},},
{"id":{"name":"TabletStuff","path":"extensions/TabletStuff/TabletStuff.yy",},}, {"id":{"name":"TabletStuff","path":"extensions/TabletStuff/TabletStuff.yy",},},
{"id":{"name":"YYFirebaseFirestore","path":"extensions/YYFirebaseFirestore/YYFirebaseFirestore.yy",},}, {"id":{"name":"YYFirebaseFirestore","path":"extensions/YYFirebaseFirestore/YYFirebaseFirestore.yy",},},
{"id":{"name":"_f_code_s","path":"fonts/_f_code_s/_f_code_s.yy",},},
{"id":{"name":"_f_code","path":"fonts/_f_code/_f_code.yy",},}, {"id":{"name":"_f_code","path":"fonts/_f_code/_f_code.yy",},},
{"id":{"name":"_f_h1","path":"fonts/_f_h1/_f_h1.yy",},}, {"id":{"name":"_f_h1","path":"fonts/_f_h1/_f_h1.yy",},},
{"id":{"name":"_f_h2","path":"fonts/_f_h2/_f_h2.yy",},}, {"id":{"name":"_f_h2","path":"fonts/_f_h2/_f_h2.yy",},},
@ -1821,6 +1822,7 @@
{"id":{"name":"panel_palette_mixer","path":"scripts/panel_palette_mixer/panel_palette_mixer.yy",},}, {"id":{"name":"panel_palette_mixer","path":"scripts/panel_palette_mixer/panel_palette_mixer.yy",},},
{"id":{"name":"panel_palette","path":"scripts/panel_palette/panel_palette.yy",},}, {"id":{"name":"panel_palette","path":"scripts/panel_palette/panel_palette.yy",},},
{"id":{"name":"panel_patreon","path":"scripts/panel_patreon/panel_patreon.yy",},}, {"id":{"name":"panel_patreon","path":"scripts/panel_patreon/panel_patreon.yy",},},
{"id":{"name":"panel_presets","path":"scripts/panel_presets/panel_presets.yy",},},
{"id":{"name":"panel_preview_3d_sdf_setting","path":"scripts/panel_preview_3d_sdf_setting/panel_preview_3d_sdf_setting.yy",},}, {"id":{"name":"panel_preview_3d_sdf_setting","path":"scripts/panel_preview_3d_sdf_setting/panel_preview_3d_sdf_setting.yy",},},
{"id":{"name":"panel_preview_3d_setting","path":"scripts/panel_preview_3d_setting/panel_preview_3d_setting.yy",},}, {"id":{"name":"panel_preview_3d_setting","path":"scripts/panel_preview_3d_setting/panel_preview_3d_setting.yy",},},
{"id":{"name":"panel_preview_grid_setting","path":"scripts/panel_preview_grid_setting/panel_preview_grid_setting.yy",},}, {"id":{"name":"panel_preview_grid_setting","path":"scripts/panel_preview_grid_setting/panel_preview_grid_setting.yy",},},

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,141 @@
{
"resourceType": "GMFont",
"resourceVersion": "1.0",
"name": "_f_code",
"AntiAlias": 1,
"applyKerning": 0,
"ascender": 15,
"ascenderOffset": 0,
"bold": false,
"canGenerateBitmap": true,
"charset": 0,
"first": 0,
"fontName": "Fira Code Medium",
"glyphOperations": 0,
"glyphs": {
"32": {"character":32,"h":21,"offset":0,"shift":10,"w":10,"x":2,"y":2,},
"33": {"character":33,"h":21,"offset":3,"shift":19,"w":4,"x":205,"y":48,},
"34": {"character":34,"h":21,"offset":2,"shift":19,"w":6,"x":197,"y":48,},
"35": {"character":35,"h":21,"offset":0,"shift":19,"w":9,"x":186,"y":48,},
"36": {"character":36,"h":21,"offset":0,"shift":19,"w":9,"x":175,"y":48,},
"37": {"character":37,"h":21,"offset":0,"shift":19,"w":10,"x":163,"y":48,},
"38": {"character":38,"h":21,"offset":0,"shift":19,"w":10,"x":151,"y":48,},
"39": {"character":39,"h":21,"offset":3,"shift":19,"w":3,"x":146,"y":48,},
"40": {"character":40,"h":21,"offset":1,"shift":19,"w":6,"x":138,"y":48,},
"41": {"character":41,"h":21,"offset":2,"shift":19,"w":6,"x":130,"y":48,},
"42": {"character":42,"h":21,"offset":0,"shift":19,"w":9,"x":211,"y":48,},
"43": {"character":43,"h":21,"offset":0,"shift":19,"w":9,"x":119,"y":48,},
"44": {"character":44,"h":21,"offset":3,"shift":19,"w":4,"x":103,"y":48,},
"45": {"character":45,"h":21,"offset":1,"shift":19,"w":8,"x":93,"y":48,},
"46": {"character":46,"h":21,"offset":3,"shift":19,"w":4,"x":87,"y":48,},
"47": {"character":47,"h":21,"offset":0,"shift":19,"w":9,"x":76,"y":48,},
"48": {"character":48,"h":21,"offset":1,"shift":19,"w":8,"x":66,"y":48,},
"49": {"character":49,"h":21,"offset":1,"shift":19,"w":8,"x":56,"y":48,},
"50": {"character":50,"h":21,"offset":0,"shift":19,"w":9,"x":45,"y":48,},
"51": {"character":51,"h":21,"offset":0,"shift":19,"w":9,"x":34,"y":48,},
"52": {"character":52,"h":21,"offset":0,"shift":19,"w":9,"x":23,"y":48,},
"53": {"character":53,"h":21,"offset":1,"shift":19,"w":8,"x":109,"y":48,},
"54": {"character":54,"h":21,"offset":1,"shift":19,"w":8,"x":222,"y":48,},
"55": {"character":55,"h":21,"offset":1,"shift":19,"w":8,"x":232,"y":48,},
"56": {"character":56,"h":21,"offset":0,"shift":19,"w":9,"x":242,"y":48,},
"57": {"character":57,"h":21,"offset":0,"shift":19,"w":9,"x":204,"y":71,},
"58": {"character":58,"h":21,"offset":3,"shift":19,"w":4,"x":198,"y":71,},
"59": {"character":59,"h":21,"offset":3,"shift":19,"w":4,"x":192,"y":71,},
"60": {"character":60,"h":21,"offset":1,"shift":19,"w":8,"x":182,"y":71,},
"61": {"character":61,"h":21,"offset":1,"shift":19,"w":8,"x":172,"y":71,},
"62": {"character":62,"h":21,"offset":1,"shift":19,"w":8,"x":162,"y":71,},
"63": {"character":63,"h":21,"offset":1,"shift":19,"w":8,"x":152,"y":71,},
"64": {"character":64,"h":21,"offset":0,"shift":19,"w":10,"x":140,"y":71,},
"65": {"character":65,"h":21,"offset":0,"shift":19,"w":10,"x":128,"y":71,},
"66": {"character":66,"h":21,"offset":1,"shift":19,"w":8,"x":118,"y":71,},
"67": {"character":67,"h":21,"offset":0,"shift":19,"w":10,"x":106,"y":71,},
"68": {"character":68,"h":21,"offset":1,"shift":19,"w":8,"x":96,"y":71,},
"69": {"character":69,"h":21,"offset":1,"shift":19,"w":8,"x":86,"y":71,},
"70": {"character":70,"h":21,"offset":2,"shift":19,"w":7,"x":77,"y":71,},
"71": {"character":71,"h":21,"offset":0,"shift":19,"w":9,"x":66,"y":71,},
"72": {"character":72,"h":21,"offset":1,"shift":19,"w":8,"x":56,"y":71,},
"73": {"character":73,"h":21,"offset":1,"shift":19,"w":8,"x":46,"y":71,},
"74": {"character":74,"h":21,"offset":0,"shift":19,"w":9,"x":35,"y":71,},
"75": {"character":75,"h":21,"offset":1,"shift":19,"w":9,"x":24,"y":71,},
"76": {"character":76,"h":21,"offset":1,"shift":19,"w":8,"x":14,"y":71,},
"77": {"character":77,"h":21,"offset":0,"shift":19,"w":10,"x":2,"y":71,},
"78": {"character":78,"h":21,"offset":1,"shift":19,"w":8,"x":13,"y":48,},
"79": {"character":79,"h":21,"offset":0,"shift":19,"w":9,"x":2,"y":48,},
"80": {"character":80,"h":21,"offset":1,"shift":19,"w":9,"x":235,"y":25,},
"81": {"character":81,"h":21,"offset":0,"shift":19,"w":10,"x":236,"y":2,},
"82": {"character":82,"h":21,"offset":1,"shift":19,"w":9,"x":217,"y":2,},
"83": {"character":83,"h":21,"offset":0,"shift":19,"w":9,"x":206,"y":2,},
"84": {"character":84,"h":21,"offset":0,"shift":19,"w":10,"x":194,"y":2,},
"85": {"character":85,"h":21,"offset":0,"shift":19,"w":9,"x":183,"y":2,},
"86": {"character":86,"h":21,"offset":0,"shift":19,"w":10,"x":171,"y":2,},
"87": {"character":87,"h":21,"offset":0,"shift":19,"w":10,"x":159,"y":2,},
"88": {"character":88,"h":21,"offset":0,"shift":19,"w":10,"x":147,"y":2,},
"89": {"character":89,"h":21,"offset":0,"shift":19,"w":10,"x":135,"y":2,},
"90": {"character":90,"h":21,"offset":0,"shift":19,"w":9,"x":124,"y":2,},
"91": {"character":91,"h":21,"offset":2,"shift":19,"w":6,"x":228,"y":2,},
"92": {"character":92,"h":21,"offset":0,"shift":19,"w":9,"x":113,"y":2,},
"93": {"character":93,"h":21,"offset":2,"shift":19,"w":5,"x":95,"y":2,},
"94": {"character":94,"h":21,"offset":0,"shift":19,"w":9,"x":84,"y":2,},
"95": {"character":95,"h":21,"offset":0,"shift":19,"w":9,"x":73,"y":2,},
"96": {"character":96,"h":21,"offset":2,"shift":19,"w":5,"x":66,"y":2,},
"97": {"character":97,"h":21,"offset":0,"shift":19,"w":9,"x":55,"y":2,},
"98": {"character":98,"h":21,"offset":1,"shift":19,"w":8,"x":45,"y":2,},
"99": {"character":99,"h":21,"offset":1,"shift":19,"w":8,"x":35,"y":2,},
"100": {"character":100,"h":21,"offset":0,"shift":19,"w":9,"x":24,"y":2,},
"101": {"character":101,"h":21,"offset":1,"shift":19,"w":8,"x":14,"y":2,},
"102": {"character":102,"h":21,"offset":1,"shift":19,"w":9,"x":102,"y":2,},
"103": {"character":103,"h":21,"offset":0,"shift":19,"w":10,"x":2,"y":25,},
"104": {"character":104,"h":21,"offset":1,"shift":19,"w":8,"x":111,"y":25,},
"105": {"character":105,"h":21,"offset":1,"shift":19,"w":8,"x":14,"y":25,},
"106": {"character":106,"h":21,"offset":1,"shift":19,"w":7,"x":216,"y":25,},
"107": {"character":107,"h":21,"offset":1,"shift":19,"w":9,"x":205,"y":25,},
"108": {"character":108,"h":21,"offset":0,"shift":19,"w":9,"x":194,"y":25,},
"109": {"character":109,"h":21,"offset":0,"shift":19,"w":9,"x":183,"y":25,},
"110": {"character":110,"h":21,"offset":1,"shift":19,"w":8,"x":173,"y":25,},
"111": {"character":111,"h":21,"offset":0,"shift":19,"w":9,"x":162,"y":25,},
"112": {"character":112,"h":21,"offset":1,"shift":19,"w":8,"x":152,"y":25,},
"113": {"character":113,"h":21,"offset":0,"shift":19,"w":9,"x":141,"y":25,},
"114": {"character":114,"h":21,"offset":1,"shift":19,"w":8,"x":131,"y":25,},
"115": {"character":115,"h":21,"offset":1,"shift":19,"w":8,"x":225,"y":25,},
"116": {"character":116,"h":21,"offset":1,"shift":19,"w":8,"x":121,"y":25,},
"117": {"character":117,"h":21,"offset":1,"shift":19,"w":8,"x":101,"y":25,},
"118": {"character":118,"h":21,"offset":0,"shift":19,"w":9,"x":90,"y":25,},
"119": {"character":119,"h":21,"offset":0,"shift":19,"w":10,"x":78,"y":25,},
"120": {"character":120,"h":21,"offset":0,"shift":19,"w":9,"x":67,"y":25,},
"121": {"character":121,"h":21,"offset":0,"shift":19,"w":9,"x":56,"y":25,},
"122": {"character":122,"h":21,"offset":1,"shift":19,"w":8,"x":46,"y":25,},
"123": {"character":123,"h":21,"offset":1,"shift":19,"w":7,"x":37,"y":25,},
"124": {"character":124,"h":21,"offset":3,"shift":19,"w":3,"x":32,"y":25,},
"125": {"character":125,"h":21,"offset":2,"shift":19,"w":6,"x":24,"y":25,},
"126": {"character":126,"h":21,"offset":0,"shift":19,"w":10,"x":215,"y":71,},
"9647": {"character":9647,"h":21,"offset":2,"shift":19,"w":5,"x":227,"y":71,},
},
"hinting": 0,
"includeTTF": false,
"interpreter": 0,
"italic": false,
"kerningPairs": [],
"last": 0,
"lineHeight": 0,
"maintainGms1Font": false,
"parent": {
"name": "font",
"path": "folders/font.yy",
},
"pointRounding": 0,
"ranges": [
{"lower":32,"upper":127,},
{"lower":9647,"upper":9647,},
],
"regenerateBitmap": false,
"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,
"size": 12.0,
"styleName": "Light",
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"TTFName": "",
"usesSDF": false,
}

BIN
fonts/_f_code_s/_f_code.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -0,0 +1,143 @@
{
"$GMFont":"",
"%Name":"_f_code_s",
"AntiAlias":1,
"applyKerning":0,
"ascender":10,
"ascenderOffset":0,
"bold":false,
"canGenerateBitmap":true,
"charset":0,
"first":0,
"fontName":"Fira Code Medium",
"glyphOperations":0,
"glyphs":{
"32":{"character":32,"h":14,"offset":0,"shift":6,"w":6,"x":2,"y":2,},
"33":{"character":33,"h":14,"offset":2,"shift":6,"w":2,"x":42,"y":66,},
"34":{"character":34,"h":14,"offset":1,"shift":6,"w":4,"x":36,"y":66,},
"35":{"character":35,"h":14,"offset":0,"shift":6,"w":6,"x":28,"y":66,},
"36":{"character":36,"h":14,"offset":0,"shift":6,"w":6,"x":20,"y":66,},
"37":{"character":37,"h":14,"offset":0,"shift":6,"w":7,"x":11,"y":66,},
"38":{"character":38,"h":14,"offset":0,"shift":6,"w":7,"x":2,"y":66,},
"39":{"character":39,"h":14,"offset":2,"shift":6,"w":2,"x":120,"y":50,},
"40":{"character":40,"h":14,"offset":1,"shift":6,"w":4,"x":114,"y":50,},
"41":{"character":41,"h":14,"offset":1,"shift":6,"w":5,"x":107,"y":50,},
"42":{"character":42,"h":14,"offset":0,"shift":6,"w":6,"x":46,"y":66,},
"43":{"character":43,"h":14,"offset":0,"shift":6,"w":6,"x":99,"y":50,},
"44":{"character":44,"h":14,"offset":2,"shift":6,"w":3,"x":86,"y":50,},
"45":{"character":45,"h":14,"offset":1,"shift":6,"w":5,"x":79,"y":50,},
"46":{"character":46,"h":14,"offset":2,"shift":6,"w":3,"x":74,"y":50,},
"47":{"character":47,"h":14,"offset":0,"shift":6,"w":6,"x":66,"y":50,},
"48":{"character":48,"h":14,"offset":0,"shift":6,"w":6,"x":58,"y":50,},
"49":{"character":49,"h":14,"offset":0,"shift":6,"w":6,"x":50,"y":50,},
"50":{"character":50,"h":14,"offset":0,"shift":6,"w":6,"x":42,"y":50,},
"51":{"character":51,"h":14,"offset":0,"shift":6,"w":6,"x":34,"y":50,},
"52":{"character":52,"h":14,"offset":0,"shift":6,"w":6,"x":26,"y":50,},
"53":{"character":53,"h":14,"offset":0,"shift":6,"w":6,"x":91,"y":50,},
"54":{"character":54,"h":14,"offset":0,"shift":6,"w":6,"x":54,"y":66,},
"55":{"character":55,"h":14,"offset":0,"shift":6,"w":6,"x":62,"y":66,},
"56":{"character":56,"h":14,"offset":0,"shift":6,"w":6,"x":70,"y":66,},
"57":{"character":57,"h":14,"offset":0,"shift":6,"w":6,"x":108,"y":82,},
"58":{"character":58,"h":14,"offset":2,"shift":6,"w":3,"x":103,"y":82,},
"59":{"character":59,"h":14,"offset":2,"shift":6,"w":3,"x":98,"y":82,},
"60":{"character":60,"h":14,"offset":0,"shift":6,"w":6,"x":90,"y":82,},
"61":{"character":61,"h":14,"offset":1,"shift":6,"w":5,"x":83,"y":82,},
"62":{"character":62,"h":14,"offset":0,"shift":6,"w":6,"x":75,"y":82,},
"63":{"character":63,"h":14,"offset":0,"shift":6,"w":6,"x":67,"y":82,},
"64":{"character":64,"h":14,"offset":0,"shift":6,"w":7,"x":58,"y":82,},
"65":{"character":65,"h":14,"offset":0,"shift":6,"w":7,"x":49,"y":82,},
"66":{"character":66,"h":14,"offset":0,"shift":6,"w":6,"x":41,"y":82,},
"67":{"character":67,"h":14,"offset":0,"shift":6,"w":7,"x":32,"y":82,},
"68":{"character":68,"h":14,"offset":0,"shift":6,"w":6,"x":24,"y":82,},
"69":{"character":69,"h":14,"offset":1,"shift":6,"w":5,"x":17,"y":82,},
"70":{"character":70,"h":14,"offset":1,"shift":6,"w":5,"x":10,"y":82,},
"71":{"character":71,"h":14,"offset":0,"shift":6,"w":6,"x":2,"y":82,},
"72":{"character":72,"h":14,"offset":0,"shift":6,"w":6,"x":119,"y":66,},
"73":{"character":73,"h":14,"offset":0,"shift":6,"w":6,"x":111,"y":66,},
"74":{"character":74,"h":14,"offset":0,"shift":6,"w":6,"x":103,"y":66,},
"75":{"character":75,"h":14,"offset":0,"shift":6,"w":7,"x":94,"y":66,},
"76":{"character":76,"h":14,"offset":1,"shift":6,"w":5,"x":87,"y":66,},
"77":{"character":77,"h":14,"offset":0,"shift":6,"w":7,"x":78,"y":66,},
"78":{"character":78,"h":14,"offset":0,"shift":6,"w":6,"x":18,"y":50,},
"79":{"character":79,"h":14,"offset":0,"shift":6,"w":6,"x":10,"y":50,},
"80":{"character":80,"h":14,"offset":1,"shift":6,"w":6,"x":2,"y":50,},
"81":{"character":81,"h":14,"offset":0,"shift":6,"w":7,"x":60,"y":18,},
"82":{"character":82,"h":14,"offset":0,"shift":6,"w":7,"x":45,"y":18,},
"83":{"character":83,"h":14,"offset":0,"shift":6,"w":6,"x":37,"y":18,},
"84":{"character":84,"h":14,"offset":0,"shift":6,"w":7,"x":28,"y":18,},
"85":{"character":85,"h":14,"offset":0,"shift":6,"w":6,"x":20,"y":18,},
"86":{"character":86,"h":14,"offset":0,"shift":6,"w":7,"x":11,"y":18,},
"87":{"character":87,"h":14,"offset":0,"shift":6,"w":7,"x":2,"y":18,},
"88":{"character":88,"h":14,"offset":0,"shift":6,"w":7,"x":112,"y":2,},
"89":{"character":89,"h":14,"offset":0,"shift":6,"w":7,"x":103,"y":2,},
"90":{"character":90,"h":14,"offset":0,"shift":6,"w":6,"x":95,"y":2,},
"91":{"character":91,"h":14,"offset":1,"shift":6,"w":4,"x":54,"y":18,},
"92":{"character":92,"h":14,"offset":0,"shift":6,"w":6,"x":87,"y":2,},
"93":{"character":93,"h":14,"offset":1,"shift":6,"w":4,"x":72,"y":2,},
"94":{"character":94,"h":14,"offset":0,"shift":6,"w":6,"x":64,"y":2,},
"95":{"character":95,"h":14,"offset":0,"shift":6,"w":6,"x":56,"y":2,},
"96":{"character":96,"h":14,"offset":1,"shift":6,"w":4,"x":50,"y":2,},
"97":{"character":97,"h":14,"offset":0,"shift":6,"w":6,"x":42,"y":2,},
"98":{"character":98,"h":14,"offset":0,"shift":6,"w":6,"x":34,"y":2,},
"99":{"character":99,"h":14,"offset":0,"shift":6,"w":6,"x":26,"y":2,},
"100":{"character":100,"h":14,"offset":0,"shift":6,"w":6,"x":18,"y":2,},
"101":{"character":101,"h":14,"offset":0,"shift":6,"w":6,"x":10,"y":2,},
"102":{"character":102,"h":14,"offset":0,"shift":6,"w":7,"x":78,"y":2,},
"103":{"character":103,"h":14,"offset":0,"shift":6,"w":7,"x":69,"y":18,},
"104":{"character":104,"h":14,"offset":0,"shift":6,"w":6,"x":27,"y":34,},
"105":{"character":105,"h":14,"offset":1,"shift":6,"w":5,"x":78,"y":18,},
"106":{"character":106,"h":14,"offset":0,"shift":6,"w":5,"x":107,"y":34,},
"107":{"character":107,"h":14,"offset":0,"shift":6,"w":7,"x":98,"y":34,},
"108":{"character":108,"h":14,"offset":0,"shift":6,"w":6,"x":90,"y":34,},
"109":{"character":109,"h":14,"offset":0,"shift":6,"w":6,"x":82,"y":34,},
"110":{"character":110,"h":14,"offset":0,"shift":6,"w":6,"x":74,"y":34,},
"111":{"character":111,"h":14,"offset":0,"shift":6,"w":6,"x":66,"y":34,},
"112":{"character":112,"h":14,"offset":0,"shift":6,"w":6,"x":58,"y":34,},
"113":{"character":113,"h":14,"offset":0,"shift":6,"w":6,"x":50,"y":34,},
"114":{"character":114,"h":14,"offset":1,"shift":6,"w":5,"x":43,"y":34,},
"115":{"character":115,"h":14,"offset":0,"shift":6,"w":6,"x":114,"y":34,},
"116":{"character":116,"h":14,"offset":0,"shift":6,"w":6,"x":35,"y":34,},
"117":{"character":117,"h":14,"offset":0,"shift":6,"w":6,"x":19,"y":34,},
"118":{"character":118,"h":14,"offset":0,"shift":6,"w":6,"x":11,"y":34,},
"119":{"character":119,"h":14,"offset":0,"shift":6,"w":7,"x":2,"y":34,},
"120":{"character":120,"h":14,"offset":0,"shift":6,"w":6,"x":118,"y":18,},
"121":{"character":121,"h":14,"offset":0,"shift":6,"w":6,"x":110,"y":18,},
"122":{"character":122,"h":14,"offset":0,"shift":6,"w":6,"x":102,"y":18,},
"123":{"character":123,"h":14,"offset":1,"shift":6,"w":4,"x":96,"y":18,},
"124":{"character":124,"h":14,"offset":2,"shift":6,"w":2,"x":92,"y":18,},
"125":{"character":125,"h":14,"offset":1,"shift":6,"w":5,"x":85,"y":18,},
"126":{"character":126,"h":14,"offset":0,"shift":6,"w":7,"x":116,"y":82,},
"9647":{"character":9647,"h":14,"offset":1,"shift":6,"w":4,"x":2,"y":98,},
},
"hinting":0,
"includeTTF":false,
"interpreter":0,
"italic":false,
"kerningPairs":[],
"last":0,
"lineHeight":14,
"maintainGms1Font":false,
"name":"_f_code_s",
"parent":{
"name":"font",
"path":"folders/font.yy",
},
"pointRounding":2,
"ranges":[
{"lower":32,"upper":127,},
{"lower":9647,"upper":9647,},
],
"regenerateBitmap":false,
"resourceType":"GMFont",
"resourceVersion":"2.0",
"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,
"size":8.0,
"styleName":"Light",
"textureGroupId":{
"name":"Default",
"path":"texturegroups/Default",
},
"TTFName":"",
"usesSDF":false,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

View file

@ -0,0 +1,143 @@
{
"$GMFont":"",
"%Name":"_f_code_s",
"AntiAlias":1,
"applyKerning":0,
"ascender":12,
"ascenderOffset":0,
"bold":false,
"canGenerateBitmap":true,
"charset":0,
"first":0,
"fontName":"Fira Code Medium",
"glyphOperations":0,
"glyphs":{
"32":{"character":32,"h":16,"offset":0,"shift":7,"w":7,"x":2,"y":2,},
"33":{"character":33,"h":16,"offset":2,"shift":7,"w":3,"x":65,"y":38,},
"34":{"character":34,"h":16,"offset":1,"shift":7,"w":5,"x":58,"y":38,},
"35":{"character":35,"h":16,"offset":0,"shift":7,"w":7,"x":49,"y":38,},
"36":{"character":36,"h":16,"offset":0,"shift":7,"w":7,"x":40,"y":38,},
"37":{"character":37,"h":16,"offset":0,"shift":7,"w":8,"x":30,"y":38,},
"38":{"character":38,"h":16,"offset":0,"shift":7,"w":7,"x":21,"y":38,},
"39":{"character":39,"h":16,"offset":2,"shift":7,"w":3,"x":16,"y":38,},
"40":{"character":40,"h":16,"offset":1,"shift":7,"w":5,"x":9,"y":38,},
"41":{"character":41,"h":16,"offset":1,"shift":7,"w":5,"x":2,"y":38,},
"42":{"character":42,"h":16,"offset":0,"shift":7,"w":7,"x":70,"y":38,},
"43":{"character":43,"h":16,"offset":0,"shift":7,"w":7,"x":246,"y":20,},
"44":{"character":44,"h":16,"offset":2,"shift":7,"w":3,"x":232,"y":20,},
"45":{"character":45,"h":16,"offset":1,"shift":7,"w":6,"x":224,"y":20,},
"46":{"character":46,"h":16,"offset":2,"shift":7,"w":3,"x":219,"y":20,},
"47":{"character":47,"h":16,"offset":0,"shift":7,"w":7,"x":210,"y":20,},
"48":{"character":48,"h":16,"offset":0,"shift":7,"w":7,"x":201,"y":20,},
"49":{"character":49,"h":16,"offset":0,"shift":7,"w":7,"x":192,"y":20,},
"50":{"character":50,"h":16,"offset":0,"shift":7,"w":7,"x":183,"y":20,},
"51":{"character":51,"h":16,"offset":0,"shift":7,"w":7,"x":174,"y":20,},
"52":{"character":52,"h":16,"offset":0,"shift":7,"w":7,"x":165,"y":20,},
"53":{"character":53,"h":16,"offset":0,"shift":7,"w":7,"x":237,"y":20,},
"54":{"character":54,"h":16,"offset":0,"shift":7,"w":7,"x":79,"y":38,},
"55":{"character":55,"h":16,"offset":1,"shift":7,"w":6,"x":88,"y":38,},
"56":{"character":56,"h":16,"offset":0,"shift":7,"w":7,"x":96,"y":38,},
"57":{"character":57,"h":16,"offset":0,"shift":7,"w":7,"x":21,"y":56,},
"58":{"character":58,"h":16,"offset":2,"shift":7,"w":3,"x":16,"y":56,},
"59":{"character":59,"h":16,"offset":2,"shift":7,"w":3,"x":11,"y":56,},
"60":{"character":60,"h":16,"offset":0,"shift":7,"w":7,"x":2,"y":56,},
"61":{"character":61,"h":16,"offset":1,"shift":7,"w":6,"x":247,"y":38,},
"62":{"character":62,"h":16,"offset":0,"shift":7,"w":7,"x":238,"y":38,},
"63":{"character":63,"h":16,"offset":0,"shift":7,"w":7,"x":229,"y":38,},
"64":{"character":64,"h":16,"offset":0,"shift":7,"w":8,"x":219,"y":38,},
"65":{"character":65,"h":16,"offset":0,"shift":7,"w":8,"x":209,"y":38,},
"66":{"character":66,"h":16,"offset":0,"shift":7,"w":7,"x":200,"y":38,},
"67":{"character":67,"h":16,"offset":0,"shift":7,"w":7,"x":191,"y":38,},
"68":{"character":68,"h":16,"offset":0,"shift":7,"w":7,"x":182,"y":38,},
"69":{"character":69,"h":16,"offset":1,"shift":7,"w":6,"x":174,"y":38,},
"70":{"character":70,"h":16,"offset":1,"shift":7,"w":6,"x":166,"y":38,},
"71":{"character":71,"h":16,"offset":0,"shift":7,"w":7,"x":157,"y":38,},
"72":{"character":72,"h":16,"offset":0,"shift":7,"w":7,"x":148,"y":38,},
"73":{"character":73,"h":16,"offset":1,"shift":7,"w":6,"x":140,"y":38,},
"74":{"character":74,"h":16,"offset":0,"shift":7,"w":7,"x":131,"y":38,},
"75":{"character":75,"h":16,"offset":1,"shift":7,"w":7,"x":122,"y":38,},
"76":{"character":76,"h":16,"offset":1,"shift":7,"w":6,"x":114,"y":38,},
"77":{"character":77,"h":16,"offset":0,"shift":7,"w":7,"x":105,"y":38,},
"78":{"character":78,"h":16,"offset":0,"shift":7,"w":7,"x":156,"y":20,},
"79":{"character":79,"h":16,"offset":0,"shift":7,"w":7,"x":147,"y":20,},
"80":{"character":80,"h":16,"offset":1,"shift":7,"w":6,"x":139,"y":20,},
"81":{"character":81,"h":16,"offset":0,"shift":7,"w":8,"x":192,"y":2,},
"82":{"character":82,"h":16,"offset":1,"shift":7,"w":7,"x":177,"y":2,},
"83":{"character":83,"h":16,"offset":0,"shift":7,"w":7,"x":168,"y":2,},
"84":{"character":84,"h":16,"offset":0,"shift":7,"w":7,"x":159,"y":2,},
"85":{"character":85,"h":16,"offset":0,"shift":7,"w":7,"x":150,"y":2,},
"86":{"character":86,"h":16,"offset":0,"shift":7,"w":8,"x":140,"y":2,},
"87":{"character":87,"h":16,"offset":0,"shift":7,"w":8,"x":130,"y":2,},
"88":{"character":88,"h":16,"offset":0,"shift":7,"w":7,"x":121,"y":2,},
"89":{"character":89,"h":16,"offset":0,"shift":7,"w":8,"x":111,"y":2,},
"90":{"character":90,"h":16,"offset":0,"shift":7,"w":7,"x":102,"y":2,},
"91":{"character":91,"h":16,"offset":2,"shift":7,"w":4,"x":186,"y":2,},
"92":{"character":92,"h":16,"offset":0,"shift":7,"w":7,"x":93,"y":2,},
"93":{"character":93,"h":16,"offset":1,"shift":7,"w":5,"x":78,"y":2,},
"94":{"character":94,"h":16,"offset":0,"shift":7,"w":7,"x":69,"y":2,},
"95":{"character":95,"h":16,"offset":0,"shift":7,"w":7,"x":60,"y":2,},
"96":{"character":96,"h":16,"offset":2,"shift":7,"w":4,"x":54,"y":2,},
"97":{"character":97,"h":16,"offset":0,"shift":7,"w":7,"x":45,"y":2,},
"98":{"character":98,"h":16,"offset":1,"shift":7,"w":6,"x":37,"y":2,},
"99":{"character":99,"h":16,"offset":1,"shift":7,"w":6,"x":29,"y":2,},
"100":{"character":100,"h":16,"offset":0,"shift":7,"w":7,"x":20,"y":2,},
"101":{"character":101,"h":16,"offset":0,"shift":7,"w":7,"x":11,"y":2,},
"102":{"character":102,"h":16,"offset":1,"shift":7,"w":6,"x":85,"y":2,},
"103":{"character":103,"h":16,"offset":0,"shift":7,"w":7,"x":202,"y":2,},
"104":{"character":104,"h":16,"offset":1,"shift":7,"w":6,"x":38,"y":20,},
"105":{"character":105,"h":16,"offset":1,"shift":7,"w":6,"x":211,"y":2,},
"106":{"character":106,"h":16,"offset":1,"shift":7,"w":5,"x":123,"y":20,},
"107":{"character":107,"h":16,"offset":1,"shift":7,"w":6,"x":115,"y":20,},
"108":{"character":108,"h":16,"offset":0,"shift":7,"w":7,"x":106,"y":20,},
"109":{"character":109,"h":16,"offset":0,"shift":7,"w":7,"x":97,"y":20,},
"110":{"character":110,"h":16,"offset":1,"shift":7,"w":6,"x":89,"y":20,},
"111":{"character":111,"h":16,"offset":0,"shift":7,"w":7,"x":80,"y":20,},
"112":{"character":112,"h":16,"offset":1,"shift":7,"w":6,"x":72,"y":20,},
"113":{"character":113,"h":16,"offset":0,"shift":7,"w":7,"x":63,"y":20,},
"114":{"character":114,"h":16,"offset":1,"shift":7,"w":6,"x":55,"y":20,},
"115":{"character":115,"h":16,"offset":0,"shift":7,"w":7,"x":130,"y":20,},
"116":{"character":116,"h":16,"offset":0,"shift":7,"w":7,"x":46,"y":20,},
"117":{"character":117,"h":16,"offset":1,"shift":7,"w":6,"x":30,"y":20,},
"118":{"character":118,"h":16,"offset":0,"shift":7,"w":7,"x":21,"y":20,},
"119":{"character":119,"h":16,"offset":0,"shift":7,"w":8,"x":11,"y":20,},
"120":{"character":120,"h":16,"offset":0,"shift":7,"w":7,"x":2,"y":20,},
"121":{"character":121,"h":16,"offset":0,"shift":7,"w":7,"x":246,"y":2,},
"122":{"character":122,"h":16,"offset":1,"shift":7,"w":6,"x":238,"y":2,},
"123":{"character":123,"h":16,"offset":1,"shift":7,"w":5,"x":231,"y":2,},
"124":{"character":124,"h":16,"offset":2,"shift":7,"w":3,"x":226,"y":2,},
"125":{"character":125,"h":16,"offset":1,"shift":7,"w":5,"x":219,"y":2,},
"126":{"character":126,"h":16,"offset":0,"shift":7,"w":7,"x":30,"y":56,},
"9647":{"character":9647,"h":16,"offset":1,"shift":7,"w":5,"x":39,"y":56,},
},
"hinting":0,
"includeTTF":false,
"interpreter":0,
"italic":false,
"kerningPairs":[],
"last":0,
"lineHeight":16,
"maintainGms1Font":false,
"name":"_f_code_s",
"parent":{
"name":"font",
"path":"folders/font.yy",
},
"pointRounding":2,
"ranges":[
{"lower":32,"upper":127,},
{"lower":9647,"upper":9647,},
],
"regenerateBitmap":false,
"resourceType":"GMFont",
"resourceVersion":"2.0",
"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,
"size":9.0,
"styleName":"Light",
"textureGroupId":{
"name":"Default",
"path":"texturegroups/Default",
},
"TTFName":"",
"usesSDF":false,
}

View file

@ -19,7 +19,7 @@
dialog_y = 0; dialog_y = 0;
title_height = 64; title_height = 64;
padding = 24; padding = 20;
children = []; children = [];
parent = noone; parent = noone;
@ -172,7 +172,7 @@
} }
function onFocusBegin() {} function onFocusBegin() {}
function onFocusEnd() {} function onFocusEnd() {}
function resetPosition() { function resetPosition() {
if(!active) return; if(!active) return;

View file

@ -148,7 +148,7 @@ 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( ds_list_add(pref_global, new __Panel_Linear_Setting_Item_Preference(
__txtx("pref_auto_save_time", "Autosave delay (-1 to disable)"), __txtx("pref_auto_save_time", "Autosave delay (-1 to disable)"),
"auto_save_time", "auto_save_time",
new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ { PREFERENCES.auto_save_time = val; PREF_SAVE(); }) new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ { PREFERENCES.auto_save_time = val; PREF_SAVE(); })

View file

@ -9,12 +9,26 @@ event_inherited();
destroy_on_click_out = true; destroy_on_click_out = true;
anchor = ANCHOR.left | ANCHOR.top; anchor = ANCHOR.left | ANCHOR.top;
adding = false;
add_txt = "";
tb_add = new textBox(TEXTBOX_INPUT.text, function(txt) /*=>*/ { add_txt = txt; newPresetFromNode(txt); adding = false; });
#endregion #endregion
#region content #region content
sc_presets = new scrollPane(dialog_w - ui(padding + padding), dialog_h - ui(title_height + padding), function(_y, _m) { sc_presets = new scrollPane(dialog_w - ui(padding + padding), dialog_h - ui(title_height + padding), function(_y, _m) {
draw_clear_alpha(COLORS.panel_bg_clear, 0); draw_clear_alpha(COLORS.panel_bg_clear, 0);
if(node == noone) return 0;
var _h = 0;
if(node == noone) return _h;
if(adding) {
tb_add.setFocusHover(sc_presets.active, sc_presets.hover);
var _wh = tb_add.draw(0, _y, sc_presets.surface_w, TEXTBOX_HEIGHT, add_txt);
_h += _wh + ui(4);
_y += _wh + ui(4);
}
var folder = instanceof(node); var folder = instanceof(node);
if(!ds_map_exists(global.PRESETS_MAP, folder)) return 0; if(!ds_map_exists(global.PRESETS_MAP, folder)) return 0;
@ -22,14 +36,15 @@ event_inherited();
var pres = global.PRESETS_MAP[? folder]; var pres = global.PRESETS_MAP[? folder];
var amo = array_length(pres); var amo = array_length(pres);
var hh = line_get_height() + ui(8); var hh = line_get_height() + ui(8);
var _h = amo * (hh + ui(4)) + ui(32); _h += amo * (hh + ui(4)) + ui(32);
for( var i = 0; i < amo; i++ ) { for( var i = 0; i < amo; i++ ) {
var preset = pres[i]; var preset = pres[i];
var _yy = _y + (hh + ui(4)) * i; var _yy = _y + (hh + ui(4)) * i;
if(sHOVER && sc_presets.hover && point_in_rectangle(_m[0], _m[1], 0, _yy, sc_presets.w, _yy + hh)) { if(sHOVER && sc_presets.hover && point_in_rectangle(_m[0], _m[1], 0, _yy, sc_presets.w, _yy + hh)) {
draw_sprite_stretched(THEME.node_bg, 0, 0, _yy, sc_presets.w - ui(12), hh); draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _yy, sc_presets.w - ui(12), hh, COLORS._main_icon, 0.85);
if(mouse_click(mb_left, sFOCUS)) { if(mouse_click(mb_left, sFOCUS)) {
node.deserialize(preset.content, true, true); node.deserialize(preset.content, true, true);
instance_destroy(); instance_destroy();
@ -47,11 +62,11 @@ event_inherited();
} }
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text); draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text);
draw_text(ui(8), _yy + hh / 2, preset.name); draw_text_add(ui(8), _yy + hh / 2, preset.name);
} }
return _h; return _h;
}) });
#endregion #endregion
#region new preset #region new preset

View file

@ -24,7 +24,7 @@ if !ready exit;
var by = dialog_y + ui(16); var by = dialog_y + ui(16);
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), mouse_ui, sFOCUS, sHOVER, __txtx("preset_new", "New preset"), THEME.add, 1) == 2) { if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), mouse_ui, sFOCUS, sHOVER, __txtx("preset_new", "New preset"), THEME.add, 1) == 2) {
var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8)); adding = !adding;
dia.onModify = newPresetFromNode; if(adding) tb_add.activate();
} }
#endregion #endregion

View file

@ -2,8 +2,8 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_preset", "%Name":"o_dialog_preset",
"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":64,"eventType":8,"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":"o_dialog_preset", "name":"o_dialog_preset",

View file

@ -1,4 +1,4 @@
function dialogCall(_dia, _x = noone, _y = noone, param = {}, create = false) { #region function dialogCall(_dia, _x = noone, _y = noone, param = {}, create = false) {
if(_x == noone) _x = WIN_SW / 2; if(_x == noone) _x = WIN_SW / 2;
if(_y == noone) _y = WIN_SH / 2; if(_y == noone) _y = WIN_SH / 2;
@ -16,9 +16,9 @@ function dialogCall(_dia, _x = noone, _y = noone, param = {}, create = false) {
setFocus(dia.id, "Dialog"); setFocus(dia.id, "Dialog");
return dia; return dia;
} #endregion }
function dialogPanelCall(_panel, _x = noone, _y = noone, params = {}) { #region function dialogPanelCall(_panel, _x = noone, _y = noone, params = {}) {
if(_x == noone) _x = WIN_SW / 2; if(_x == noone) _x = WIN_SW / 2;
if(_y == noone) _y = WIN_SH / 2; if(_y == noone) _y = WIN_SH / 2;
@ -30,14 +30,15 @@ function dialogPanelCall(_panel, _x = noone, _y = noone, params = {}) { #region
dia.y = _y; dia.y = _y;
dia.xstart = _x; dia.xstart = _x;
dia.ystart = _y; dia.ystart = _y;
dia.anchor = _panel.anchor;
dia.resetPosition(); dia.resetPosition();
if(struct_try_get(params, "focus", true)) if(struct_try_get(params, "focus", true))
setFocus(dia.id, "Dialog"); setFocus(dia.id, "Dialog");
return dia; return dia;
} #endregion }
function colorSelectorCall(defColor, onApply) { #region function colorSelectorCall(defColor, onApply) {
var dialog = dialogCall(o_dialog_color_selector); var dialog = dialogCall(o_dialog_color_selector);
dialog.setDefault(defColor); dialog.setDefault(defColor);
@ -45,4 +46,4 @@ function colorSelectorCall(defColor, onApply) { #region
dialog.onApply = onApply; dialog.onApply = onApply;
return dialog; return dialog;
} #endregion }

View file

@ -91,11 +91,11 @@ void main(in VertexShaderOutput _input, out PixelShaderOutput output) {
fs_preString = _fs_preString; fs_preString = _fs_preString;
fs_postString = "}"; fs_postString = "}";
preLabel = new Inspector_Label(fs_preString); preLabel = new Inspector_Label(fs_preString, _f_code_s);
input_display_list = [ 2, input_display_list = [ 2,
["Vertex Shader [read only]", true], new Inspector_Label(vs_string), ["Vertex Shader [read only]", true], new Inspector_Label(vs_string, _f_code_s),
["Shader", false], preLabel, 1, new Inspector_Label(fs_postString), ["Shader", false], preLabel, 1, new Inspector_Label(fs_postString, _f_code_s),
["Arguments", false], argument_renderer, ["Arguments", false], argument_renderer,
["Values", true], ["Values", true],
]; ];
@ -241,7 +241,7 @@ void main(in VertexShaderOutput _input, out PixelShaderOutput output) {
var vs = vs_string; var vs = vs_string;
file_text_write_all(_dir + "vout.shader", vs); file_text_write_all(_dir + "vout.shader", vs);
var fs_param = "cbuffer Data : register(b10) {"; var fs_param = "cbuffer Data : register(b10) {\n";
var fs_sample = ""; var fs_sample = "";
var sampler_slot = 1; var sampler_slot = 1;
@ -252,20 +252,20 @@ void main(in VertexShaderOutput _input, out PixelShaderOutput output) {
var _arg_type = getInputData(i + 1); var _arg_type = getInputData(i + 1);
switch(_arg_type) { switch(_arg_type) {
case 0 : fs_param += $"float {_arg_name};\n"; break; // u_float case 0 : fs_param += $" float {_arg_name};\n"; break; // u_float
case 1 : fs_param += $"int {_arg_name};\n"; break; // u_int case 1 : fs_param += $" int {_arg_name};\n"; break; // u_int
case 2 : fs_param += $"float2 {_arg_name};\n"; break; // u_vec2 case 2 : fs_param += $" float2 {_arg_name};\n"; break; // u_vec2
case 3 : fs_param += $"float3 {_arg_name};\n"; break; // u_vec3 case 3 : fs_param += $" float3 {_arg_name};\n"; break; // u_vec3
case 4 : fs_param += $"float4 {_arg_name};\n"; break; // u_vec4 case 4 : fs_param += $" float4 {_arg_name};\n"; break; // u_vec4
case 5 : fs_param += $"float3x3 {_arg_name};\n"; break; // u_mat3 case 5 : fs_param += $" float3x3 {_arg_name};\n"; break; // u_mat3
case 6 : fs_param += $"float4x4 {_arg_name};\n"; break; // u_mat4 case 6 : fs_param += $" float4x4 {_arg_name};\n"; break; // u_mat4
case 7 : // u_sampler2D case 7 : // u_sampler2D
fs_sample += $"Texture2D {_arg_name}Object : register(t{sampler_slot});\n"; fs_sample += $"Texture2D {_arg_name}Object : register(t{sampler_slot});\n";
fs_sample += $"SamplerState {_arg_name} : register(s{sampler_slot});\n"; fs_sample += $"SamplerState {_arg_name} : register(s{sampler_slot});\n";
sampler_slot++; sampler_slot++;
break; break;
case 8 : fs_param += $"float4 {_arg_name};\n"; break; // u_vec4 case 8 : fs_param += $" float4 {_arg_name};\n"; break; // u_vec4 color
} }
} }
@ -333,44 +333,47 @@ void main(in VertexShaderOutput _input, out PixelShaderOutput output) {
var _uni = shader_get_uniform(shader.fs, _arg_name); var _uni = shader_get_uniform(shader.fs, _arg_name);
switch(_arg_type) { switch(_arg_type) {
case 1 : case 0 : // u_float
d3d11_cbuffer_add_int(1);
_cbSize++;
buffer_write(_buffer, buffer_s32, _arg_valu);
break;
case 0 :
d3d11_cbuffer_add_float(1); d3d11_cbuffer_add_float(1);
_cbSize++; _cbSize++;
buffer_write(_buffer, buffer_f32, _arg_valu); buffer_write(_buffer, buffer_f32, _arg_valu);
break; break;
case 2 : case 1 : // u_int
case 3 : d3d11_cbuffer_add_int(1);
case 4 : _cbSize++;
case 5 :
case 6 : buffer_write(_buffer, buffer_s32, _arg_valu);
break;
case 2 : // u_vec2
case 3 : // u_vec3
case 4 : // u_vec4
case 5 : // u_mat3
case 6 : // u_mat4
if(is_array(_arg_valu)) { if(is_array(_arg_valu)) {
d3d11_cbuffer_add_float(array_length(_arg_valu)); d3d11_cbuffer_add_float(array_length(_arg_valu));
_cbSize += array_length(_arg_valu); _cbSize += array_length(_arg_valu);
for( var j = 0, m = array_length(_arg_valu); j < m; j++ ) for( var j = 0, m = array_length(_arg_valu); j < m; j++ )
buffer_write(_buffer, buffer_f32, _arg_valu[j]); buffer_write(_buffer, buffer_f32, _arg_valu[j]);
} }
break; break;
case 8 :
var _clr = colToVec4(_arg_valu); case 7 : // u_sampler2D
d3d11_cbuffer_add_float(4);
_cbSize += 4;
for( var j = 0, m = 4; j < m; j++ )
buffer_write(_buffer, buffer_f32, _clr[i]);
break;
case 7 :
if(is_surface(_arg_valu)) if(is_surface(_arg_valu))
d3d11_texture_set_stage_ps(sampler_slot, surface_get_texture(_arg_valu)); d3d11_texture_set_stage_ps(sampler_slot, surface_get_texture(_arg_valu));
sampler_slot++; sampler_slot++;
break; break;
case 8 : // u_vec4 color
var _clr = colToVec4(_arg_valu);
d3d11_cbuffer_add_float(4);
_cbSize += 4;
for( var j = 0; j < 4; j++ )
buffer_write(_buffer, buffer_f32, _clr[j]);
break;
} }
} }

View file

@ -881,6 +881,7 @@ function PanelContent() constructor {
expandable = true; expandable = true;
resizable = true; resizable = true;
anchor = ANCHOR.none;
auto_pin = false; auto_pin = false;
panel = noone; panel = noone;

View file

@ -21,7 +21,7 @@
collection collection
} }
#macro PANEL_PADDING padding = in_dialog? ui(24) : ui(16); \ #macro PANEL_PADDING padding = in_dialog? ui(20) : ui(16); \
title_height = in_dialog? ui(64) : ui(56); title_height = in_dialog? ui(64) : ui(56);
#macro PANEL_TITLE draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text); \ #macro PANEL_TITLE draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text); \

View file

@ -1,10 +1,10 @@
function Panel_Globalvar() : PanelContent() constructor { function Panel_Globalvar() : PanelContent() constructor {
title = __txtx("panel_globalvar", "Global Variables"); title = __txtx("panel_globalvar", "Global Variables");
context_str = "Globalvar"; context_str = "Globalvar";
showHeader = false; showHeader = false;
title_height = 64; title_height = 64;
padding = 24; padding = 20;
w = ui(320); w = ui(320);
h = ui(480); h = ui(480);

View file

@ -2,7 +2,7 @@ function Panel_Gradient() : PanelContent() constructor {
title = __txt("Gradients"); title = __txt("Gradients");
showHeader = false; showHeader = false;
title_height = 64; title_height = 64;
padding = 24; padding = 20;
w = ui(320); w = ui(320);
h = ui(480); h = ui(480);

View file

@ -661,7 +661,7 @@ function Panel_Inspector() : PanelContent() constructor {
draw_set_text(jun_disp.font, fa_left, fa_top, COLORS._main_text_sub); draw_set_text(jun_disp.font, fa_left, fa_top, COLORS._main_text_sub);
var _sh = string_height_ext(_txt, -1, con_w - ui(16)) + ui(16); var _sh = string_height_ext(_txt, -1, con_w - ui(16)) + ui(16);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, 0, yy, con_w, _sh, COLORS._main_icon_light); draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, 0, yy, con_w, _sh, COLORS._main_icon_light);
draw_text_ext(ui(8), yy + ui(8), _txt, -1, con_w - ui(16)); draw_text_ext_add(ui(8), yy + ui(8), _txt, -1, con_w - ui(16));
hh += _sh + ui(8); hh += _sh + ui(8);
continue; continue;
@ -1001,7 +1001,7 @@ function Panel_Inspector() : PanelContent() constructor {
locked = !locked; locked = !locked;
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, __txt("Presets"), THEME.preset, 1) == 2) if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, __txt("Presets"), THEME.preset, 1) == 2)
dialogCall(o_dialog_preset, x + bx, y + by + ui(36), { "node": inspecting }); dialogPanelCall(new Panel_Presets(inspecting), x + bx, y + by + ui(36));
} else { } else {
draw_sprite_ui_uniform(THEME.preset, 1, bx + ui(32) / 2, by + ui(32) / 2, 1, COLORS._main_icon_dark); draw_sprite_ui_uniform(THEME.preset, 1, bx + ui(32) / 2, by + ui(32) / 2, 1, COLORS._main_icon_dark);
} }

View file

@ -7,7 +7,7 @@ function Panel_Nodes() : PanelContent() constructor {
h = ui(480); h = ui(480);
title_height = 64; title_height = 64;
padding = 24; padding = 20;
search_string = ""; search_string = "";

View file

@ -4,7 +4,7 @@ function Panel_Notification() : PanelContent() constructor {
h = ui(480); h = ui(480);
title_height = 64; title_height = 64;
padding = 24; padding = 20;
current_page = 0; current_page = 0;
filter = NOTI_TYPE.log | NOTI_TYPE.warning | NOTI_TYPE.error; filter = NOTI_TYPE.log | NOTI_TYPE.warning | NOTI_TYPE.error;

View file

@ -0,0 +1,129 @@
function Panel_Presets(_node) : PanelContent() constructor {
title = __txt("Presets");
padding = 8;
w = ui(240);
h = ui(400);
anchor = ANCHOR.left | ANCHOR.top;
node = _node;
adding = false;
add_txt = "";
tb_add = new textBox(TEXTBOX_INPUT.text, function(txt) /*=>*/ { add_txt = txt; newPresetFromNode(txt); adding = false; });
selecting_preset = noone;
context_menu_item_add = menuItem(__txt("New preset"), function() { if(!adding) tb_add.activate(); adding = true; });
context_menu_empty = [ context_menu_item_add ];
context_menu = [
context_menu_item_add,
menuItem(__txt("Delete"), function() { file_delete(selecting_preset.path); __initPresets(); }, THEME.cross),
];
function newPresetFromNode(name) {
if(node == noone) return;
var dir = $"{DIRECTORY}Presets/{instanceof(node)}/";
directory_verify(dir);
var pth = dir + name + ".json";
var map = node.serialize(true, true);
json_save_struct(pth, map);
__initPresets();
adding = false;
}
function onResize() {
sc_presets.resize(w - ui(padding + padding), h - ui(padding + padding));
}
sc_presets = new scrollPane(w - ui(padding + padding), h - ui(padding + padding), function(_y, _m) {
draw_clear_alpha(COLORS.panel_bg_clear, 0);
var _ww = sc_presets.surface_w;
var _h = 0;
if(node == noone) return _h;
if(adding) {
tb_add.setFocusHover(sc_presets.active, sc_presets.hover);
var _wh = tb_add.draw(0, _y, _ww, TEXTBOX_HEIGHT, add_txt);
_h += _wh + ui(4);
_y += _wh + ui(4);
} else {
var _add_h = ui(24);
var _hov = pHOVER && point_in_rectangle(_m[0], _m[1], 0, _y, _ww, _y + _add_h);
draw_sprite_stretched_ext(THEME.timeline_node, 0, 0, _y, _ww, _add_h, _hov? COLORS._main_value_positive : COLORS._main_icon, .3 + _hov * .1);
draw_sprite_stretched_ext(THEME.timeline_node, 1, 0, _y, _ww, _add_h, _hov? COLORS._main_value_positive : COLORS._main_icon, .6 + _hov * .25);
draw_set_text(f_p2, fa_center, fa_center, _hov? COLORS._main_value_positive : COLORS._main_icon);
draw_text_add(_ww / 2, _y + _add_h / 2, __txt("New preset"));
if(_hov && mouse_press(mb_left, pFOCUS)) {
if(!adding) tb_add.activate();
adding = true;
}
_h += _add_h + ui(4);
_y += _add_h + ui(4);
}
var folder = instanceof(node);
if(!ds_map_exists(global.PRESETS_MAP, folder)) return 0;
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
var _hov = false;
var pres = global.PRESETS_MAP[? folder];
var amo = array_length(pres);
var _hh = line_get_height() + ui(10);
_h += amo * (_hh + ui(4)) + ui(32);
for( var i = 0; i < amo; i++ ) {
var preset = pres[i];
var _yy = _y + (_hh + ui(3)) * i;
draw_sprite_stretched(THEME.ui_panel_bg, 3, 0, _yy, _ww, _hh);
if(pHOVER && sc_presets.hover && point_in_rectangle(_m[0], _m[1], 0, _yy, _ww, _yy + _hh)) {
draw_sprite_stretched_ext(THEME.node_active, 1, 0, _yy, _ww, _hh, COLORS._main_accent, 1);
_hov = true;
if(mouse_press(mb_left, pFOCUS)) {
node.deserialize(preset.content, true, true);
if(in_dialog && panel.destroy_on_click_out) close();
}
if(mouse_press(mb_right, pFOCUS)) {
selecting_preset = preset;
dia = menuCall("preset_window_menu",,, context_menu);
}
}
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
draw_text_add(ui(8), _yy + _hh / 2, preset.name);
}
if(pHOVER && !_hov && mouse_press(mb_right)) dia = menuCall("preset_window_menu",,, context_menu_empty);
return _h;
});
function drawContent(panel) {
draw_clear_alpha(COLORS.panel_bg_clear, 0);
var px = ui(padding);
var py = ui(padding);
var pw = w - ui(padding + padding);
var ph = h - ui(padding + padding);
draw_sprite_stretched(THEME.ui_panel_bg, 1, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
sc_presets.setFocusHover(pFOCUS, pHOVER);
sc_presets.draw(px, py, mx - px, my - py);
}
}

View file

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

View file

@ -2,7 +2,7 @@ function Panel_Tunnels() : PanelContent() constructor {
title = __txt("Tunnels"); title = __txt("Tunnels");
showHeader = false; showHeader = false;
title_height = 64; title_height = 64;
padding = 24; padding = 20;
#region data #region data
w = ui(320); w = ui(320);

View file

@ -920,7 +920,7 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor
if(cursor_pos_y != 0 && cursor_pos_x != 0) { if(cursor_pos_y != 0 && cursor_pos_x != 0) {
draw_set_color(COLORS._main_text_accent); draw_set_color(COLORS._main_text_accent);
draw_set_alpha(typing || current_time % (PREFERENCES.caret_blink * 2000) > PREFERENCES.caret_blink * 1000); draw_set_alpha((typing || current_time % (PREFERENCES.caret_blink * 2000) > PREFERENCES.caret_blink * 1000) * 0.75 + 0.25);
draw_line_width(cursor_pos_x, cursor_pos_y, cursor_pos_x, cursor_pos_y + c_h, 2); draw_line_width(cursor_pos_x, cursor_pos_y, cursor_pos_x, cursor_pos_y + c_h, 2);
draw_set_alpha(1); draw_set_alpha(1);
} }

View file

@ -115,7 +115,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
cursor_select = 0; cursor_select = 0;
click_block = 1; click_block = 1;
KEYBOARD_STRING = ""; KEYBOARD_STRING = "";
keyboard_lastkey = -1; keyboard_lastkey = -1;
if(PEN_USE) keyboard_virtual_show(input == TEXTBOX_INPUT.number? kbv_type_numbers : kbv_type_default, kbv_returnkey_default, kbv_autocapitalize_none, true); if(PEN_USE) keyboard_virtual_show(input == TEXTBOX_INPUT.number? kbv_type_numbers : kbv_type_default, kbv_returnkey_default, kbv_autocapitalize_none, true);
@ -735,7 +735,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
BLEND_NORMAL BLEND_NORMAL
draw_set_color(COLORS._main_text_accent); draw_set_color(COLORS._main_text_accent);
draw_set_alpha(typing || current_time % (PREFERENCES.caret_blink * 2000) > PREFERENCES.caret_blink * 1000); draw_set_alpha((typing || current_time % (PREFERENCES.caret_blink * 2000) > PREFERENCES.caret_blink * 1000) * 0.75 + 0.25);
draw_line_width(cursor_pos, c_y0, cursor_pos, c_y1, 2); draw_line_width(cursor_pos, c_y0, cursor_pos, c_y1, 2);
draw_set_alpha(1); draw_set_alpha(1);