Fix panel unfocus, vfx not updating.

This commit is contained in:
Tanasart 2023-03-24 15:32:08 +07:00
parent 02a5b3bd0f
commit 99315c5872
9 changed files with 27 additions and 12 deletions

View file

@ -10,7 +10,7 @@ event_inherited();
panel = surface_create(dialog_w, dialog_h); panel = surface_create(dialog_w, dialog_h);
mask_surface = noone; mask_surface = noone;
content = noone; content = noone;
destroy_on_click_out = true; destroy_on_click_out = true;
function setContent(content) { function setContent(content) {

View file

@ -17,7 +17,7 @@ if !ready exit;
content.y = cy; content.y = cy;
content.onStepBegin(); content.onStepBegin();
content.pFOCUS = sFOCUS && mouse_active; content.pFOCUS = sFOCUS;
content.pHOVER = sHOVER; content.pHOVER = sHOVER;
panel = surface_verify(panel, dialog_w - content.showHeader * padding * 2, panel = surface_verify(panel, dialog_w - content.showHeader * padding * 2,

View file

@ -15,9 +15,10 @@
#region window #region window
if(OS == os_windows) { if(OS == os_windows) {
gameframe_init(); gameframe_init();
//gameframe_can_input = false;
gameframe_set_cursor = false; gameframe_set_cursor = false;
gameframe_caption_height_normal = ui(40); gameframe_caption_height_normal = ui(40);
gameframe_caption_height_maximized = ui(40);
gameframe_button_array = [ game_frame_button_create("", s_kenney, 0, function() {}), gameframe_button_array = [ game_frame_button_create("", s_kenney, 0, function() {}),
game_frame_button_create("", s_kenney, 0, function() {}), game_frame_button_create("", s_kenney, 0, function() {}),
]; ];
@ -163,7 +164,7 @@
case ".jpeg" : case ".jpeg" :
node = Node_create_Image_path(PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y, p); node = Node_create_Image_path(PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y, p);
break; break;
case ".gif" : case ".gif" :
node = Node_create_Image_gif_path(PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y, p); node = Node_create_Image_gif_path(PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y, p);
break; break;
case ".obj" : case ".obj" :
@ -172,6 +173,9 @@
case ".pxc" : case ".pxc" :
LOAD_PATH(p); LOAD_PATH(p);
break; break;
case ".pxcc" :
APPEND(p);
break;
} }
PANEL_GRAPH.mouse_grid_y += 160; PANEL_GRAPH.mouse_grid_y += 160;

View file

@ -1,5 +1,6 @@
function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Spawner"; name = "Spawner";
update_on_frame = true;
inputs[| 0] = nodeValue("Particle sprite", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| 0] = nodeValue("Particle sprite", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);

View file

@ -3,6 +3,7 @@ global.loop_nodes = [ "Node_Iterate", "Node_Iterate_Each" ];
function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x, _y) constructor { function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x, _y) constructor {
active = true; active = true;
renderActive = true; renderActive = true;
node_id = generateUUID(); node_id = generateUUID();
group = _group; group = _group;
destroy_when_upgroup = false; destroy_when_upgroup = false;
@ -11,7 +12,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
color = c_white; color = c_white;
icon = noone; icon = noone;
bg_spr = THEME.node_bg; bg_spr = THEME.node_bg;
bg_sel_spr = THEME.node_active; bg_sel_spr = THEME.node_active;
anim_priority = ds_map_size(NODE_MAP); anim_priority = ds_map_size(NODE_MAP);
if(!LOADING && !APPENDING) { if(!LOADING && !APPENDING) {

View file

@ -33,6 +33,11 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
attribute_surface_depth(); attribute_surface_depth();
attributes[? "fill_iteration"] = -1;
array_push(attributeEditors, "Algorithm");
array_push(attributeEditors, ["Fill iteration", "fill_iteration",
new textBox(TEXTBOX_INPUT.number, function(val) { attributes[? "fill_iteration"] = val; })]);
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
} }
@ -72,7 +77,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
surface_reset_target(); surface_reset_target();
var ind = 0; var ind = 0;
var it = sw + sh; var it = attributes[? "fill_iteration"] == -1? sw + sh : attributes[? "fill_iteration"];
repeat(it) { repeat(it) {
ind = !ind; ind = !ind;

View file

@ -137,10 +137,8 @@
if(pan) return pan; if(pan) return pan;
with(o_dialog_panel) { with(o_dialog_panel) {
for( var i = 0; i < array_length(content); i++ ) { if(instanceof(content) == _type)
if(instanceof(content[i]) == _type) return content;
return content[i];
}
} }
return noone; return noone;

View file

@ -178,6 +178,12 @@ function Panel_Inspector() : PanelContent() constructor {
hh += wh + ui(8); hh += wh + ui(8);
} }
} else if (i == 1) { } else if (i == 1) {
if(findPanel("Panel_Globalvar")) {
yy += ui(4);
hh += ui(4);
continue;
}
var gvh = globalvar_viewer_draw(ui(16), yy, contentPane.surface_w - ui(24), _m, pFOCUS, _hover, contentPane, ui(16) + x, top_bar_h + y); var gvh = globalvar_viewer_draw(ui(16), yy, contentPane.surface_w - ui(24), _m, pFOCUS, _hover, contentPane, ui(16) + x, top_bar_h + y);
yy += gvh + ui(8); yy += gvh + ui(8);
hh += gvh + ui(8); hh += gvh + ui(8);

View file

@ -4,7 +4,7 @@ enum RENDER_TYPE {
full = 2 full = 2
} }
global.RENDER_LOG = true; global.RENDER_LOG = false;
global.group_inputs = [ "Node_Group_Input", "Node_Feedback_Input", "Node_Iterator_Input", "Node_Iterator_Each_Input" ]; global.group_inputs = [ "Node_Group_Input", "Node_Feedback_Input", "Node_Iterator_Input", "Node_Iterator_Each_Input" ];
function __nodeLeafList(_list, _queue) { function __nodeLeafList(_list, _queue) {