diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 095b33a6a..54d4e0acd 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -26,7 +26,8 @@ {"name":"dynamic_surface","order":8,"path":"folders/functions/surface/dynamic_surface.yy",}, {"name":"svg","order":47,"path":"folders/functions/svg.yy",}, {"name":"main","order":328,"path":"folders/main.yy",}, - {"name":"binder","order":2,"path":"folders/main/binder.yy",}, + {"name":"binder","order":3,"path":"folders/main/binder.yy",}, + {"name":"components","order":2,"path":"folders/main/components.yy",}, {"name":"misc","order":337,"path":"folders/misc.yy",}, {"name":"animation_curve","order":1,"path":"folders/misc/animation_curve.yy",}, {"name":"nodes","order":330,"path":"folders/nodes.yy",}, @@ -318,7 +319,6 @@ {"name":"o_dialog_textbox_function_guide","order":8,"path":"objects/o_dialog_textbox_function_guide/o_dialog_textbox_function_guide.yy",}, {"name":"o_dialog_value_editor","order":9,"path":"objects/o_dialog_value_editor/o_dialog_value_editor.yy",}, {"name":"o_dialog_warning","order":6,"path":"objects/o_dialog_warning/o_dialog_warning.yy",}, - {"name":"o_main","order":1,"path":"objects/o_main/o_main.yy",}, {"name":"o_pie_menu","order":14,"path":"objects/o_pie_menu/o_pie_menu.yy",}, {"name":"Obj_Debug_FallText_Firestore","order":6,"path":"objects/Obj_Debug_FallText_Firestore/Obj_Debug_FallText_Firestore.yy",}, {"name":"Obj_FirebaseFirestore_allCallbacks","order":7,"path":"objects/Obj_FirebaseFirestore_allCallbacks/Obj_FirebaseFirestore_allCallbacks.yy",}, @@ -351,6 +351,7 @@ {"name":"project_loader","order":4,"path":"objects/project_loader/project_loader.yy",}, {"name":"rotator_Rotator","order":3,"path":"objects/rotator_Rotator/rotator_Rotator.yy",}, {"name":"slider_Slider","order":1,"path":"objects/slider_Slider/slider_Slider.yy",}, + {"name":"rm_main","order":1,"path":"rooms/rm_main/rm_main.yy",}, {"name":"__3d_particle","order":1,"path":"scripts/__3d_particle/__3d_particle.yy",}, {"name":"__3D","order":6,"path":"scripts/__3D/__3D.yy",}, {"name":"__add_node_item","order":12,"path":"scripts/__add_node_item/__add_node_item.yy",}, @@ -360,9 +361,9 @@ {"name":"__bone_constrain_copy_rotation","order":3,"path":"scripts/__bone_constrain_copy_rotation/__bone_constrain_copy_rotation.yy",}, {"name":"__bone_constrain_copy_scale","order":4,"path":"scripts/__bone_constrain_copy_scale/__bone_constrain_copy_scale.yy",}, {"name":"__bone_constrain_limit_rotation","order":8,"path":"scripts/__bone_constrain_limit_rotation/__bone_constrain_limit_rotation.yy",}, - {"name":"__bone_constrain_move_to","order":6,"path":"scripts/__bone_constrain_move_to/__bone_constrain_move_to.yy",}, + {"name":"__bone_constrain_move_to","order":5,"path":"scripts/__bone_constrain_move_to/__bone_constrain_move_to.yy",}, {"name":"__bone_constrain_stretch_to","order":7,"path":"scripts/__bone_constrain_stretch_to/__bone_constrain_stretch_to.yy",}, - {"name":"__bone_constrain","order":2,"path":"scripts/__bone_constrain/__bone_constrain.yy",}, + {"name":"__bone_constrain","order":1,"path":"scripts/__bone_constrain/__bone_constrain.yy",}, {"name":"__canvas_brush","order":2,"path":"scripts/__canvas_brush/__canvas_brush.yy",}, {"name":"__canvas_tool_shader","order":4,"path":"scripts/__canvas_tool_shader/__canvas_tool_shader.yy",}, {"name":"__canvas_tool","order":1,"path":"scripts/__canvas_tool/__canvas_tool.yy",}, @@ -677,12 +678,12 @@ {"name":"node_application_out","order":17,"path":"scripts/node_application_out/node_application_out.yy",}, {"name":"node_area","order":15,"path":"scripts/node_area/node_area.yy",}, {"name":"node_argument","order":22,"path":"scripts/node_argument/node_argument.yy",}, - {"name":"node_armature_bind","order":11,"path":"scripts/node_armature_bind/node_armature_bind.yy",}, - {"name":"node_armature_mesh_rig","order":15,"path":"scripts/node_armature_mesh_rig/node_armature_mesh_rig.yy",}, - {"name":"node_armature_path","order":13,"path":"scripts/node_armature_path/node_armature_path.yy",}, - {"name":"node_armature_pose","order":12,"path":"scripts/node_armature_pose/node_armature_pose.yy",}, - {"name":"node_armature_sample","order":14,"path":"scripts/node_armature_sample/node_armature_sample.yy",}, - {"name":"node_armature","order":10,"path":"scripts/node_armature/node_armature.yy",}, + {"name":"node_armature_bind","order":10,"path":"scripts/node_armature_bind/node_armature_bind.yy",}, + {"name":"node_armature_mesh_rig","order":14,"path":"scripts/node_armature_mesh_rig/node_armature_mesh_rig.yy",}, + {"name":"node_armature_path","order":12,"path":"scripts/node_armature_path/node_armature_path.yy",}, + {"name":"node_armature_pose","order":11,"path":"scripts/node_armature_pose/node_armature_pose.yy",}, + {"name":"node_armature_sample","order":13,"path":"scripts/node_armature_sample/node_armature_sample.yy",}, + {"name":"node_armature","order":9,"path":"scripts/node_armature/node_armature.yy",}, {"name":"node_array_add","order":6,"path":"scripts/node_array_add/node_array_add.yy",}, {"name":"node_array_composite","order":17,"path":"scripts/node_array_composite/node_array_composite.yy",}, {"name":"node_array_convolute","order":16,"path":"scripts/node_array_convolute/node_array_convolute.yy",}, diff --git a/scripts/__bone_constain_look_at/__bone_constain_look_at.gml b/scripts/__bone_constain_look_at/__bone_constain_look_at.gml index e7890a345..f708e3abb 100644 --- a/scripts/__bone_constain_look_at/__bone_constain_look_at.gml +++ b/scripts/__bone_constain_look_at/__bone_constain_look_at.gml @@ -11,6 +11,7 @@ function __Bone_Constrain_Look_At(_bone, _bid = "", _tid = "") : __Bone_Constrai tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); }); tb_strength.font = f_p2; tb_strength.label = "Strength"; + tb_strength.boxColor = COLORS._main_icon_light; static init = function() { if(!is(bone, __Bone)) return; @@ -38,8 +39,8 @@ function __Bone_Constrain_Look_At(_bone, _bid = "", _tid = "") : __Bone_Constrai var _wdx = _x + ui(8); var _wdw = (_w - ui(16 + 4)) / 2; var _wdh = ui(24); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, COLORS._main_icon_light, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, COLORS._main_icon_light, 1); if(bone_object != noone) { var _bname = bone_object.name; @@ -64,13 +65,13 @@ function __Bone_Constrain_Look_At(_bone, _bid = "", _tid = "") : __Bone_Constrai if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }); } if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }); } _y += _wdh + ui(4); diff --git a/scripts/__bone_constrain_copy_position/__bone_constrain_copy_position.gml b/scripts/__bone_constrain_copy_position/__bone_constrain_copy_position.gml index 6aaddc781..bad63b7d2 100644 --- a/scripts/__bone_constrain_copy_position/__bone_constrain_copy_position.gml +++ b/scripts/__bone_constrain_copy_position/__bone_constrain_copy_position.gml @@ -11,6 +11,7 @@ function __Bone_Constrain_Copy_Position(_bone, _bid = "", _tid = "") : __Bone_Co tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); }); tb_strength.font = f_p2; tb_strength.label = "Strength"; + tb_strength.boxColor = COLORS._main_icon_light; static init = function() { if(!is(bone, __Bone)) return; @@ -44,8 +45,8 @@ function __Bone_Constrain_Copy_Position(_bone, _bid = "", _tid = "") : __Bone_Co var _wdx = _x + ui(8); var _wdw = (_w - ui(16 + 4)) / 2; var _wdh = ui(24); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, COLORS._main_icon_light, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, COLORS._main_icon_light, 1); if(bone_object != noone) { var _bname = bone_object.name; @@ -70,13 +71,13 @@ function __Bone_Constrain_Copy_Position(_bone, _bid = "", _tid = "") : __Bone_Co if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }); } if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }); } _y += _wdh + ui(4); diff --git a/scripts/__bone_constrain_copy_rotation/__bone_constrain_copy_rotation.gml b/scripts/__bone_constrain_copy_rotation/__bone_constrain_copy_rotation.gml index 83916e254..eb5c8a695 100644 --- a/scripts/__bone_constrain_copy_rotation/__bone_constrain_copy_rotation.gml +++ b/scripts/__bone_constrain_copy_rotation/__bone_constrain_copy_rotation.gml @@ -11,6 +11,7 @@ function __Bone_Constrain_Copy_Rotation(_bone, _bid = "", _tid = "") : __Bone_Co tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); }); tb_strength.font = f_p2; tb_strength.label = "Strength"; + tb_strength.boxColor = COLORS._main_icon_light; static init = function() { if(!is(bone, __Bone)) return; @@ -34,8 +35,8 @@ function __Bone_Constrain_Copy_Rotation(_bone, _bid = "", _tid = "") : __Bone_Co var _wdx = _x + ui(8); var _wdw = (_w - ui(16 + 4)) / 2; var _wdh = ui(24); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, COLORS._main_icon_light, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, COLORS._main_icon_light, 1); if(bone_object != noone) { var _bname = bone_object.name; @@ -60,13 +61,13 @@ function __Bone_Constrain_Copy_Rotation(_bone, _bid = "", _tid = "") : __Bone_Co if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }); } if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }); } _y += _wdh + ui(4); diff --git a/scripts/__bone_constrain_copy_scale/__bone_constrain_copy_scale.gml b/scripts/__bone_constrain_copy_scale/__bone_constrain_copy_scale.gml index 984a6e81d..dccc0008c 100644 --- a/scripts/__bone_constrain_copy_scale/__bone_constrain_copy_scale.gml +++ b/scripts/__bone_constrain_copy_scale/__bone_constrain_copy_scale.gml @@ -11,6 +11,7 @@ function __Bone_Constrain_Copy_Scale(_bone, _bid = "", _tid = "") : __Bone_Const tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); }); tb_strength.font = f_p2; tb_strength.label = "Strength"; + tb_strength.boxColor = COLORS._main_icon_light; static init = function() { if(!is(bone, __Bone)) return; @@ -34,8 +35,8 @@ function __Bone_Constrain_Copy_Scale(_bone, _bid = "", _tid = "") : __Bone_Const var _wdx = _x + ui(8); var _wdw = (_w - ui(16 + 4)) / 2; var _wdh = ui(24); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, COLORS._main_icon_light, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, COLORS._main_icon_light, 1); if(bone_object != noone) { var _bname = bone_object.name; @@ -60,13 +61,13 @@ function __Bone_Constrain_Copy_Scale(_bone, _bid = "", _tid = "") : __Bone_Const if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }); } if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }); } _y += _wdh + ui(4); diff --git a/scripts/__bone_constrain_limit_rotation/__bone_constrain_limit_rotation.gml b/scripts/__bone_constrain_limit_rotation/__bone_constrain_limit_rotation.gml index 11ed967e9..8f789a708 100644 --- a/scripts/__bone_constrain_limit_rotation/__bone_constrain_limit_rotation.gml +++ b/scripts/__bone_constrain_limit_rotation/__bone_constrain_limit_rotation.gml @@ -5,10 +5,13 @@ function __Bone_Constrain_Limit_Rotation(_bone, _bid = "") : __Bone_Constrain(_b limit_min = 0; limit_max = 0; + bone_object = noone; + tb_limit = new vectorBox(2, function(v, i) /*=>*/ { if(i == 0) limit_min = v; else if(i == 1) limit_max = v; node.triggerRender(); }); - tb_limit.axis = ["min", "max"]; + tb_limit.axis = ["ccw", "cw"]; tb_limit.tb[0].font = f_p2; tb_limit.tb[1].font = f_p2; + tb_limit.boxColor = COLORS._main_icon_light; static init = function() { if(!is(bone, __Bone)) return; @@ -30,7 +33,7 @@ function __Bone_Constrain_Limit_Rotation(_bone, _bid = "") : __Bone_Constrain(_b var _wdx = _x + ui(8); var _wdw = _w - ui(16); var _wdh = ui(24); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, COLORS._main_icon_light, 1); if(bone_object != noone) { var _bname = bone_object.name; @@ -45,7 +48,7 @@ function __Bone_Constrain_Limit_Rotation(_bone, _bid = "") : __Bone_Constrain(_b if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }) } _y += _wdh + ui(4); @@ -59,7 +62,7 @@ function __Bone_Constrain_Limit_Rotation(_bone, _bid = "") : __Bone_Constrain(_b tb_limit.rx = _drawParam.rx; tb_limit.ry = _drawParam.ry; tb_limit.setFocusHover(_focus, _hover); - tb_limit.draw(_wdx, _y, _wdw, _wdh, [ limit_min, limit_max ], _m); + tb_limit.draw(_wdx, _y, _wdw, _wdh, [ limit_min, limit_max ], {}, _m); _y += _wdh + ui(8); wh += _wdh + ui(8); diff --git a/scripts/__bone_constrain_move_to/__bone_constrain_move_to.gml b/scripts/__bone_constrain_move_to/__bone_constrain_move_to.gml index d308d3f16..87dd1a15c 100644 --- a/scripts/__bone_constrain_move_to/__bone_constrain_move_to.gml +++ b/scripts/__bone_constrain_move_to/__bone_constrain_move_to.gml @@ -11,6 +11,7 @@ function __Bone_Constrain_Move_To(_bone, _bid = "", _tid = "") : __Bone_Constrai tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); }); tb_strength.font = f_p2; tb_strength.label = "Strength"; + tb_strength.boxColor = COLORS._main_icon_light; static init = function() { if(!is(bone, __Bone)) return; @@ -44,8 +45,8 @@ function __Bone_Constrain_Move_To(_bone, _bid = "", _tid = "") : __Bone_Constrai var _wdx = _x + ui(8); var _wdw = (_w - ui(16 + 4)) / 2; var _wdh = ui(24); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, COLORS._main_icon_light, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, COLORS._main_icon_light, 1); if(bone_object != noone) { var _bname = bone_object.name; @@ -70,13 +71,13 @@ function __Bone_Constrain_Move_To(_bone, _bid = "", _tid = "") : __Bone_Constrai if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }); } if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }); } _y += _wdh + ui(4); diff --git a/scripts/__bone_constrain_stretch_to/__bone_constrain_stretch_to.gml b/scripts/__bone_constrain_stretch_to/__bone_constrain_stretch_to.gml index 197695805..ac00fc345 100644 --- a/scripts/__bone_constrain_stretch_to/__bone_constrain_stretch_to.gml +++ b/scripts/__bone_constrain_stretch_to/__bone_constrain_stretch_to.gml @@ -11,6 +11,7 @@ function __Bone_Constrain_Stretch_To(_bone, _bid = "", _tid = "") : __Bone_Const tb_strength = new textBox(TEXTBOX_INPUT.number, function(v) /*=>*/ { strength = clamp(v, 0, 1); node.triggerRender(); }); tb_strength.font = f_p2; tb_strength.label = "Strength"; + tb_strength.boxColor = COLORS._main_icon_light; static init = function() { if(!is(bone, __Bone)) return; @@ -38,8 +39,8 @@ function __Bone_Constrain_Stretch_To(_bone, _bid = "", _tid = "") : __Bone_Const var _wdx = _x + ui(8); var _wdw = (_w - ui(16 + 4)) / 2; var _wdh = ui(24); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, c_white, 1); - draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx, _y, _wdw, _wdh, COLORS._main_icon_light, 1); + draw_sprite_stretched_ext(THEME.textbox, 3, _wdx + _wdw + ui(4), _y, _wdw, _wdh, COLORS._main_icon_light, 1); if(bone_object != noone) { var _bname = bone_object.name; @@ -64,13 +65,13 @@ function __Bone_Constrain_Stretch_To(_bone, _bid = "", _tid = "") : __Bone_Const if(_hover && point_in_rectangle(_m[0], _m[1], _wdx, _y, _wdx + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx, _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { bone_id = p.bone.ID; init(); node.triggerRender(); }); } if(_hover && point_in_rectangle(_m[0], _m[1], _wdx + _wdw + ui(4), _y, _wdx + _wdw + ui(4) + _wdw, _y + _wdh)) { draw_sprite_stretched_ext(THEME.textbox, 1, _wdx + _wdw + ui(4), _y, _wdw, _wdh, c_white, 1); if(mouse_click(mb_left, _focus)) - menuCall(, array_map(_drawParam.bone_array, function(b) /*=>*/ {return new MenuItem(b.name, function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }).setParam({ bone: b })}) ); + node.boneSelector(function(p) /*=>*/ { target_id = p.bone.ID; init(); node.triggerRender(); }); } _y += _wdh + ui(4); diff --git a/scripts/debug/debug.gml b/scripts/debug/debug.gml index 37c4776fd..de4663c6d 100644 --- a/scripts/debug/debug.gml +++ b/scripts/debug/debug.gml @@ -1,10 +1,20 @@ #region counter globalvar DEBUG_COUNTER; DEBUG_COUNTER = ds_map_create(); - - // #mfunc log(msg) show_debug_message("[" + @@__FILE__ + ":" + @@__LINE_STR__ + "] " + string(msg)) #endregion +#macro printlog if(log) show_debug_message + +function print(str) { + var _s = ""; + for(var i = 0; i < argument_count; i++) + _s += (i? ", " : "") + string(argument[i]); + + noti_status(_s); +} + +function printIf(cond, log) { if(cond) print(log); } + function __debug_counter(key) { if(ds_map_exists(DEBUG_COUNTER, key)) DEBUG_COUNTER[? key]++; else DEBUG_COUNTER[? key] = 1; diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 8b5e93f77..dd0dbf53a 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -44,7 +44,7 @@ LATEST_VERSION = 1_18_00_0; VERSION = 1_18_05_1; SAVE_VERSION = 1_18_05_0; - VERSION_STRING = MAC? "1.18.003m" : "1.18.6.001"; + VERSION_STRING = MAC? "1.18.003m" : "1.18.6.002"; BUILD_NUMBER = 1_18_05_1; var _vsp = string_split(VERSION_STRING, "."); @@ -158,22 +158,10 @@ #macro c_ui_white $ffffff #endregion - #macro printlog if(log) show_debug_message - #macro RETURN_ON_REST if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return; #macro PANEL_PAD THEME_VALUE.panel_padding - function print(str) { - INLINE - noti_status(string(str)); - } - - function printIf(cond, log) { - INLINE - if(cond) print(log); - } - #endregion #region presets diff --git a/scripts/node_armature/node_armature.gml b/scripts/node_armature/node_armature.gml index 2a1ecc9da..0a6d52c2d 100644 --- a/scripts/node_armature/node_armature.gml +++ b/scripts/node_armature/node_armature.gml @@ -7,6 +7,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo function addConstain(_c) { if(bone_constrain_adding == noone) return; array_push(bones.constrains, new __Bone_Constrain(bones).build(_c, bone_constrain_adding.ID)); + triggerRender(); } bone_constrain_menu = [ @@ -177,7 +178,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo draw_sprite_ui(s_bone_constrain, _con.sindex, _x + ui(4 + 16), ty + ui(16), 1, 1, 0, c_white, 1); draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub); - draw_text_add(_x + ui(4 + 32), ty + ui(8), _con.name); + draw_text_add(_x + ui(4 + 32), ty + ui(6), _con.name); var bx = _x + _w - ui(16); var by = ty + ui(16); @@ -843,6 +844,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo bone_array = bones.toArray(); } + ////- Draw + static getPreviewBoundingBox = function() { var minx = 9999999; var miny = 9999999; @@ -876,6 +879,19 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo return BBOX().fromPoints(minx, miny, maxx, maxy); } + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + var bbox = drawGetBbox(xx, yy, _s); + + var _ss = _s * .5; + gpu_set_tex_filter(1); + draw_sprite_ext(s_node_armature_create, 0, bbox.x0 + 24 * _ss, bbox.y1 - 24 * _ss, _ss, _ss, 0, c_white, 0.5); + gpu_set_tex_filter(0); + + bones.drawThumbnail(_s, bbox, bone_bbox); + } + + ////- Serialize + static doSerialize = function(_map) { _map.bones = bones.serialize(); } @@ -891,15 +907,11 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo bone_array = bones.toArray(); } - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var bbox = drawGetBbox(xx, yy, _s); - - var _ss = _s * .5; - gpu_set_tex_filter(1); - draw_sprite_ext(s_node_armature_create, 0, bbox.x0 + 24 * _ss, bbox.y1 - 24 * _ss, _ss, _ss, 0, c_white, 0.5); - gpu_set_tex_filter(0); - - bones.drawThumbnail(_s, bbox, bone_bbox); - } + ////- Actions + + static boneSelector = function(fn) { + __bone_fn = fn; + menuCall("", array_map(bone_array, function(b) /*=>*/ {return new MenuItem(b.name, __bone_fn, [ THEME.bone, 1, 1 ]).setParam({ bone: b })}) ); + } }