mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-12 21:43:52 +01:00
sma
This commit is contained in:
parent
9bba747d34
commit
dbc6a49e05
Binary file not shown.
@ -40,6 +40,8 @@ event_inherited();
|
|||||||
tooltip_surface = -1;
|
tooltip_surface = -1;
|
||||||
content_hoverable = true;
|
content_hoverable = true;
|
||||||
|
|
||||||
|
canvas = false;
|
||||||
|
|
||||||
#region ---- category ----
|
#region ---- category ----
|
||||||
category = NODE_CATEGORY;
|
category = NODE_CATEGORY;
|
||||||
switch(instanceof(context)) {
|
switch(instanceof(context)) {
|
||||||
@ -146,7 +148,7 @@ event_inherited();
|
|||||||
|
|
||||||
if(!_node) return;
|
if(!_node) return;
|
||||||
|
|
||||||
if(is_instanceof(context, Node_Canvas) || is_instanceof(context, Node_Canvas_Group)) {
|
if(canvas) {
|
||||||
UNDO_HOLDING = true;
|
UNDO_HOLDING = true;
|
||||||
context.nodeTool = new canvas_tool_node(context, _node).init();
|
context.nodeTool = new canvas_tool_node(context, _node).init();
|
||||||
UNDO_HOLDING = false;
|
UNDO_HOLDING = false;
|
||||||
|
@ -336,7 +336,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||||||
__action_rotate_90_ccw = method(self, function() { if(tool_selection.is_selected) tool_selection.rotate90ccw() else canvas_action_rotate( 90); });
|
__action_rotate_90_ccw = method(self, function() { if(tool_selection.is_selected) tool_selection.rotate90ccw() else canvas_action_rotate( 90); });
|
||||||
__action_flip_h = method(self, function() { if(tool_selection.is_selected) tool_selection.flipH() else canvas_action_flip(1); });
|
__action_flip_h = method(self, function() { if(tool_selection.is_selected) tool_selection.flipH() else canvas_action_flip(1); });
|
||||||
__action_flip_v = method(self, function() { if(tool_selection.is_selected) tool_selection.flipV() else canvas_action_flip(0); });
|
__action_flip_v = method(self, function() { if(tool_selection.is_selected) tool_selection.flipV() else canvas_action_flip(0); });
|
||||||
__action_add_node = method(self, function(ctx) { dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8, { context: ctx }); });
|
__action_add_node = method(self, function(ctx) { var dia = dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8, { context: ctx }); dia.canvas = true; });
|
||||||
__action_make_brush = method(self, function() {
|
__action_make_brush = method(self, function() {
|
||||||
if(brush.brush_use_surface) {
|
if(brush.brush_use_surface) {
|
||||||
brush.brush_surface = noone;
|
brush.brush_surface = noone;
|
||||||
|
@ -72,6 +72,8 @@ function Node_MK_Subpixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||||||
|
|
||||||
update_on_frame = _flku;
|
update_on_frame = _flku;
|
||||||
|
|
||||||
|
if(!is_surface(_surf)) return _outSurf;
|
||||||
|
|
||||||
var _dim = surface_get_dimension(_surf);
|
var _dim = surface_get_dimension(_surf);
|
||||||
var sh = sh_mk_subpixel_hex_disc;
|
var sh = sh_mk_subpixel_hex_disc;
|
||||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||||
|
@ -15,6 +15,13 @@ function outputBox() : widget() constructor {
|
|||||||
|
|
||||||
draw_set_text(font, fa_left, fa_top, COLORS._main_text_sub);
|
draw_set_text(font, fa_left, fa_top, COLORS._main_text_sub);
|
||||||
|
|
||||||
|
// if(typeof(_value) == "ref") {
|
||||||
|
// var _hh = ui(96);
|
||||||
|
|
||||||
|
|
||||||
|
// return _hh;
|
||||||
|
// }
|
||||||
|
|
||||||
var _txt = string(_value);
|
var _txt = string(_value);
|
||||||
var _bh = string_height("l");
|
var _bh = string_height("l");
|
||||||
var _sh = string_height_ext(_txt, -1, w - ui(16));
|
var _sh = string_height_ext(_txt, -1, w - ui(16));
|
||||||
|
@ -140,9 +140,9 @@ function surfaceBox(_onModify, def_path = "") : widget() constructor {
|
|||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
|
||||||
static clone = function() { #region
|
static clone = function() {
|
||||||
var cln = new surfaceBox(onModify, def_path);
|
var cln = new surfaceBox(onModify, def_path);
|
||||||
|
|
||||||
return cln;
|
return cln;
|
||||||
} #endregion
|
}
|
||||||
}
|
}
|
BIN
sprites/s_icon_canvas/2865b94d-491b-4d7d-bdc6-ebbdb34cf4d4.png
Normal file
BIN
sprites/s_icon_canvas/2865b94d-491b-4d7d-bdc6-ebbdb34cf4d4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 530 B |
Binary file not shown.
Before Width: | Height: | Size: 499 B |
Binary file not shown.
After Width: | Height: | Size: 530 B |
Binary file not shown.
Before Width: | Height: | Size: 499 B |
@ -2,24 +2,24 @@
|
|||||||
"$GMSprite":"",
|
"$GMSprite":"",
|
||||||
"%Name":"s_icon_canvas",
|
"%Name":"s_icon_canvas",
|
||||||
"bboxMode":0,
|
"bboxMode":0,
|
||||||
"bbox_bottom":15,
|
"bbox_bottom":14,
|
||||||
"bbox_left":0,
|
"bbox_left":1,
|
||||||
"bbox_right":15,
|
"bbox_right":13,
|
||||||
"bbox_top":0,
|
"bbox_top":1,
|
||||||
"collisionKind":1,
|
"collisionKind":1,
|
||||||
"collisionTolerance":0,
|
"collisionTolerance":0,
|
||||||
"DynamicTexturePage":false,
|
"DynamicTexturePage":false,
|
||||||
"edgeFiltering":false,
|
"edgeFiltering":false,
|
||||||
"For3D":false,
|
"For3D":false,
|
||||||
"frames":[
|
"frames":[
|
||||||
{"$GMSpriteFrame":"","%Name":"802eedb3-856f-4c55-b600-b07717c204af","name":"802eedb3-856f-4c55-b600-b07717c204af","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
{"$GMSpriteFrame":"","%Name":"2865b94d-491b-4d7d-bdc6-ebbdb34cf4d4","name":"2865b94d-491b-4d7d-bdc6-ebbdb34cf4d4","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||||
],
|
],
|
||||||
"gridX":0,
|
"gridX":0,
|
||||||
"gridY":0,
|
"gridY":0,
|
||||||
"height":16,
|
"height":16,
|
||||||
"HTile":false,
|
"HTile":false,
|
||||||
"layers":[
|
"layers":[
|
||||||
{"$GMImageLayer":"","%Name":"01cca658-3f63-4487-8a8e-1847568814bc","blendMode":0,"displayName":"default","isLocked":false,"name":"01cca658-3f63-4487-8a8e-1847568814bc","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
{"$GMImageLayer":"","%Name":"012c44a9-0460-4825-872f-2945ce4902c9","blendMode":0,"displayName":"default","isLocked":false,"name":"012c44a9-0460-4825-872f-2945ce4902c9","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||||
],
|
],
|
||||||
"name":"s_icon_canvas",
|
"name":"s_icon_canvas",
|
||||||
"nineSlice":null,
|
"nineSlice":null,
|
||||||
@ -69,8 +69,8 @@
|
|||||||
"tracks":[
|
"tracks":[
|
||||||
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"802eedb3-856f-4c55-b600-b07717c204af","path":"sprites/s_icon_canvas/s_icon_canvas.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"2865b94d-491b-4d7d-bdc6-ebbdb34cf4d4","path":"sprites/s_icon_canvas/s_icon_canvas.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||||
},"Disabled":false,"id":"719a7433-7c7c-4930-8897-a925eb668da2","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
},"Disabled":false,"id":"ec091327-1106-402e-9b3a-c76995dccdc2","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||||
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||||
],
|
],
|
||||||
"visibleRange":null,
|
"visibleRange":null,
|
||||||
|
Loading…
Reference in New Issue
Block a user