mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-23 11:28:06 +01:00
Armature pose
This commit is contained in:
parent
640ff551d4
commit
1a81c476d9
87 changed files with 635 additions and 189 deletions
|
@ -546,6 +546,7 @@
|
||||||
{"name":"fd_rectangle_get_collision_mask_sprite_image","order":5,"path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",},
|
{"name":"fd_rectangle_get_collision_mask_sprite_image","order":5,"path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",},
|
||||||
{"name":"s_node_stripe","order":16,"path":"sprites/s_node_stripe/s_node_stripe.yy",},
|
{"name":"s_node_stripe","order":16,"path":"sprites/s_node_stripe/s_node_stripe.yy",},
|
||||||
{"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",},
|
{"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",},
|
||||||
|
{"name":"transformBox","order":29,"path":"scripts/transformBox/transformBox.yy",},
|
||||||
{"name":"sh_grey_alpha","order":14,"path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},
|
{"name":"sh_grey_alpha","order":14,"path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},
|
||||||
{"name":"sh_normal","order":1,"path":"shaders/sh_normal/sh_normal.yy",},
|
{"name":"sh_normal","order":1,"path":"shaders/sh_normal/sh_normal.yy",},
|
||||||
{"name":"s_node_time_map","order":39,"path":"sprites/s_node_time_map/s_node_time_map.yy",},
|
{"name":"s_node_time_map","order":39,"path":"sprites/s_node_time_map/s_node_time_map.yy",},
|
||||||
|
|
|
@ -244,6 +244,7 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_animation_timing.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_animation_timing.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_arrow_16_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_arrow_16_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_arrow_back_32.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_arrow_back_32.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_bone.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_button_path_icon.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_button_path_icon.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_button_path_not_found_icon.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_button_path_not_found_icon.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_cache.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_cache.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
|
@ -1056,6 +1057,7 @@
|
||||||
{"id":{"name":"fd_rectangle_get_collision_mask_sprite_image","path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",},},
|
{"id":{"name":"fd_rectangle_get_collision_mask_sprite_image","path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",},},
|
||||||
{"id":{"name":"s_node_stripe","path":"sprites/s_node_stripe/s_node_stripe.yy",},},
|
{"id":{"name":"s_node_stripe","path":"sprites/s_node_stripe/s_node_stripe.yy",},},
|
||||||
{"id":{"name":"s_node_lua_global","path":"sprites/s_node_lua_global/s_node_lua_global.yy",},},
|
{"id":{"name":"s_node_lua_global","path":"sprites/s_node_lua_global/s_node_lua_global.yy",},},
|
||||||
|
{"id":{"name":"transformBox","path":"scripts/transformBox/transformBox.yy",},},
|
||||||
{"id":{"name":"s_node_fluidSim_group","path":"sprites/s_node_fluidSim_group/s_node_fluidSim_group.yy",},},
|
{"id":{"name":"s_node_fluidSim_group","path":"sprites/s_node_fluidSim_group/s_node_fluidSim_group.yy",},},
|
||||||
{"id":{"name":"sh_grey_alpha","path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},},
|
{"id":{"name":"sh_grey_alpha","path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},},
|
||||||
{"id":{"name":"sh_normal","path":"shaders/sh_normal/sh_normal.yy",},},
|
{"id":{"name":"sh_normal","path":"shaders/sh_normal/sh_normal.yy",},},
|
||||||
|
|
Binary file not shown.
|
@ -21,6 +21,6 @@ if !ready exit;
|
||||||
|
|
||||||
var thank_y = dialog_y + ui(188);
|
var thank_y = dialog_y + ui(188);
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, dialog_x + ui(24), thank_y - ui(8), dialog_w - ui(48), thank_h + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, dialog_x + ui(24), thank_y - ui(8), dialog_w - ui(48), thank_h + ui(16));
|
||||||
sc_thank.setActiveFocus(sFOCUS, sHOVER);
|
sc_thank.setFocusHover(sFOCUS, sHOVER);
|
||||||
sc_thank.draw(dialog_x + ui(32), thank_y);
|
sc_thank.draw(dialog_x + ui(32), thank_y);
|
||||||
#endregion
|
#endregion
|
|
@ -61,14 +61,14 @@ if !ready exit;
|
||||||
if(is_dir) {
|
if(is_dir) {
|
||||||
var dir_y = dialog_y + ui(172);
|
var dir_y = dialog_y + ui(172);
|
||||||
|
|
||||||
cb_recursive.setActiveFocus(sFOCUS, sHOVER);
|
cb_recursive.setFocusHover(sFOCUS, sHOVER);
|
||||||
cb_recursive.draw(dialog_x + dialog_w - ui(48), dir_y, dir_recursive, mouse_ui);
|
cb_recursive.draw(dialog_x + dialog_w - ui(48), dir_y, dir_recursive, mouse_ui);
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(24), dir_y + ui(14), __txtx("add_images_recursive", "Recursive"));
|
draw_text(dialog_x + ui(24), dir_y + ui(14), __txtx("add_images_recursive", "Recursive"));
|
||||||
|
|
||||||
dir_y += ui(40);
|
dir_y += ui(40);
|
||||||
tb_filter.setActiveFocus(sFOCUS, sHOVER);
|
tb_filter.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_filter.draw(dialog_x + ui(100), dir_y, dialog_w - ui(120), ui(36), dir_filter, mouse_ui);
|
tb_filter.draw(dialog_x + ui(100), dir_y, dialog_w - ui(120), ui(36), dir_filter, mouse_ui);
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
|
|
|
@ -11,22 +11,22 @@ if !ready exit;
|
||||||
WIDGET_CURRENT = tb_search;
|
WIDGET_CURRENT = tb_search;
|
||||||
|
|
||||||
if(search_string == "") {
|
if(search_string == "") {
|
||||||
tb_search.setActiveFocus(false, false);
|
tb_search.setFocusHover(false, false);
|
||||||
tb_search.sprite_index = 1;
|
tb_search.sprite_index = 1;
|
||||||
|
|
||||||
catagory_pane.setActiveFocus(sFOCUS, sHOVER);
|
catagory_pane.setFocusHover(sFOCUS, sHOVER);
|
||||||
catagory_pane.draw(dialog_x + ui(14), dialog_y + ui(52));
|
catagory_pane.draw(dialog_x + ui(14), dialog_y + ui(52));
|
||||||
|
|
||||||
var _x = dialog_x + category_width - ui(12);
|
var _x = dialog_x + category_width - ui(12);
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, _x, dialog_y + ui(52), dialog_w - category_width - ui(2), dialog_h - ui(66));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, _x, dialog_y + ui(52), dialog_w - category_width - ui(2), dialog_h - ui(66));
|
||||||
content_pane.setActiveFocus(sFOCUS, sHOVER);
|
content_pane.setFocusHover(sFOCUS, sHOVER);
|
||||||
content_pane.draw(_x, dialog_y + ui(52));
|
content_pane.draw(_x, dialog_y + ui(52));
|
||||||
|
|
||||||
node_selecting = 0;
|
node_selecting = 0;
|
||||||
} else {
|
} else {
|
||||||
tb_search.setActiveFocus(true, true);
|
tb_search.setFocusHover(true, true);
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, dialog_x + ui(14), dialog_y + ui(52), dialog_w - ui(28), dialog_h - ui(66));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, dialog_x + ui(14), dialog_y + ui(52), dialog_w - ui(28), dialog_h - ui(66));
|
||||||
search_pane.setActiveFocus(sFOCUS, sHOVER);
|
search_pane.setFocusHover(sFOCUS, sHOVER);
|
||||||
search_pane.draw(dialog_x + ui(16), dialog_y + ui(52));
|
search_pane.draw(dialog_x + ui(16), dialog_y + ui(52));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ if !ready exit;
|
||||||
var yy = dialog_y + ui(44);
|
var yy = dialog_y + ui(44);
|
||||||
|
|
||||||
tb_scale_frame.register();
|
tb_scale_frame.register();
|
||||||
tb_scale_frame.setActiveFocus(sFOCUS, sHOVER);
|
tb_scale_frame.setFocusHover(sFOCUS, sHOVER);
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy + ui(17), __txtx("anim_scale_target_frame_length", "Target frame length"));
|
draw_text(dialog_x + ui(32), yy + ui(17), __txtx("anim_scale_target_frame_length", "Target frame length"));
|
||||||
var tb_x = dialog_x + ui(200);
|
var tb_x = dialog_x + ui(200);
|
||||||
|
@ -28,6 +28,6 @@ if !ready exit;
|
||||||
var by = yy;
|
var by = yy;
|
||||||
|
|
||||||
b_apply.register();
|
b_apply.register();
|
||||||
b_apply.setActiveFocus(sFOCUS, sHOVER);
|
b_apply.setFocusHover(sFOCUS, sHOVER);
|
||||||
b_apply.draw(bx, by, ui(36), ui(36), mouse_ui, THEME.button_lime);
|
b_apply.draw(bx, by, ui(36), ui(36), mouse_ui, THEME.button_lime);
|
||||||
#endregion
|
#endregion
|
|
@ -13,21 +13,21 @@ if !ready exit;
|
||||||
#region draw
|
#region draw
|
||||||
var yy = dialog_y + ui(44);
|
var yy = dialog_y + ui(44);
|
||||||
|
|
||||||
tb_length.setActiveFocus(sFOCUS, sHOVER);
|
tb_length.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_length.register();
|
tb_length.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy + ui(17), __txtx("anim_length", "Animation length"));
|
draw_text(dialog_x + ui(32), yy + ui(17), __txtx("anim_length", "Animation length"));
|
||||||
tb_length.draw(dialog_x + dialog_w - ui(120), yy, ui(96), TEXTBOX_HEIGHT, ANIMATOR.frames_total, mouse_ui);
|
tb_length.draw(dialog_x + dialog_w - ui(120), yy, ui(96), TEXTBOX_HEIGHT, ANIMATOR.frames_total, mouse_ui);
|
||||||
|
|
||||||
yy += ui(44);
|
yy += ui(44);
|
||||||
tb_framerate.setActiveFocus(sFOCUS, sHOVER);
|
tb_framerate.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_framerate.register();
|
tb_framerate.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy + ui(17), __txtx("anim_frame_rate", "Preview frame rate"));
|
draw_text(dialog_x + ui(32), yy + ui(17), __txtx("anim_frame_rate", "Preview frame rate"));
|
||||||
tb_framerate.draw(dialog_x + dialog_w - ui(120), yy, ui(96), TEXTBOX_HEIGHT, ANIMATOR.framerate, mouse_ui);
|
tb_framerate.draw(dialog_x + dialog_w - ui(120), yy, ui(96), TEXTBOX_HEIGHT, ANIMATOR.framerate, mouse_ui);
|
||||||
|
|
||||||
yy += ui(44);
|
yy += ui(44);
|
||||||
eb_playback.setActiveFocus(sFOCUS, sHOVER);
|
eb_playback.setFocusHover(sFOCUS, sHOVER);
|
||||||
eb_playback.register();
|
eb_playback.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy + ui(17), __txtx("anim_on_end", "On end"));
|
draw_text(dialog_x + ui(32), yy + ui(17), __txtx("anim_on_end", "On end"));
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#region draw
|
#region draw
|
||||||
draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h);
|
draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h);
|
||||||
|
|
||||||
sc_content.setActiveFocus(sHOVER, sFOCUS);
|
sc_content.setFocusHover(sFOCUS, sHOVER);
|
||||||
sc_content.draw(dialog_x, dialog_y);
|
sc_content.draw(dialog_x, dialog_y);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h);
|
draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h);
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
folderPane.setActiveFocus(sHOVER, sFOCUS);
|
folderPane.setFocusHover(sFOCUS, sHOVER);
|
||||||
folderPane.draw(dialog_x + ui(16), dialog_y + ui(48));
|
folderPane.draw(dialog_x + ui(16), dialog_y + ui(48));
|
||||||
|
|
||||||
contentPane.setActiveFocus(sHOVER, sFOCUS);
|
contentPane.setFocusHover(sFOCUS, sHOVER);
|
||||||
contentPane.draw(dialog_x + ui(20) + folderW, dialog_y + ui(16));
|
contentPane.draw(dialog_x + ui(20) + folderW, dialog_y + ui(16));
|
||||||
#endregion
|
#endregion
|
|
@ -33,7 +33,7 @@ if !ready exit;
|
||||||
#region palette
|
#region palette
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, presets_x + ui(16), dialog_y + ui(44), ui(240 - 32), dialog_h - ui(60));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, presets_x + ui(16), dialog_y + ui(44), ui(240 - 32), dialog_h - ui(60));
|
||||||
|
|
||||||
sp_presets.setActiveFocus(sFOCUS, sHOVER);
|
sp_presets.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_presets.draw(presets_x + ui(24), dialog_y + ui(44));
|
sp_presets.draw(presets_x + ui(24), dialog_y + ui(44));
|
||||||
|
|
||||||
var bx = presets_x + presets_w - ui(44);
|
var bx = presets_x + presets_w - ui(44);
|
||||||
|
@ -63,11 +63,11 @@ if !ready exit;
|
||||||
var by = dialog_y + dialog_h - ui(36);
|
var by = dialog_y + dialog_h - ui(36);
|
||||||
|
|
||||||
b_apply.register();
|
b_apply.register();
|
||||||
b_apply.setActiveFocus(sFOCUS, sHOVER);
|
b_apply.setFocusHover(sFOCUS, sHOVER);
|
||||||
b_apply.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_lime);
|
b_apply.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_lime);
|
||||||
|
|
||||||
bx -= ui(48);
|
bx -= ui(48);
|
||||||
b_cancel.register();
|
b_cancel.register();
|
||||||
b_cancel.setActiveFocus(sFOCUS, sHOVER);
|
b_cancel.setFocusHover(sFOCUS, sHOVER);
|
||||||
b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide);
|
b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide);
|
||||||
#endregion
|
#endregion
|
|
@ -13,14 +13,14 @@ if !ready exit;
|
||||||
#region directory option
|
#region directory option
|
||||||
var dir_y = dialog_y + ui(44);
|
var dir_y = dialog_y + ui(44);
|
||||||
|
|
||||||
cb_recursive.setActiveFocus(sFOCUS, sHOVER);
|
cb_recursive.setFocusHover(sFOCUS, sHOVER);
|
||||||
cb_recursive.draw(dialog_x + dialog_w - ui(48), dir_y, dir_recursive, mouse_ui);
|
cb_recursive.draw(dialog_x + dialog_w - ui(48), dir_y, dir_recursive, mouse_ui);
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(20), dir_y + ui(14), __txt("Recursive"));
|
draw_text(dialog_x + ui(20), dir_y + ui(14), __txt("Recursive"));
|
||||||
|
|
||||||
dir_y += ui(40);
|
dir_y += ui(40);
|
||||||
tb_filter.setActiveFocus(sFOCUS, sHOVER);
|
tb_filter.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_filter.draw(dialog_x + ui(100), dir_y, dialog_w - ui(120), ui(36), dir_filter, mouse_ui);
|
tb_filter.draw(dialog_x + ui(100), dir_y, dialog_w - ui(120), ui(36), dir_filter, mouse_ui);
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
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(dialog_x + ui(8), dialog_y + dialog_h / 2, __txt("Name"));
|
draw_text(dialog_x + ui(8), dialog_y + dialog_h / 2, __txt("Name"));
|
||||||
|
|
||||||
tb_name.setActiveFocus(sFOCUS, sHOVER);
|
tb_name.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_name.draw(dialog_x + ui(64), dialog_y + ui(8), dialog_w - ui(72), dialog_h - ui(16),
|
tb_name.draw(dialog_x + ui(64), dialog_y + ui(8), dialog_w - ui(72), dialog_h - ui(16),
|
||||||
name, mouse_ui);
|
name, mouse_ui);
|
||||||
#endregion
|
#endregion
|
|
@ -18,7 +18,7 @@
|
||||||
t_alias.interactable = !STEAM_UGC_ITEM_UPLOADING;
|
t_alias.interactable = !STEAM_UGC_ITEM_UPLOADING;
|
||||||
tb_name.interactable = !STEAM_UGC_ITEM_UPLOADING;
|
tb_name.interactable = !STEAM_UGC_ITEM_UPLOADING;
|
||||||
|
|
||||||
tb_name.setActiveFocus(sFOCUS, sHOVER);
|
tb_name.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_name.register();
|
tb_name.register();
|
||||||
tb_name.draw(dialog_x + ui(72), dialog_y + ui(16), dialog_w - ui(164), ui(32), meta.name, mouse_ui);
|
tb_name.draw(dialog_x + ui(72), dialog_y + ui(16), dialog_w - ui(164), ui(32), meta.name, mouse_ui);
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
yy += line_get_height() + ui(4);
|
yy += line_get_height() + ui(4);
|
||||||
dialog_h += line_get_height() + ui(4);
|
dialog_h += line_get_height() + ui(4);
|
||||||
|
|
||||||
t_desc.setActiveFocus(sFOCUS, sHOVER);
|
t_desc.setFocusHover(sFOCUS, sHOVER);
|
||||||
t_desc.register();
|
t_desc.register();
|
||||||
t_desc.draw(dialog_x + ui(16), yy, dialog_w - ui(32), ui(200), meta.description, mouse_ui);
|
t_desc.draw(dialog_x + ui(16), yy, dialog_w - ui(32), ui(200), meta.description, mouse_ui);
|
||||||
yy += ui(200) + ui(8);
|
yy += ui(200) + ui(8);
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
yy += line_get_height() + ui(4);
|
yy += line_get_height() + ui(4);
|
||||||
dialog_h += line_get_height() + ui(4);
|
dialog_h += line_get_height() + ui(4);
|
||||||
|
|
||||||
t_auth.setActiveFocus(sFOCUS, sHOVER);
|
t_auth.setFocusHover(sFOCUS, sHOVER);
|
||||||
t_auth.register();
|
t_auth.register();
|
||||||
t_auth.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, meta.author, mouse_ui);
|
t_auth.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, meta.author, mouse_ui);
|
||||||
yy += TEXTBOX_HEIGHT + ui(8);
|
yy += TEXTBOX_HEIGHT + ui(8);
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
yy += line_get_height() + ui(4);
|
yy += line_get_height() + ui(4);
|
||||||
dialog_h += line_get_height() + ui(4);
|
dialog_h += line_get_height() + ui(4);
|
||||||
|
|
||||||
t_cont.setActiveFocus(sFOCUS, sHOVER);
|
t_cont.setFocusHover(sFOCUS, sHOVER);
|
||||||
t_cont.register();
|
t_cont.register();
|
||||||
t_cont.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, meta.contact, mouse_ui);
|
t_cont.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, meta.contact, mouse_ui);
|
||||||
yy += TEXTBOX_HEIGHT + ui(8);
|
yy += TEXTBOX_HEIGHT + ui(8);
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
yy += line_get_height() + ui(4);
|
yy += line_get_height() + ui(4);
|
||||||
dialog_h += line_get_height() + ui(4);
|
dialog_h += line_get_height() + ui(4);
|
||||||
|
|
||||||
t_alias.setActiveFocus(sFOCUS, sHOVER);
|
t_alias.setFocusHover(sFOCUS, sHOVER);
|
||||||
t_alias.register();
|
t_alias.register();
|
||||||
t_alias.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, meta.alias, mouse_ui);
|
t_alias.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, meta.alias, mouse_ui);
|
||||||
yy += TEXTBOX_HEIGHT + ui(8);
|
yy += TEXTBOX_HEIGHT + ui(8);
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
yy += line_get_height() + ui(4);
|
yy += line_get_height() + ui(4);
|
||||||
dialog_h += line_get_height() + ui(4);
|
dialog_h += line_get_height() + ui(4);
|
||||||
|
|
||||||
t_tags.setActiveFocus(sFOCUS, sHOVER);
|
t_tags.setFocusHover(sFOCUS, sHOVER);
|
||||||
t_tags.register();
|
t_tags.register();
|
||||||
var hh = t_tags.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, mouse_ui);
|
var hh = t_tags.draw(dialog_x + ui(16), yy, dialog_w - ui(32), TEXTBOX_HEIGHT, mouse_ui);
|
||||||
yy += hh + ui(8);
|
yy += hh + ui(8);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#region draw
|
#region draw
|
||||||
draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h);
|
draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h);
|
||||||
|
|
||||||
sc_content.setActiveFocus(sHOVER, sFOCUS);
|
sc_content.setFocusHover(sFOCUS, sHOVER);
|
||||||
sc_content.draw(dialog_x, dialog_y);
|
sc_content.draw(dialog_x, dialog_y);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h);
|
draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h);
|
||||||
|
|
|
@ -38,7 +38,7 @@ if !ready exit;
|
||||||
#region presets
|
#region presets
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, presets_x + ui(16), dialog_y + ui(44), ui(240 - 32), dialog_h - ui(60));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, presets_x + ui(16), dialog_y + ui(44), ui(240 - 32), dialog_h - ui(60));
|
||||||
|
|
||||||
sp_presets.setActiveFocus(sFOCUS, sHOVER);
|
sp_presets.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_presets.draw(presets_x + ui(16 + 8), dialog_y + ui(44));
|
sp_presets.draw(presets_x + ui(16 + 8), dialog_y + ui(44));
|
||||||
|
|
||||||
var bx = presets_x + presets_w - ui(44);
|
var bx = presets_x + presets_w - ui(44);
|
||||||
|
@ -82,7 +82,7 @@ if !ready exit;
|
||||||
#region palette
|
#region palette
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, palette_x + ui(16), dialog_y + ui(44), ui(240 - 32), dialog_h - ui(60));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, palette_x + ui(16), dialog_y + ui(44), ui(240 - 32), dialog_h - ui(60));
|
||||||
|
|
||||||
sp_palettes.setActiveFocus(sFOCUS, sHOVER);
|
sp_palettes.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_palettes.draw(palette_x + ui(16 + 8), dialog_y + ui(44));
|
sp_palettes.draw(palette_x + ui(16 + 8), dialog_y + ui(44));
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ if !ready exit;
|
||||||
draw_text(op_x, op_y + TEXTBOX_HEIGHT / 2, __txt("Position"))
|
draw_text(op_x, op_y + TEXTBOX_HEIGHT / 2, __txt("Position"))
|
||||||
|
|
||||||
var txt = key_selecting? key_selecting.time * 100 : 0;
|
var txt = key_selecting? key_selecting.time * 100 : 0;
|
||||||
sl_position.setActiveFocus(sFOCUS, sHOVER);
|
sl_position.setFocusHover(sFOCUS, sHOVER);
|
||||||
sl_position.register();
|
sl_position.register();
|
||||||
sl_position.draw(op_x + ui(100), op_y, ui(content_w - 140), TEXTBOX_HEIGHT, txt, mouse_ui);
|
sl_position.draw(op_x + ui(100), op_y, ui(content_w - 140), TEXTBOX_HEIGHT, txt, mouse_ui);
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -205,11 +205,11 @@ if !ready exit;
|
||||||
var by = dialog_y + dialog_h - ui(36);
|
var by = dialog_y + dialog_h - ui(36);
|
||||||
|
|
||||||
b_apply.register();
|
b_apply.register();
|
||||||
b_apply.setActiveFocus(sFOCUS, sHOVER);
|
b_apply.setFocusHover(sFOCUS, sHOVER);
|
||||||
b_apply.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_lime);
|
b_apply.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_lime);
|
||||||
|
|
||||||
bx -= ui(48);
|
bx -= ui(48);
|
||||||
b_cancel.register();
|
b_cancel.register();
|
||||||
b_cancel.setActiveFocus(sFOCUS, sHOVER);
|
b_cancel.setFocusHover(sFOCUS, sHOVER);
|
||||||
b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide);
|
b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide);
|
||||||
#endregion
|
#endregion
|
|
@ -14,21 +14,21 @@ if !ready exit;
|
||||||
var yy = dialog_y + ui(64);
|
var yy = dialog_y + ui(64);
|
||||||
var ww = ui(128);
|
var ww = ui(128);
|
||||||
|
|
||||||
bs_type.setActiveFocus(sFOCUS, sHOVER);
|
bs_type.setFocusHover(sFOCUS, sHOVER);
|
||||||
bs_type.register();
|
bs_type.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txt("Type"));
|
draw_text(dialog_x + ui(32), yy, __txt("Type"));
|
||||||
bs_type.draw(dialog_x + dialog_w - ui(24) - ww, yy - TEXTBOX_HEIGHT / 2, ww, TEXTBOX_HEIGHT, PREF_MAP[? "curve_connection_line"], mouse_ui);
|
bs_type.draw(dialog_x + dialog_w - ui(24) - ww, yy - TEXTBOX_HEIGHT / 2, ww, TEXTBOX_HEIGHT, PREF_MAP[? "curve_connection_line"], mouse_ui);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
tb_width.setActiveFocus(sFOCUS, sHOVER);
|
tb_width.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_width.register();
|
tb_width.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txtx("dialog_connection_thickness", "Line thickness"));
|
draw_text(dialog_x + ui(32), yy, __txtx("dialog_connection_thickness", "Line thickness"));
|
||||||
tb_width.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PREF_MAP[? "connection_line_width"], mouse_ui,, fa_right, fa_center);
|
tb_width.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PREF_MAP[? "connection_line_width"], mouse_ui,, fa_right, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
tb_corner.setActiveFocus(sFOCUS, sHOVER);
|
tb_corner.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_corner.register();
|
tb_corner.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txtx("dialog_connection_radius", "Corner radius"));
|
draw_text(dialog_x + ui(32), yy, __txtx("dialog_connection_radius", "Corner radius"));
|
||||||
|
|
|
@ -14,28 +14,28 @@ if !ready exit;
|
||||||
var yy = dialog_y + ui(64);
|
var yy = dialog_y + ui(64);
|
||||||
var ww = ui(128);
|
var ww = ui(128);
|
||||||
|
|
||||||
cb_enable.setActiveFocus(sFOCUS, sHOVER);
|
cb_enable.setFocusHover(sFOCUS, sHOVER);
|
||||||
cb_enable.register();
|
cb_enable.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txtx("grid_snap", "Snap to grid"));
|
draw_text(dialog_x + ui(32), yy, __txtx("grid_snap", "Snap to grid"));
|
||||||
cb_enable.draw(dialog_x + dialog_w - ui(24) - ww / 2, yy, PANEL_GRAPH.node_drag_snap, mouse_ui,, fa_center, fa_center);
|
cb_enable.draw(dialog_x + dialog_w - ui(24) - ww / 2, yy, PANEL_GRAPH.node_drag_snap, mouse_ui,, fa_center, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
tb_size.setActiveFocus(sFOCUS, sHOVER);
|
tb_size.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_size.register();
|
tb_size.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txtx("grid_size", "Grid size"));
|
draw_text(dialog_x + ui(32), yy, __txtx("grid_size", "Grid size"));
|
||||||
tb_size.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_GRAPH.graph_line_s, mouse_ui,, fa_right, fa_center);
|
tb_size.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_GRAPH.graph_line_s, mouse_ui,, fa_right, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
sl_opacity.setActiveFocus(sFOCUS, sHOVER);
|
sl_opacity.setFocusHover(sFOCUS, sHOVER);
|
||||||
sl_opacity.register();
|
sl_opacity.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txtx("grid_opacity", "Grid opacity"));
|
draw_text(dialog_x + ui(32), yy, __txtx("grid_opacity", "Grid opacity"));
|
||||||
sl_opacity.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_GRAPH.grid_opacity, mouse_ui, ui(52), fa_right, fa_center);
|
sl_opacity.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_GRAPH.grid_opacity, mouse_ui, ui(52), fa_right, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
cl_color.setActiveFocus(sFOCUS, sHOVER);
|
cl_color.setFocusHover(sFOCUS, sHOVER);
|
||||||
cl_color.register();
|
cl_color.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txtx("grid_color", "Grid color"));
|
draw_text(dialog_x + ui(32), yy, __txtx("grid_color", "Grid color"));
|
||||||
|
|
|
@ -13,21 +13,21 @@ if !ready exit;
|
||||||
#region draw
|
#region draw
|
||||||
var yy = dialog_y + ui(64);
|
var yy = dialog_y + ui(64);
|
||||||
|
|
||||||
cb_grid.setActiveFocus(sFOCUS, sHOVER);
|
cb_grid.setFocusHover(sFOCUS, sHOVER);
|
||||||
cb_grid.register();
|
cb_grid.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txt("Grid"));
|
draw_text(dialog_x + ui(32), yy, __txt("Grid"));
|
||||||
cb_grid.draw(dialog_x + dialog_w - ui(48), yy, PANEL_GRAPH.show_grid, mouse_ui,, fa_center, fa_center);
|
cb_grid.draw(dialog_x + dialog_w - ui(48), yy, PANEL_GRAPH.show_grid, mouse_ui,, fa_center, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
cb_dim.setActiveFocus(sFOCUS, sHOVER);
|
cb_dim.setFocusHover(sFOCUS, sHOVER);
|
||||||
cb_dim.register();
|
cb_dim.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txtx("graph_visibility_dim", "Dimension"));
|
draw_text(dialog_x + ui(32), yy, __txtx("graph_visibility_dim", "Dimension"));
|
||||||
cb_dim.draw(dialog_x + dialog_w - ui(48), yy, PANEL_GRAPH.show_dimension, mouse_ui,, fa_center, fa_center);
|
cb_dim.draw(dialog_x + dialog_w - ui(48), yy, PANEL_GRAPH.show_dimension, mouse_ui,, fa_center, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
cb_com.setActiveFocus(sFOCUS, sHOVER);
|
cb_com.setFocusHover(sFOCUS, sHOVER);
|
||||||
cb_com.register();
|
cb_com.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txtx("graph_visibility_compute", "Compute time"));
|
draw_text(dialog_x + ui(32), yy, __txtx("graph_visibility_compute", "Compute time"));
|
||||||
|
|
|
@ -62,7 +62,7 @@ event_inherited();
|
||||||
var sep = node.attributes.separator;
|
var sep = node.attributes.separator;
|
||||||
|
|
||||||
WIDGET_CURRENT = tb_edit;
|
WIDGET_CURRENT = tb_edit;
|
||||||
tb_edit.setActiveFocus(sFOCUS, sHOVER);
|
tb_edit.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_edit.draw(ed_x + ui(4), _y + ui(4), con_w - (ed_x + ui(8)), hg - ui(8), sep[sep_editing][1], mouse_ui);
|
tb_edit.draw(ed_x + ui(4), _y + ui(4), con_w - (ed_x + ui(8)), hg - ui(8), sep[sep_editing][1], mouse_ui);
|
||||||
|
|
||||||
if(keyboard_check_pressed(vk_enter))
|
if(keyboard_check_pressed(vk_enter))
|
||||||
|
|
|
@ -17,7 +17,7 @@ if !ready exit;
|
||||||
var ph = dialog_h - ui(title_height + padding)
|
var ph = dialog_h - ui(title_height + padding)
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sc_group.setActiveFocus(sFOCUS, sHOVER);
|
sc_group.setFocusHover(sFOCUS, sHOVER);
|
||||||
sc_group.draw(px, py);
|
sc_group.draw(px, py);
|
||||||
|
|
||||||
var bx = dialog_x + dialog_w - ui(32 + 16);
|
var bx = dialog_x + dialog_w - ui(32 + 16);
|
||||||
|
|
|
@ -23,6 +23,6 @@ if !ready exit;
|
||||||
var ph = dialog_h - ui(title_height + padding);
|
var ph = dialog_h - ui(title_height + padding);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sc_history.setActiveFocus(sFOCUS, sHOVER);
|
sc_history.setFocusHover(sFOCUS, sHOVER);
|
||||||
sc_history.draw(px, py);
|
sc_history.draw(px, py);
|
||||||
#endregion
|
#endregion
|
|
@ -18,7 +18,7 @@ if !target exit;
|
||||||
var ph = dialog_h - ui(title_height + padding);
|
var ph = dialog_h - ui(title_height + padding);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sp_content.setActiveFocus(sFOCUS, sHOVER);
|
sp_content.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_content.draw(px, py);
|
sp_content.draw(px, py);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ if !ready exit;
|
||||||
|
|
||||||
#region draw
|
#region draw
|
||||||
if(value_target != noone) {
|
if(value_target != noone) {
|
||||||
editWidget.setActiveFocus(sFOCUS, sHOVER);
|
editWidget.setFocusHover(sFOCUS, sHOVER);
|
||||||
editWidget.draw(dialog_x + ui(16), dialog_y + ui(48), dialog_w - ui(32), dialog_h - ui(64),
|
editWidget.draw(dialog_x + ui(16), dialog_y + ui(48), dialog_w - ui(32), dialog_h - ui(64),
|
||||||
value_target.inter_curve, mouse_ui);
|
value_target.inter_curve, mouse_ui);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,6 @@ if !ready exit;
|
||||||
var ph = dialog_h - ui(title_height + padding);
|
var ph = dialog_h - ui(title_height + padding);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sp_note.setActiveFocus(sFOCUS, sHOVER);
|
sp_note.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_note.draw(px, py);
|
sp_note.draw(px, py);
|
||||||
#endregion
|
#endregion
|
|
@ -17,6 +17,6 @@ if !ready exit;
|
||||||
var ph = dialog_h - ui(title_height + padding);
|
var ph = dialog_h - ui(title_height + padding);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sp_note.setActiveFocus(sFOCUS, sHOVER);
|
sp_note.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_note.draw(px, py);
|
sp_note.draw(px, py);
|
||||||
#endregion
|
#endregion
|
|
@ -48,6 +48,6 @@ if !ready exit;
|
||||||
var ph = dialog_h - ui(title_height + padding);
|
var ph = dialog_h - ui(title_height + padding);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sp_noti.setActiveFocus(sFOCUS, sHOVER);
|
sp_noti.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_noti.draw(px, py);
|
sp_noti.draw(px, py);
|
||||||
#endregion
|
#endregion
|
|
@ -17,6 +17,6 @@ if !ready exit;
|
||||||
var ph = dialog_h - ui(title_height + padding)
|
var ph = dialog_h - ui(title_height + padding)
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sc_outputs.setActiveFocus(sFOCUS, sHOVER);
|
sc_outputs.setFocusHover(sFOCUS, sHOVER);
|
||||||
sc_outputs.draw(px, py);
|
sc_outputs.draw(px, py);
|
||||||
#endregion
|
#endregion
|
|
@ -33,7 +33,7 @@ if palette == 0 exit;
|
||||||
#region presets
|
#region presets
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, presets_x + ui(16), dialog_y + ui(44), ui(240 - 32), dialog_h - ui(60));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, presets_x + ui(16), dialog_y + ui(44), ui(240 - 32), dialog_h - ui(60));
|
||||||
|
|
||||||
sp_presets.setActiveFocus(sFOCUS, sHOVER);
|
sp_presets.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_presets.draw(presets_x + ui(24), dialog_y + ui(44));
|
sp_presets.draw(presets_x + ui(24), dialog_y + ui(44));
|
||||||
|
|
||||||
var bx = presets_x + presets_w - ui(44);
|
var bx = presets_x + presets_w - ui(44);
|
||||||
|
@ -204,11 +204,11 @@ if palette == 0 exit;
|
||||||
var by = dialog_y + dialog_h - ui(36);
|
var by = dialog_y + dialog_h - ui(36);
|
||||||
|
|
||||||
b_apply.register();
|
b_apply.register();
|
||||||
b_apply.setActiveFocus(sFOCUS, sHOVER);
|
b_apply.setFocusHover(sFOCUS, sHOVER);
|
||||||
b_apply.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_lime);
|
b_apply.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_lime);
|
||||||
|
|
||||||
bx -= ui(48);
|
bx -= ui(48);
|
||||||
b_cancel.register();
|
b_cancel.register();
|
||||||
b_cancel.setActiveFocus(sFOCUS, sHOVER);
|
b_cancel.setFocusHover(sFOCUS, sHOVER);
|
||||||
b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide);
|
b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide);
|
||||||
#endregion
|
#endregion
|
|
@ -443,7 +443,7 @@ event_inherited();
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(ui(8), yy + th / 2, _pref[0]);
|
draw_text(ui(8), yy + th / 2, _pref[0]);
|
||||||
_pref[2].setActiveFocus(sFOCUS, sHOVER && sp_pref.hover);
|
_pref[2].setFocusHover(sFOCUS, sHOVER && sp_pref.hover);
|
||||||
|
|
||||||
switch(instanceof(_pref[2])) {
|
switch(instanceof(_pref[2])) {
|
||||||
case "textBox" :
|
case "textBox" :
|
||||||
|
|
|
@ -54,11 +54,11 @@ if !ready exit;
|
||||||
|
|
||||||
if(page_current == 0) {
|
if(page_current == 0) {
|
||||||
current_list = pref_global;
|
current_list = pref_global;
|
||||||
sp_pref.setActiveFocus(sHOVER, sFOCUS);
|
sp_pref.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_pref.draw(px, py);
|
sp_pref.draw(px, py);
|
||||||
} else if(page_current == 1) {
|
} else if(page_current == 1) {
|
||||||
current_list = pref_appr;
|
current_list = pref_appr;
|
||||||
sp_pref.setActiveFocus(sHOVER, sFOCUS);
|
sp_pref.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_pref.draw(px, py);
|
sp_pref.draw(px, py);
|
||||||
} else if(page_current == 2) {
|
} else if(page_current == 2) {
|
||||||
var _w = ui(200);
|
var _w = ui(200);
|
||||||
|
@ -79,16 +79,16 @@ if !ready exit;
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(x1 + ui(8), yy + _h / 2, __txt("Theme"));
|
draw_text(x1 + ui(8), yy + _h / 2, __txt("Theme"));
|
||||||
sb_theme.setActiveFocus(sFOCUS, sHOVER);
|
sb_theme.setFocusHover(sFOCUS, sHOVER);
|
||||||
sb_theme.draw(x2 - ui(24) - _w, yy, _w, _h, PREF_MAP[? "theme"]);
|
sb_theme.draw(x2 - ui(24) - _w, yy, _w, _h, PREF_MAP[? "theme"]);
|
||||||
|
|
||||||
sp_colors.setActiveFocus(sHOVER, sFOCUS);
|
sp_colors.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_colors.draw(px, py + ui(40));
|
sp_colors.draw(px, py + ui(40));
|
||||||
} else if(page_current == 3) {
|
} else if(page_current == 3) {
|
||||||
if(mouse_press(mb_left, sFOCUS))
|
if(mouse_press(mb_left, sFOCUS))
|
||||||
hk_editing = noone;
|
hk_editing = noone;
|
||||||
|
|
||||||
sp_hotkey.setActiveFocus(sHOVER, sFOCUS);
|
sp_hotkey.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_hotkey.draw(px, py);
|
sp_hotkey.draw(px, py);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
|
@ -17,7 +17,7 @@ if !ready exit;
|
||||||
var ph = dialog_h - ui(title_height + padding)
|
var ph = dialog_h - ui(title_height + padding)
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sc_presets.setActiveFocus(sFOCUS, sHOVER);
|
sc_presets.setFocusHover(sFOCUS, sHOVER);
|
||||||
sc_presets.draw(px, py);
|
sc_presets.draw(px, py);
|
||||||
|
|
||||||
var bx = dialog_x + dialog_w - ui(32 + 16);
|
var bx = dialog_x + dialog_w - ui(32 + 16);
|
||||||
|
|
|
@ -14,42 +14,42 @@ if !ready exit;
|
||||||
var yy = dialog_y + ui(64);
|
var yy = dialog_y + ui(64);
|
||||||
var ww = ui(128);
|
var ww = ui(128);
|
||||||
|
|
||||||
cb_enable.setActiveFocus(sFOCUS, sHOVER);
|
cb_enable.setFocusHover(sFOCUS, sHOVER);
|
||||||
cb_enable.register();
|
cb_enable.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txt("Enabled"));
|
draw_text(dialog_x + ui(32), yy, __txt("Enabled"));
|
||||||
cb_enable.draw(dialog_x + dialog_w - ui(24) - ww / 2, yy, PANEL_PREVIEW.grid_show, mouse_ui,, fa_center, fa_center);
|
cb_enable.draw(dialog_x + dialog_w - ui(24) - ww / 2, yy, PANEL_PREVIEW.grid_show, mouse_ui,, fa_center, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
cb_snap.setActiveFocus(sFOCUS, sHOVER);
|
cb_snap.setFocusHover(sFOCUS, sHOVER);
|
||||||
cb_snap.register();
|
cb_snap.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txtx("grid_snap", "Snap to grid"));
|
draw_text(dialog_x + ui(32), yy, __txtx("grid_snap", "Snap to grid"));
|
||||||
cb_snap.draw(dialog_x + dialog_w - ui(24) - ww / 2, yy, PANEL_PREVIEW.grid_snap, mouse_ui,, fa_center, fa_center);
|
cb_snap.draw(dialog_x + dialog_w - ui(24) - ww / 2, yy, PANEL_PREVIEW.grid_snap, mouse_ui,, fa_center, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
tb_width.setActiveFocus(sFOCUS, sHOVER);
|
tb_width.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_width.register();
|
tb_width.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txt("Grid width"));
|
draw_text(dialog_x + ui(32), yy, __txt("Grid width"));
|
||||||
tb_width.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_PREVIEW.grid_width, mouse_ui,, fa_right, fa_center);
|
tb_width.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_PREVIEW.grid_width, mouse_ui,, fa_right, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
tb_height.setActiveFocus(sFOCUS, sHOVER);
|
tb_height.setFocusHover(sFOCUS, sHOVER);
|
||||||
tb_height.register();
|
tb_height.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txt("Grid height"));
|
draw_text(dialog_x + ui(32), yy, __txt("Grid height"));
|
||||||
tb_height.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_PREVIEW.grid_height, mouse_ui,, fa_right, fa_center);
|
tb_height.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_PREVIEW.grid_height, mouse_ui,, fa_right, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
sl_opacity.setActiveFocus(sFOCUS, sHOVER);
|
sl_opacity.setFocusHover(sFOCUS, sHOVER);
|
||||||
sl_opacity.register();
|
sl_opacity.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txt("Grid opacity"));
|
draw_text(dialog_x + ui(32), yy, __txt("Grid opacity"));
|
||||||
sl_opacity.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_PREVIEW.grid_opacity, mouse_ui, ui(52), fa_right, fa_center);
|
sl_opacity.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PANEL_PREVIEW.grid_opacity, mouse_ui, ui(52), fa_right, fa_center);
|
||||||
|
|
||||||
yy += ui(40);
|
yy += ui(40);
|
||||||
cl_color.setActiveFocus(sFOCUS, sHOVER);
|
cl_color.setFocusHover(sFOCUS, sHOVER);
|
||||||
cl_color.register();
|
cl_color.register();
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
|
||||||
draw_text(dialog_x + ui(32), yy, __txt("Grid Color"));
|
draw_text(dialog_x + ui(32), yy, __txt("Grid Color"));
|
||||||
|
|
|
@ -13,6 +13,6 @@ if !ready exit;
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, dialog_x + ui(24), dialog_y + ui(48), dialog_w - ui(48), dialog_h - ui(72));
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, dialog_x + ui(24), dialog_y + ui(48), dialog_w - ui(48), dialog_h - ui(72));
|
||||||
|
|
||||||
sp_note.setActiveFocus(sHOVER, sFOCUS);
|
sp_note.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_note.draw(dialog_x + ui(40), dialog_y + ui(56));
|
sp_note.draw(dialog_x + ui(40), dialog_y + ui(56));
|
||||||
#endregion
|
#endregion
|
|
@ -3,11 +3,11 @@
|
||||||
draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h);
|
draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h);
|
||||||
|
|
||||||
WIDGET_CURRENT = tb_search;
|
WIDGET_CURRENT = tb_search;
|
||||||
tb_search.setActiveFocus(true, true);
|
tb_search.setFocusHover(true, true);
|
||||||
tb_search.draw(dialog_x + ui(8), dialog_y + ui(8), dialog_w - ui(16), ui(24), search_string);
|
tb_search.draw(dialog_x + ui(8), dialog_y + ui(8), dialog_w - ui(16), ui(24), search_string);
|
||||||
tb_search.sprite_index = 0;
|
tb_search.sprite_index = 0;
|
||||||
|
|
||||||
sc_content.setActiveFocus(sHOVER, sFOCUS);
|
sc_content.setFocusHover(sFOCUS, sHOVER);
|
||||||
sc_content.draw(dialog_x, dialog_y + ui(16 + 24));
|
sc_content.draw(dialog_x, dialog_y + ui(16 + 24));
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h);
|
draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h);
|
||||||
|
|
|
@ -43,7 +43,7 @@ if !ready exit;
|
||||||
draw_set_text(f_p0, fa_left, fa_bottom, COLORS._main_text_sub);
|
draw_set_text(f_p0, fa_left, fa_bottom, COLORS._main_text_sub);
|
||||||
draw_text(x0, y0 - ui(4), __txt("Recent files"));
|
draw_text(x0, y0 - ui(4), __txt("Recent files"));
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 0, x0, y0, x1 - x0, y1 - y0);
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, x0, y0, x1 - x0, y1 - y0);
|
||||||
sp_recent.setActiveFocus(sFOCUS, sHOVER);
|
sp_recent.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_recent.draw(x0 + ui(6), y0);
|
sp_recent.draw(x0 + ui(6), y0);
|
||||||
draw_sprite_stretched(THEME.ui_panel_fg, 0, x0, y0, x1 - x0, y1 - y0);
|
draw_sprite_stretched(THEME.ui_panel_fg, 0, x0, y0, x1 - x0, y1 - y0);
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ if !ready exit;
|
||||||
|
|
||||||
switch(pages[project_page]) {
|
switch(pages[project_page]) {
|
||||||
case "Sample projects" :
|
case "Sample projects" :
|
||||||
sp_sample.setActiveFocus(sFOCUS, sHOVER);
|
sp_sample.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_sample.draw(x0 + ui(6), y0);
|
sp_sample.draw(x0 + ui(6), y0);
|
||||||
|
|
||||||
if(!expand) {
|
if(!expand) {
|
||||||
|
@ -163,7 +163,7 @@ if !ready exit;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "Workshop" :
|
case "Workshop" :
|
||||||
sp_sample.setActiveFocus(sFOCUS, sHOVER);
|
sp_sample.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_sample.draw(x0 + ui(6), y0);
|
sp_sample.draw(x0 + ui(6), y0);
|
||||||
|
|
||||||
var bx = x1 - ui(32);
|
var bx = x1 - ui(32);
|
||||||
|
@ -177,7 +177,7 @@ if !ready exit;
|
||||||
steamUCGload();
|
steamUCGload();
|
||||||
break;
|
break;
|
||||||
case "Contests" :
|
case "Contests" :
|
||||||
sp_contest.setActiveFocus(sFOCUS, sHOVER);
|
sp_contest.setFocusHover(sFOCUS, sHOVER);
|
||||||
sp_contest.draw(x0 + ui(6), y0);
|
sp_contest.draw(x0 + ui(6), y0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ if !ready exit;
|
||||||
if(search_string == "")
|
if(search_string == "")
|
||||||
tb_search.sprite_index = 1;
|
tb_search.sprite_index = 1;
|
||||||
|
|
||||||
sc_tunnel.setActiveFocus(sFOCUS, sHOVER);
|
sc_tunnel.setFocusHover(sFOCUS, sHOVER);
|
||||||
sc_tunnel.draw(px, py + ui(40));
|
sc_tunnel.draw(px, py + ui(40));
|
||||||
|
|
||||||
var bx = dialog_x + dialog_w - ui(32 + 16);
|
var bx = dialog_x + dialog_w - ui(32 + 16);
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = 0) constructor {
|
function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length = 0, attributes = {}) constructor {
|
||||||
|
id = UUID_generate();
|
||||||
self.name = "New bone";
|
self.name = "New bone";
|
||||||
self.distance = distance;
|
self.distance = distance;
|
||||||
self.direction = direction;
|
self.direction = direction;
|
||||||
|
@ -9,6 +10,13 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
|
||||||
self.parent_anchor = true;
|
self.parent_anchor = true;
|
||||||
self.childs = [];
|
self.childs = [];
|
||||||
|
|
||||||
|
tb_name = new textBox(TEXTBOX_INPUT.text, function(_name) { name = _name; });
|
||||||
|
tb_name.font = f_p2;
|
||||||
|
tb_name.hide = true;
|
||||||
|
|
||||||
|
self.attributes = attributes;
|
||||||
|
updated = false;
|
||||||
|
|
||||||
self.parent = parent;
|
self.parent = parent;
|
||||||
if(parent != noone) {
|
if(parent != noone) {
|
||||||
distance = parent.length;
|
distance = parent.length;
|
||||||
|
@ -21,6 +29,13 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static childCount = function() {
|
||||||
|
var amo = array_length(childs);
|
||||||
|
for( var i = 0; i < array_length(childs); i++ )
|
||||||
|
amo += childs[i].childCount();
|
||||||
|
return amo;
|
||||||
|
}
|
||||||
|
|
||||||
static getPoint = function(distance, direction) {
|
static getPoint = function(distance, direction) {
|
||||||
if(parent == noone)
|
if(parent == noone)
|
||||||
return new Point(lengthdir_x(self.distance, self.direction), lengthdir_y(self.distance, self.direction))
|
return new Point(lengthdir_x(self.distance, self.direction), lengthdir_y(self.distance, self.direction))
|
||||||
|
@ -60,18 +75,23 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
|
||||||
draw_line_width2(p0.x, p0.y, p1.x, p1.y, 6, 2);
|
draw_line_width2(p0.x, p0.y, p1.x, p1.y, 6, 2);
|
||||||
draw_set_alpha(1.00);
|
draw_set_alpha(1.00);
|
||||||
|
|
||||||
if(edit && distance_to_line(_mx, _my, p0.x, p0.y, p1.x, p1.y) <= 6) //drag bone
|
if(attributes.display_name) {
|
||||||
|
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_accent);
|
||||||
|
draw_text((p0.x + p1.x) / 2 + 4, (p0.y + p1.y) / 2, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(edit && distance_to_line(_mx, _my, p0.x, p0.y, p1.x, p1.y) <= 12) //drag bone
|
||||||
hover = [ self, 2 ];
|
hover = [ self, 2 ];
|
||||||
|
|
||||||
if(!parent_anchor) {
|
if(!parent_anchor) {
|
||||||
if(edit && point_in_circle(_mx, _my, p0.x, p0.y, ui(12))) { //drag head
|
if(edit && point_in_circle(_mx, _my, p0.x, p0.y, ui(20))) { //drag head
|
||||||
draw_sprite_colored(THEME.anchor_selector, 0, p0.x, p0.y);
|
draw_sprite_colored(THEME.anchor_selector, 0, p0.x, p0.y);
|
||||||
hover = [ self, 0 ];
|
hover = [ self, 0 ];
|
||||||
} else
|
} else
|
||||||
draw_sprite_colored(THEME.anchor_selector, 2, p0.x, p0.y);
|
draw_sprite_colored(THEME.anchor_selector, 2, p0.x, p0.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(edit && point_in_circle(_mx, _my, p1.x, p1.y, ui(12))) { //drag tail
|
if(edit && point_in_circle(_mx, _my, p1.x, p1.y, ui(20))) { //drag tail
|
||||||
draw_sprite_colored(THEME.anchor_selector, 0, p1.x, p1.y);
|
draw_sprite_colored(THEME.anchor_selector, 0, p1.x, p1.y);
|
||||||
hover = [ self, 1 ];
|
hover = [ self, 1 ];
|
||||||
} else
|
} else
|
||||||
|
@ -80,7 +100,7 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
|
||||||
|
|
||||||
if(child)
|
if(child)
|
||||||
for( var i = 0; i < array_length(childs); i++ ) {
|
for( var i = 0; i < array_length(childs); i++ ) {
|
||||||
var h = childs[i].draw(edit, _x, _y, _s, _mx, _my, true, hovering)
|
var h = childs[i].draw(edit, _x, _y, _s, _mx, _my, true, hovering);
|
||||||
if(hover == noone && h != noone)
|
if(hover == noone && h != noone)
|
||||||
hover = h;
|
hover = h;
|
||||||
}
|
}
|
||||||
|
@ -88,9 +108,30 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
|
||||||
return hover;
|
return hover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static drawInspector = function(_x, _y, _w, _m, _hover, _focus) {
|
||||||
|
var _h = ui(28);
|
||||||
|
|
||||||
|
//draw_sprite_stretched(THEME.node_bg, 0, _x, _y, _w, _h);
|
||||||
|
draw_sprite_ui(THEME.bone, 0, _x + 12, _y + 12,,,, COLORS._main_icon);
|
||||||
|
tb_name.setFocusHover(_focus, _hover);
|
||||||
|
tb_name.draw(_x + 24, _y + 2, _w - 24 - 8, _h - 4, name, _m);
|
||||||
|
|
||||||
|
_y += _h;
|
||||||
|
|
||||||
|
draw_set_color(COLORS.node_composite_separator);
|
||||||
|
draw_line(_x + 16, _y, _x + _w - 16, _y);
|
||||||
|
|
||||||
|
for( var i = 0; i < array_length(childs); i++ ) {
|
||||||
|
_y = childs[i].drawInspector(_x + ui(16), _y, _w - ui(16), _m, _hover, _focus);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _y;
|
||||||
|
}
|
||||||
|
|
||||||
static serialize = function() {
|
static serialize = function() {
|
||||||
var bone = {};
|
var bone = {};
|
||||||
|
|
||||||
|
bone.id = id;
|
||||||
bone.name = name;
|
bone.name = name;
|
||||||
bone.distance = distance;
|
bone.distance = distance;
|
||||||
bone.direction = direction;
|
bone.direction = direction;
|
||||||
|
@ -107,7 +148,8 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
|
||||||
return bone;
|
return bone;
|
||||||
}
|
}
|
||||||
|
|
||||||
static deserialize = function(bone) {
|
static deserialize = function(bone, attributes) {
|
||||||
|
id = bone.id;
|
||||||
name = bone.name;
|
name = bone.name;
|
||||||
distance = bone.distance;
|
distance = bone.distance;
|
||||||
direction = bone.direction;
|
direction = bone.direction;
|
||||||
|
@ -117,12 +159,25 @@ function __Bone(parent = noone, distance = 0, direction = 0, angle = 0, length =
|
||||||
is_main = bone.is_main;
|
is_main = bone.is_main;
|
||||||
parent_anchor = bone.parent_anchor;
|
parent_anchor = bone.parent_anchor;
|
||||||
|
|
||||||
|
self.attributes = attributes;
|
||||||
|
|
||||||
childs = [];
|
childs = [];
|
||||||
for( var i = 0; i < array_length(bone.childs); i++ ) {
|
for( var i = 0; i < array_length(bone.childs); i++ ) {
|
||||||
var _b = new __Bone().deserialize(bone.childs[i]);
|
var _b = new __Bone().deserialize(bone.childs[i], attributes);
|
||||||
addChild(_b);
|
addChild(_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static clone = function(attributes) {
|
||||||
|
var _b = new __Bone(parent, distance, direction, angle, length, attributes);
|
||||||
|
_b.is_main = is_main;
|
||||||
|
_b.parent_anchor = parent_anchor;
|
||||||
|
|
||||||
|
for( var i = 0; i < array_length(childs); i++ )
|
||||||
|
_b.addChild(childs[i].clone(attributes));
|
||||||
|
|
||||||
|
return _b;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -887,7 +887,7 @@
|
||||||
[ "__widget_wake", function(wd, hover, focus) {
|
[ "__widget_wake", function(wd, hover, focus) {
|
||||||
if(!ds_map_exists(global.ADDON_WIDGET, wd)) return;
|
if(!ds_map_exists(global.ADDON_WIDGET, wd)) return;
|
||||||
|
|
||||||
global.ADDON_WIDGET[? wd].setActiveFocus(focus, hover);
|
global.ADDON_WIDGET[? wd].setFocusHover(focus, hover);
|
||||||
} ],
|
} ],
|
||||||
|
|
||||||
[ "__textBox", function(ID, type, onModify) {
|
[ "__textBox", function(ID, type, onModify) {
|
||||||
|
|
|
@ -224,7 +224,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
for(var i = 0; i < 4; i++) {
|
for(var i = 0; i < 4; i++) {
|
||||||
tb[i].setActiveFocus(hover, active);
|
tb[i].setFocusHover(active, hover);
|
||||||
tb[i].align = fa_center;
|
tb[i].align = fa_center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(unit != noone && unit.reference != noone) {
|
if(unit != noone && unit.reference != noone) {
|
||||||
unit.triggerButton.setActiveFocus(hover, active);
|
unit.triggerButton.setFocusHover(active, hover);
|
||||||
unit.draw(_x + ui(56 + 48 + 8), _y - ui(28), ui(32), ui(32), _m);
|
unit.draw(_x + ui(56 + 48 + 8), _y - ui(28), ui(32), ui(32), _m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor {
|
||||||
current_color = toNumber(_color);
|
current_color = toNumber(_color);
|
||||||
|
|
||||||
if(interactable) {
|
if(interactable) {
|
||||||
b_picker.setActiveFocus(hover, active);
|
b_picker.setFocusHover(active, hover);
|
||||||
b_picker.draw(_x + _w - ui(32), _y + _h / 2 - ui(16), ui(32), ui(32), _m, THEME.button_hide);
|
b_picker.draw(_x + _w - ui(32), _y + _h / 2 - ui(16), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
b_picker.icon_blend = c_white;
|
b_picker.icon_blend = c_white;
|
||||||
b_picker.icon_index = 0;
|
b_picker.icon_index = 0;
|
||||||
|
|
|
@ -60,7 +60,7 @@ function buttonGroupClass(_data, _onClick) : widget() constructor {
|
||||||
|
|
||||||
if(display_button) {
|
if(display_button) {
|
||||||
for(var i = 0; i < amo; i++) {
|
for(var i = 0; i < amo; i++) {
|
||||||
buttons[i].setActiveFocus(hover, active);
|
buttons[i].setFocusHover(active, hover);
|
||||||
|
|
||||||
var bx = _x + ww * i;
|
var bx = _x + ww * i;
|
||||||
var spr = i == 0 ? buttonSpr[0] : (i == amo - 1? buttonSpr[2] : buttonSpr[1]);
|
var spr = i == 0 ? buttonSpr[0] : (i == amo - 1? buttonSpr[2] : buttonSpr[1]);
|
||||||
|
@ -89,7 +89,7 @@ function buttonGroupClass(_data, _onClick) : widget() constructor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sb_small.setActiveFocus(hover, active);
|
sb_small.setFocusHover(active, hover);
|
||||||
sb_small.draw(_x, _y, _w, _h, data[_selecting], _m, _rx, _ry);
|
sb_small.draw(_x, _y, _w, _h, data[_selecting], _m, _rx, _ry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ function colorSelector(onApply = noone) constructor {
|
||||||
var tx = hue_x + ui(36);
|
var tx = hue_x + ui(36);
|
||||||
var ty = _y + ui(4);
|
var ty = _y + ui(4);
|
||||||
|
|
||||||
scr_disp.setActiveFocus(hover, focus);
|
scr_disp.setFocusHover(focus, hover);
|
||||||
scr_disp.draw(tx, ty, ui(190), ui(32), disp_mode, mouse_ui);
|
scr_disp.draw(tx, ty, ui(190), ui(32), disp_mode, mouse_ui);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -247,9 +247,9 @@ function colorSelector(onApply = noone) constructor {
|
||||||
draw_text(data_x, data_y + ui(36 * 1 + 15), "S")
|
draw_text(data_x, data_y + ui(36 * 1 + 15), "S")
|
||||||
draw_text(data_x, data_y + ui(36 * 2 + 15), "V");
|
draw_text(data_x, data_y + ui(36 * 2 + 15), "V");
|
||||||
|
|
||||||
tb_hue.setActiveFocus(hover, focus);
|
tb_hue.setFocusHover(focus, hover);
|
||||||
tb_sat.setActiveFocus(hover, focus);
|
tb_sat.setFocusHover(focus, hover);
|
||||||
tb_val.setActiveFocus(hover, focus);
|
tb_val.setFocusHover(focus, hover);
|
||||||
|
|
||||||
tb_hue.draw(data_x + ui(28), data_y + ui(36 * 0), ui(160), ui(30), round(color_get_hue(current_color)), mouse_ui);
|
tb_hue.draw(data_x + ui(28), data_y + ui(36 * 0), ui(160), ui(30), round(color_get_hue(current_color)), mouse_ui);
|
||||||
tb_sat.draw(data_x + ui(28), data_y + ui(36 * 1), ui(160), ui(30), round(color_get_saturation(current_color)), mouse_ui);
|
tb_sat.draw(data_x + ui(28), data_y + ui(36 * 1), ui(160), ui(30), round(color_get_saturation(current_color)), mouse_ui);
|
||||||
|
@ -262,9 +262,9 @@ function colorSelector(onApply = noone) constructor {
|
||||||
draw_text(data_x, data_y + ui(36 * 1 + 15), "G");
|
draw_text(data_x, data_y + ui(36 * 1 + 15), "G");
|
||||||
draw_text(data_x, data_y + ui(36 * 2 + 15), "B");
|
draw_text(data_x, data_y + ui(36 * 2 + 15), "B");
|
||||||
|
|
||||||
tb_red.setActiveFocus(hover, focus);
|
tb_red.setFocusHover(focus, hover);
|
||||||
tb_green.setActiveFocus(hover, focus);
|
tb_green.setFocusHover(focus, hover);
|
||||||
tb_blue.setActiveFocus(hover, focus);
|
tb_blue.setFocusHover(focus, hover);
|
||||||
|
|
||||||
tb_red.draw (data_x + ui(28), data_y + ui(36 * 0), ui(160), ui(30), color_get_red(current_color), mouse_ui);
|
tb_red.draw (data_x + ui(28), data_y + ui(36 * 0), ui(160), ui(30), color_get_red(current_color), mouse_ui);
|
||||||
tb_green.draw(data_x + ui(28), data_y + ui(36 * 1), ui(160), ui(30), color_get_green(current_color), mouse_ui);
|
tb_green.draw(data_x + ui(28), data_y + ui(36 * 1), ui(160), ui(30), color_get_green(current_color), mouse_ui);
|
||||||
|
|
|
@ -56,7 +56,7 @@ function controlPointBox(_onModify) : widget() constructor {
|
||||||
y = _y;
|
y = _y;
|
||||||
|
|
||||||
for( var i = 0; i < array_length(widgets); i++ )
|
for( var i = 0; i < array_length(widgets); i++ )
|
||||||
widgets[i].setActiveFocus(hover, active);
|
widgets[i].setFocusHover(active, hover);
|
||||||
|
|
||||||
var yy = _y;
|
var yy = _y;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ function fontScrollBox(_onModify) : widget() constructor {
|
||||||
|
|
||||||
w = _w;
|
w = _w;
|
||||||
if(extra_button != noone) {
|
if(extra_button != noone) {
|
||||||
extra_button.setActiveFocus(hover, active);
|
extra_button.setFocusHover(active, hover);
|
||||||
extra_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
extra_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
w -= ui(40);
|
w -= ui(40);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,9 +30,9 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry
|
||||||
hh += ui(10);
|
hh += ui(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
_edit.tb_name.setActiveFocus(focus, hover);
|
_edit.tb_name.setFocusHover(focus, hover);
|
||||||
_edit.sc_type.setActiveFocus(focus, hover);
|
_edit.sc_type.setFocusHover(focus, hover);
|
||||||
_edit.sc_disp.setActiveFocus(focus, hover);
|
_edit.sc_disp.setFocusHover(focus, hover);
|
||||||
|
|
||||||
_edit.tb_name.draw(wd_x, yy, wd_w - wd_h - ui(4), wd_h, _inpu.name, _m, TEXTBOX_INPUT.text);
|
_edit.tb_name.draw(wd_x, yy, wd_w - wd_h - ui(4), wd_h, _inpu.name, _m, TEXTBOX_INPUT.text);
|
||||||
if(buttonInstant(THEME.button_hide, wd_x + wd_w - wd_h, yy + ui(2), wd_h, wd_h, _m, focus, hover,, THEME.icon_delete,, COLORS._main_value_negative) == 2)
|
if(buttonInstant(THEME.button_hide, wd_x + wd_w - wd_h, yy + ui(2), wd_h, wd_h, _m, focus, hover,, THEME.icon_delete,, COLORS._main_value_negative) == 2)
|
||||||
|
|
|
@ -14,11 +14,11 @@ function luaArgumentRenderer() {
|
||||||
var _typ = _jType.getValue();
|
var _typ = _jType.getValue();
|
||||||
var _h = 0;
|
var _h = 0;
|
||||||
|
|
||||||
_jType.editWidget.setActiveFocus(_focus, _hover);
|
_jType.editWidget.setFocusHover(_focus, _hover);
|
||||||
_jType.editWidget.draw(tx, ty, ui(128), _th, _jType.display_data[_jType.showValue()], _m, argument_renderer.rx, argument_renderer.ry);
|
_jType.editWidget.draw(tx, ty, ui(128), _th, _jType.display_data[_jType.showValue()], _m, argument_renderer.rx, argument_renderer.ry);
|
||||||
|
|
||||||
var _jName = inputs[| i + 0];
|
var _jName = inputs[| i + 0];
|
||||||
_jName.editWidget.setActiveFocus(_focus, _hover);
|
_jName.editWidget.setFocusHover(_focus, _hover);
|
||||||
_jName.editWidget.draw(tx + ui(128 + 8), ty, _w - ui(128 + 8), _th, _jName.showValue(), _m, _jName.display_type);
|
_jName.editWidget.draw(tx + ui(128 + 8), ty, _w - ui(128 + 8), _th, _jName.showValue(), _m, _jName.display_type);
|
||||||
|
|
||||||
_h += _th + ui(6);
|
_h += _th + ui(6);
|
||||||
|
@ -28,7 +28,7 @@ function luaArgumentRenderer() {
|
||||||
|
|
||||||
var _jValue = inputs[| i + 2];
|
var _jValue = inputs[| i + 2];
|
||||||
if(_jValue.editWidget != noone) {
|
if(_jValue.editWidget != noone) {
|
||||||
_jValue.editWidget.setActiveFocus(_focus, _hover);
|
_jValue.editWidget.setFocusHover(_focus, _hover);
|
||||||
if(_typ == 2) {
|
if(_typ == 2) {
|
||||||
_jValue.editWidget.draw(tx + ui(64), ty + _th + ui(6), _w - ui(64), ui(96), _jValue.showValue(), _m, argument_renderer.rx, argument_renderer.ry);
|
_jValue.editWidget.draw(tx + ui(64), ty + _th + ui(6), _w - ui(64), ui(96), _jValue.showValue(), _m, argument_renderer.rx, argument_renderer.ry);
|
||||||
_h += ui(96 + 8);
|
_h += ui(96 + 8);
|
||||||
|
|
|
@ -74,7 +74,7 @@ function matrixGrid(_type, _onModify, _unit = noone) : widget() constructor {
|
||||||
h = _h;
|
h = _h;
|
||||||
|
|
||||||
if(extras && instanceof(extras) == "buttonClass") {
|
if(extras && instanceof(extras) == "buttonClass") {
|
||||||
extras.setActiveFocus(hover, active);
|
extras.setFocusHover(active, hover);
|
||||||
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
_w -= ui(40);
|
_w -= ui(40);
|
||||||
}
|
}
|
||||||
|
@ -82,12 +82,12 @@ function matrixGrid(_type, _onModify, _unit = noone) : widget() constructor {
|
||||||
if(unit != noone && unit.reference != noone) {
|
if(unit != noone && unit.reference != noone) {
|
||||||
_w += ui(4);
|
_w += ui(4);
|
||||||
|
|
||||||
unit.triggerButton.setActiveFocus(ihover, iactive);
|
unit.triggerButton.setFocusHover(iactive, ihover);
|
||||||
unit.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m);
|
unit.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m);
|
||||||
_w -= ui(40);
|
_w -= ui(40);
|
||||||
}
|
}
|
||||||
|
|
||||||
b_link.setActiveFocus(hover, active);
|
b_link.setFocusHover(active, hover);
|
||||||
b_link.icon_index = linked;
|
b_link.icon_index = linked;
|
||||||
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
||||||
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
||||||
|
@ -107,7 +107,7 @@ function matrixGrid(_type, _onModify, _unit = noone) : widget() constructor {
|
||||||
for(var i = 0; i < 3; i++)
|
for(var i = 0; i < 3; i++)
|
||||||
for(var j = 0; j < 3; j++) {
|
for(var j = 0; j < 3; j++) {
|
||||||
var ind = i * 3 + j;
|
var ind = i * 3 + j;
|
||||||
tb[ind].setActiveFocus(hover, active);
|
tb[ind].setFocusHover(active, hover);
|
||||||
|
|
||||||
var bx = _x + ww * j;
|
var bx = _x + ww * j;
|
||||||
var by = _y + hh * i;
|
var by = _y + hh * i;
|
||||||
|
|
|
@ -194,13 +194,13 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
||||||
var expValid = jun.expTree != noone && jun.expTree.validate();
|
var expValid = jun.expTree != noone && jun.expTree.validate();
|
||||||
jun.express_edit.boxColor = expValid? COLORS._main_value_positive : COLORS._main_value_negative;
|
jun.express_edit.boxColor = expValid? COLORS._main_value_positive : COLORS._main_value_negative;
|
||||||
|
|
||||||
jun.express_edit.setActiveFocus(_focus, _hover);
|
jun.express_edit.setFocusHover(_focus, _hover);
|
||||||
if(_focus) jun.express_edit.register(_scrollPane);
|
if(_focus) jun.express_edit.register(_scrollPane);
|
||||||
|
|
||||||
var wd_h = jun.express_edit.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.expression, _m);
|
var wd_h = jun.express_edit.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.expression, _m);
|
||||||
widH = lineBreak? wd_h : 0;
|
widH = lineBreak? wd_h : 0;
|
||||||
} else if(jun.editWidget) {
|
} else if(jun.editWidget) {
|
||||||
jun.editWidget.setActiveFocus(_focus, _hover);
|
jun.editWidget.setFocusHover(_focus, _hover);
|
||||||
|
|
||||||
if(jun.connect_type == JUNCTION_CONNECT.input) {
|
if(jun.connect_type == JUNCTION_CONNECT.input) {
|
||||||
jun.editWidget.setInteract(jun.value_from == noone);
|
jun.editWidget.setInteract(jun.value_from == noone);
|
||||||
|
@ -209,6 +209,18 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
||||||
jun.editWidget.setInteract(false);
|
jun.editWidget.setInteract(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var param = {
|
||||||
|
x: editBoxX,
|
||||||
|
y: editBoxY,
|
||||||
|
real_x: rx,
|
||||||
|
real_y: ry,
|
||||||
|
w: editBoxW,
|
||||||
|
h: editBoxH,
|
||||||
|
|
||||||
|
data: jun.showValue(),
|
||||||
|
mouse: _m,
|
||||||
|
}
|
||||||
|
|
||||||
switch(jun.display_type) {
|
switch(jun.display_type) {
|
||||||
case VALUE_DISPLAY.button :
|
case VALUE_DISPLAY.button :
|
||||||
jun.editWidget.draw(editBoxX, editBoxY, editBoxW, editBoxH, _m);
|
jun.editWidget.draw(editBoxX, editBoxY, editBoxW, editBoxH, _m);
|
||||||
|
@ -257,6 +269,9 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
||||||
var ebH = jun.editWidget.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.showValue(), _m);
|
var ebH = jun.editWidget.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.showValue(), _m);
|
||||||
widH = lineBreak? ebH : ebH - lb_h;
|
widH = lineBreak? ebH : ebH - lb_h;
|
||||||
break;
|
break;
|
||||||
|
case VALUE_DISPLAY.transform :
|
||||||
|
widH = jun.editWidget.drawParam(param);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VALUE_TYPE.boolean :
|
case VALUE_TYPE.boolean :
|
||||||
|
|
|
@ -3,11 +3,38 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
|
|
||||||
//inputs[| 0] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
|
//inputs[| 0] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
|
||||||
|
|
||||||
|
bone_renderer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus) {
|
||||||
|
var _b = attributes.bones;
|
||||||
|
var amo = _b.childCount();
|
||||||
|
var _h = ui(32 + 16) + amo * ui(28);
|
||||||
|
|
||||||
|
draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text);
|
||||||
|
draw_text_add(_x + ui(16), _y + ui(4), "Bones");
|
||||||
|
|
||||||
|
_y += ui(32);
|
||||||
|
|
||||||
|
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _h, COLORS.node_composite_bg_blend, 1);
|
||||||
|
draw_set_color(COLORS.node_composite_separator);
|
||||||
|
draw_line(_x + 16, _y + ui(8), _x + _w - 16, _y + ui(8));
|
||||||
|
|
||||||
|
_y += ui(8);
|
||||||
|
|
||||||
|
for( var i = 0; i < array_length(_b.childs); i++ ) {
|
||||||
|
_y = _b.childs[i].drawInspector(_x + ui(8), _y, _w - ui(16), _m, _hover, _focus);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _h;
|
||||||
|
})
|
||||||
|
|
||||||
|
input_display_list = [
|
||||||
|
bone_renderer,
|
||||||
|
];
|
||||||
|
|
||||||
input_fix_len = ds_list_size(inputs);
|
input_fix_len = ds_list_size(inputs);
|
||||||
data_length = 1;
|
data_length = 1;
|
||||||
|
|
||||||
static createBone = function(parent, distance, direction) {
|
static createBone = function(parent, distance, direction) {
|
||||||
var bone = new __Bone(parent, distance, direction);
|
var bone = new __Bone(parent, distance, direction,,, attributes);
|
||||||
parent.addChild(bone);
|
parent.addChild(bone);
|
||||||
|
|
||||||
if(parent == attributes.bones)
|
if(parent == attributes.bones)
|
||||||
|
@ -17,8 +44,16 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.output, VALUE_TYPE.armature, noone);
|
outputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.output, VALUE_TYPE.armature, noone);
|
||||||
|
|
||||||
attributes.bones = new __Bone();
|
attributes.bones = new __Bone(,,,,, attributes);
|
||||||
|
attributes.bones.name = "Main";
|
||||||
attributes.bones.is_main = true;
|
attributes.bones.is_main = true;
|
||||||
|
bone_update = false;
|
||||||
|
|
||||||
|
attributes.display_name = true;
|
||||||
|
array_push(attributeEditors, ["Display name", "display_name",
|
||||||
|
new checkBox(function() {
|
||||||
|
attributes.display_name = !attributes.display_name;
|
||||||
|
})]);
|
||||||
|
|
||||||
tools = [
|
tools = [
|
||||||
new NodeTool( "Add bones", THEME.path_tools_transform ),
|
new NodeTool( "Add bones", THEME.path_tools_transform ),
|
||||||
|
@ -95,8 +130,10 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mouse_release(mb_left))
|
if(mouse_release(mb_left)) {
|
||||||
builder_bone = noone;
|
builder_bone = noone;
|
||||||
|
UNDO_HOLDING = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isUsingTool(0)) { // builder
|
if(isUsingTool(0)) { // builder
|
||||||
|
@ -106,14 +143,16 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
builder_type = 1;
|
builder_type = 1;
|
||||||
builder_sx = mx;
|
builder_sx = mx;
|
||||||
builder_sy = my;
|
builder_sy = my;
|
||||||
|
UNDO_HOLDING = true;
|
||||||
} else if(anchor_selecting[1] == 1) {
|
} else if(anchor_selecting[1] == 1) {
|
||||||
builder_bone = createBone(anchor_selecting[0], 0, 0);
|
builder_bone = createBone(anchor_selecting[0], 0, 0);
|
||||||
builder_type = 1;
|
builder_type = 1;
|
||||||
builder_sx = mx;
|
builder_sx = mx;
|
||||||
builder_sy = my;
|
builder_sy = my;
|
||||||
|
UNDO_HOLDING = true;
|
||||||
} else if(anchor_selecting[1] == 2) {
|
} else if(anchor_selecting[1] == 2) {
|
||||||
var _pr = anchor_selecting[0];
|
var _pr = anchor_selecting[0];
|
||||||
var _md = new __Bone(noone, 0, 0, _pr.angle, _pr.length / 2);
|
var _md = new __Bone(noone, 0, 0, _pr.angle, _pr.length / 2, attributes);
|
||||||
_pr.length = _md.length;
|
_pr.length = _md.length;
|
||||||
|
|
||||||
for( var i = 0; i < array_length(_pr.childs); i++ )
|
for( var i = 0; i < array_length(_pr.childs); i++ )
|
||||||
|
@ -121,6 +160,9 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
|
|
||||||
_pr.childs = [];
|
_pr.childs = [];
|
||||||
_pr.addChild(_md);
|
_pr.addChild(_md);
|
||||||
|
|
||||||
|
bone_update = true;
|
||||||
|
UNDO_HOLDING = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(isUsingTool(1)) { //remover
|
} else if(isUsingTool(1)) { //remover
|
||||||
|
@ -135,6 +177,8 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
var _ch = _bone.childs[i];
|
var _ch = _bone.childs[i];
|
||||||
_par.addChild(_ch);
|
_par.addChild(_ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bone_update = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(isUsingTool(2)) { //detach
|
} else if(isUsingTool(2)) { //detach
|
||||||
|
@ -151,6 +195,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
builder_sy = lengthdir_y(par.length, par.angle);
|
builder_sy = lengthdir_y(par.length, par.angle);
|
||||||
builder_mx = mx;
|
builder_mx = mx;
|
||||||
builder_my = my;
|
builder_my = my;
|
||||||
|
UNDO_HOLDING = true;
|
||||||
}
|
}
|
||||||
} else { //mover
|
} else { //mover
|
||||||
if(anchor_selecting != noone && mouse_press(mb_left, active)) {
|
if(anchor_selecting != noone && mouse_press(mb_left, active)) {
|
||||||
|
@ -176,10 +221,21 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
builder_my = my;
|
builder_my = my;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UNDO_HOLDING = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static step = function() {
|
||||||
|
if(bone_update) {
|
||||||
|
attributes.bone.updated = true;
|
||||||
|
bone_update = false;
|
||||||
|
} else {
|
||||||
|
attributes.bone.updated = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static update = function(frame = ANIMATOR.current_frame) {
|
static update = function(frame = ANIMATOR.current_frame) {
|
||||||
outputs[| 0].setValue(attributes.bones);
|
outputs[| 0].setValue(attributes.bones);
|
||||||
}
|
}
|
||||||
|
@ -190,7 +246,7 @@ function Node_Armature(_x, _y, _group = noone) : Node(_x, _y, _group) constructo
|
||||||
|
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() {
|
||||||
if(!struct_has(load_map, "bone")) return;
|
if(!struct_has(load_map, "bone")) return;
|
||||||
attributes.bones.deserialize(load_map.bone);
|
attributes.bones.deserialize(load_map.bone, attributes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,28 +3,254 @@ function Node_Armature_Pose(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.input, VALUE_TYPE.armature, noone);
|
inputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.input, VALUE_TYPE.armature, noone);
|
||||||
|
|
||||||
|
input_display_list = [ 0,
|
||||||
|
["Bones", false]
|
||||||
|
]
|
||||||
|
|
||||||
input_fix_len = ds_list_size(inputs);
|
input_fix_len = ds_list_size(inputs);
|
||||||
data_length = 1;
|
data_length = 1;
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.output, VALUE_TYPE.armature, noone);
|
outputs[| 0] = nodeValue("Armature", self, JUNCTION_CONNECT.output, VALUE_TYPE.armature, noone);
|
||||||
|
|
||||||
|
boneMap = ds_map_create();
|
||||||
|
|
||||||
|
attributes.display_name = true;
|
||||||
|
array_push(attributeEditors, ["Display name", "display_name",
|
||||||
|
new checkBox(function() {
|
||||||
|
attributes.display_name = !attributes.display_name;
|
||||||
|
})]);
|
||||||
|
|
||||||
|
function createNewControl(bone = noone) {
|
||||||
|
var index = ds_list_size(inputs);
|
||||||
|
|
||||||
|
inputs[| index] = nodeValue(bone != noone? bone.name : "bone", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 1 ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.transform);
|
||||||
|
inputs[| index].extra_data[0] = bone != noone? bone.id : noone;
|
||||||
|
|
||||||
|
if(bone != noone)
|
||||||
|
boneMap[? bone.id] = inputs[| index];
|
||||||
|
|
||||||
|
array_push(input_display_list, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setBone() {
|
||||||
|
var _b = inputs[| 0].getValue();
|
||||||
|
if(_b == noone) return;
|
||||||
|
|
||||||
|
var _bones = [];
|
||||||
|
var _bst = ds_stack_create();
|
||||||
|
ds_stack_push(_bst, _b);
|
||||||
|
|
||||||
|
while(!ds_stack_empty(_bst)) {
|
||||||
|
var __b = ds_stack_pop(_bst);
|
||||||
|
|
||||||
|
for( var i = 0; i < array_length(__b.childs); i++ ) {
|
||||||
|
array_push(_bones, __b.childs[i]);
|
||||||
|
ds_stack_push(_bst, __b.childs[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ds_stack_destroy(_bst);
|
||||||
|
|
||||||
|
var _inputs = ds_list_create();
|
||||||
|
_inputs[| 0] = inputs[| 0];
|
||||||
|
|
||||||
|
var _input_display_list = [
|
||||||
|
input_display_list[0],
|
||||||
|
input_display_list[1]
|
||||||
|
];
|
||||||
|
|
||||||
|
for( var i = 0; i < array_length(_bones); i++ ) {
|
||||||
|
var bone = _bones[i];
|
||||||
|
if(ds_map_exists(boneMap, bone.id)) {
|
||||||
|
var _inp = boneMap[? bone.id];
|
||||||
|
var _idx = ds_list_size(_inputs);
|
||||||
|
|
||||||
|
_inp.index = _idx;
|
||||||
|
array_append(_input_display_list, _idx);
|
||||||
|
ds_list_add(_inputs, _inp);
|
||||||
|
} else
|
||||||
|
createNewControl(bone);
|
||||||
|
}
|
||||||
|
|
||||||
|
ds_list_destroy(inputs);
|
||||||
|
inputs = _inputs;
|
||||||
|
input_display_list = _input_display_list;
|
||||||
|
}
|
||||||
|
|
||||||
tools = [
|
tools = [
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
anchor_selecting = noone;
|
||||||
|
posing_bone = noone;
|
||||||
|
posing_input = 0;
|
||||||
|
posing_type = 0;
|
||||||
|
posing_sx = 0;
|
||||||
|
posing_sy = 0;
|
||||||
|
posing_mx = 0;
|
||||||
|
posing_my = 0;
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
var _b = outputs[| 0].getValue();
|
||||||
|
if(_b == noone) return;
|
||||||
|
|
||||||
|
anchor_selecting = _b.draw(active, _x, _y, _s, _mx, _my, true, anchor_selecting);
|
||||||
|
|
||||||
|
var mx = (_mx - _x) / _s;
|
||||||
|
var my = (_my - _y) / _s;
|
||||||
|
|
||||||
|
if(posing_bone) {
|
||||||
|
if(posing_bone == 0) { //move
|
||||||
|
var bx = posing_sx + (mx - posing_mx);
|
||||||
|
var by = posing_sy + (my - posing_my);
|
||||||
|
|
||||||
|
var val = posing_input.getValue();
|
||||||
|
val[TRANSFORM.pos_x] = bx;
|
||||||
|
val[TRANSFORM.pos_y] = by;
|
||||||
|
if(posing_input.setValue(val))
|
||||||
|
UNDO_HOLDING = true;
|
||||||
|
|
||||||
|
} else if(posing_bone == 1) { //scale
|
||||||
|
var ss = point_distance(posing_mx, posing_my, mx, my) / posing_sx;
|
||||||
|
|
||||||
|
var val = posing_input.getValue();
|
||||||
|
val[TRANSFORM.sca_x] = ss;
|
||||||
|
if(posing_input.setValue(val))
|
||||||
|
UNDO_HOLDING = true;
|
||||||
|
|
||||||
|
} else if(posing_bone == 2) { //rotate
|
||||||
|
var ori = posing_bone.getPoint(0, 0);
|
||||||
|
var rot = angle_difference(point_direction(ori.x, ori.y, mx, my), posing_bone.angle);
|
||||||
|
|
||||||
|
var val = posing_input.getValue();
|
||||||
|
val[TRANSFORM.rot] = rot;
|
||||||
|
if(posing_input.setValue(val))
|
||||||
|
UNDO_HOLDING = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static update = function(frame = ANIMATOR.current_frame) {
|
if(mouse_release(mb_left)) {
|
||||||
|
posing_bone = noone;
|
||||||
|
UNDO_HOLDING = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(anchor_selecting != noone && mouse_click(mb_left, active)) {
|
||||||
|
if(anchor_selecting[1] == 0) { // move
|
||||||
|
posing_bone = anchor_selecting[0];
|
||||||
|
if(!ds_map_exists(boneMap, posing_bone.id))
|
||||||
|
setBone();
|
||||||
|
posing_input = boneMap[? posing_bone.id];
|
||||||
|
posing_type = 0;
|
||||||
|
|
||||||
|
var val = posing_input.getValue();
|
||||||
|
posing_sx = val[TRANSFORM.pos_x];
|
||||||
|
posing_sy = val[TRANSFORM.pos_y];
|
||||||
|
|
||||||
|
posing_mx = mx;
|
||||||
|
posing_my = my;
|
||||||
|
|
||||||
|
} else if(anchor_selecting[1] == 1) { // scale
|
||||||
|
posing_bone = anchor_selecting[0];
|
||||||
|
if(!ds_map_exists(boneMap, posing_bone.id))
|
||||||
|
setBone();
|
||||||
|
posing_input = boneMap[? posing_bone.id];
|
||||||
|
posing_type = 1;
|
||||||
|
|
||||||
|
var val = posing_input.getValue();
|
||||||
|
posing_sx = val[TRANSFORM.sca_x];
|
||||||
|
|
||||||
|
posing_mx = mx;
|
||||||
|
posing_my = my;
|
||||||
|
|
||||||
|
} else if(anchor_selecting[1] == 2) { // rotate
|
||||||
|
posing_bone = anchor_selecting[0];
|
||||||
|
if(!ds_map_exists(boneMap, posing_bone.id))
|
||||||
|
setBone();
|
||||||
|
posing_input = boneMap[? posing_bone.id];
|
||||||
|
posing_type = 2;
|
||||||
|
|
||||||
|
var val = posing_input.getValue();
|
||||||
|
posing_sx = posing_bone.angle;
|
||||||
|
|
||||||
|
posing_mx = mx;
|
||||||
|
posing_my = my;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static step = function() {
|
||||||
|
var _b = inputs[| 0].getValue();
|
||||||
|
if(_b == noone) return;
|
||||||
|
|
||||||
|
var _boneCount = ds_list_size(inputs) - input_fix_len;
|
||||||
|
if(_boneCount != _b.childCount()) setBone();
|
||||||
|
}
|
||||||
|
|
||||||
|
static update = function(frame = ANIMATOR.current_frame) {
|
||||||
|
var _b = inputs[| 0].getValue();
|
||||||
|
if(_b == noone) return;
|
||||||
|
|
||||||
|
var _bone_pose = _b.clone();
|
||||||
|
|
||||||
|
var _bst = ds_stack_create();
|
||||||
|
ds_stack_push(_bst, _bone_pose);
|
||||||
|
|
||||||
|
while(!ds_stack_empty(_bst)) {
|
||||||
|
var bone = ds_stack_pop(_bst);
|
||||||
|
var _id = bone.id;
|
||||||
|
|
||||||
|
if(ds_map_exists(boneMap, _id)) {
|
||||||
|
var _inp = boneMap[? _id];
|
||||||
|
_inp.name = bone.name;
|
||||||
|
_inp.updateName();
|
||||||
|
|
||||||
|
var _trn = _inp.getValue();
|
||||||
|
|
||||||
|
var px = _trn[0];
|
||||||
|
var py = _trn[1];
|
||||||
|
var rot = _trn[2];
|
||||||
|
var sca = _trn[3];
|
||||||
|
|
||||||
|
var _x = lengthdir_x(bone.distance, bone.direction);
|
||||||
|
var _y = lengthdir_y(bone.distance, bone.direction);
|
||||||
|
|
||||||
|
_x += px;
|
||||||
|
_y += py;
|
||||||
|
|
||||||
|
bone.distance = point_distance(0, 0, _x, _y);
|
||||||
|
bone.direction = point_direction(0, 0, _x, _y);
|
||||||
|
|
||||||
|
bone.angle += rot;
|
||||||
|
bone.length *= sca;
|
||||||
|
}
|
||||||
|
|
||||||
|
for( var i = 0; i < array_length(bone.childs); i++ ) {
|
||||||
|
ds_stack_push(_bst, bone.childs[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ds_stack_destroy(_bst);
|
||||||
|
|
||||||
|
outputs[| 0].setValue(_bone_pose);
|
||||||
}
|
}
|
||||||
|
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() {
|
||||||
var _inputs = load_map.inputs;
|
var _inputs = load_map.inputs;
|
||||||
|
|
||||||
for(var i = input_fix_len; i < array_length(_inputs); i += data_length)
|
for( var i = input_fix_len; i < array_length(_inputs); i += data_length )
|
||||||
createBone();
|
createNewControl();
|
||||||
|
}
|
||||||
|
|
||||||
|
static doApplyDeserialize = function() {
|
||||||
|
for( var i = input_fix_len; i < ds_list_size(inputs); i += data_length ) {
|
||||||
|
var inp = inputs[| i];
|
||||||
|
var idx = array_safe_get(inp.extra_data, 0);
|
||||||
|
|
||||||
|
boneMap[? idx] = inp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
var val = inputs[| 0].getValue();
|
var val = inputs[| 0].getValue();
|
||||||
var bbox = drawGetBbox(xx, yy, _s);
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
|
||||||
wd_checkBox.setActiveFocus(_focus, _hover);
|
wd_checkBox.setFocusHover(_focus, _hover);
|
||||||
wd_checkBox.draw(bbox.xc, bbox.yc, val, [ _mx, _my ], bbox.h - 8 * _s, fa_center, fa_center);
|
wd_checkBox.draw(bbox.xc, bbox.yc, val, [ _mx, _my ], bbox.h - 8 * _s, fa_center, fa_center);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
active = true;
|
active = true;
|
||||||
renderActive = true;
|
renderActive = true;
|
||||||
|
|
||||||
node_id = generateUUID();
|
node_id = UUID_generate();
|
||||||
group = _group;
|
group = _group;
|
||||||
destroy_when_upgroup = false;
|
destroy_when_upgroup = false;
|
||||||
ds_list_add(PANEL_GRAPH.getNodeList(_group), self);
|
ds_list_add(PANEL_GRAPH.getNodeList(_group), self);
|
||||||
|
|
|
@ -62,14 +62,14 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
var _h = 0;
|
var _h = 0;
|
||||||
|
|
||||||
var _jName = inputs[| i + 0];
|
var _jName = inputs[| i + 0];
|
||||||
_jName.editWidget.setActiveFocus(_focus, _hover);
|
_jName.editWidget.setFocusHover(_focus, _hover);
|
||||||
_jName.editWidget.draw(tx, ty, ui(128), _th, _jName.showValue(), _m, _jName.display_type);
|
_jName.editWidget.draw(tx, ty, ui(128), _th, _jName.showValue(), _m, _jName.display_type);
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_center, fa_top, COLORS._main_text_sub);
|
draw_set_text(f_p1, fa_center, fa_top, COLORS._main_text_sub);
|
||||||
draw_text_add(tx + ui(128 + 12), ty + ui(6), "=");
|
draw_text_add(tx + ui(128 + 12), ty + ui(6), "=");
|
||||||
|
|
||||||
var _jValue = inputs[| i + 1];
|
var _jValue = inputs[| i + 1];
|
||||||
_jValue.editWidget.setActiveFocus(_focus, _hover);
|
_jValue.editWidget.setFocusHover(_focus, _hover);
|
||||||
_jValue.editWidget.draw(tx + ui(128 + 24), ty, _w - ui(128 + 24 + 16), _th, _jValue.showValue(), _m);
|
_jValue.editWidget.draw(tx + ui(128 + 24), ty, _w - ui(128 + 24 + 16), _th, _jValue.showValue(), _m);
|
||||||
|
|
||||||
_h += _th + ui(6);
|
_h += _th + ui(6);
|
||||||
|
|
|
@ -153,8 +153,8 @@ function variable_editor(nodeVal) constructor {
|
||||||
var wd_h = ui(32);
|
var wd_h = ui(32);
|
||||||
var lb_w = ui(72);
|
var lb_w = ui(72);
|
||||||
|
|
||||||
vb_range.setActiveFocus(_focus, _hover);
|
vb_range.setFocusHover(_focus, _hover);
|
||||||
tb_step.setActiveFocus(_focus, _hover);
|
tb_step.setFocusHover(_focus, _hover);
|
||||||
|
|
||||||
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_sub);
|
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_sub);
|
||||||
draw_text(_x + ui(8), _y + wd_h / 2, "Range");
|
draw_text(_x + ui(8), _y + wd_h / 2, "Range");
|
||||||
|
|
|
@ -111,14 +111,14 @@ function Node_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
||||||
wd_slider.handle_w = 24 * _s;
|
wd_slider.handle_w = 24 * _s;
|
||||||
|
|
||||||
if(sl_h > 8) {
|
if(sl_h > 8) {
|
||||||
wd_slider.setActiveFocus(_focus, _hover);
|
wd_slider.setFocusHover(_focus, _hover);
|
||||||
wd_slider.draw(sl_x, sl_y, sl_w, sl_h, val, [_mx, _my], 0);
|
wd_slider.draw(sl_x, sl_y, sl_w, sl_h, val, [_mx, _my], 0);
|
||||||
draggable = !wd_slider.dragging;
|
draggable = !wd_slider.dragging;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2 :
|
case 2 :
|
||||||
wd_rotator.scale = _s;
|
wd_rotator.scale = _s;
|
||||||
wd_rotator.setActiveFocus(_focus, _hover);
|
wd_rotator.setFocusHover(_focus, _hover);
|
||||||
wd_rotator.draw(bbox.xc, bbox.yc - 48 * _s, val, [_mx, _my], false);
|
wd_rotator.draw(bbox.xc, bbox.yc - 48 * _s, val, [_mx, _my], false);
|
||||||
|
|
||||||
draggable = !wd_rotator.dragging;
|
draggable = !wd_rotator.dragging;
|
||||||
|
|
|
@ -63,12 +63,12 @@ function Node_Path_L_System(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
||||||
draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text_sub);
|
draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text_sub);
|
||||||
draw_text_add(_x + ui(8), ty + ui(8), string((i - input_fix_len) / data_length));
|
draw_text_add(_x + ui(8), ty + ui(8), string((i - input_fix_len) / data_length));
|
||||||
|
|
||||||
_name.editWidget.setActiveFocus(_focus, _hover);
|
_name.editWidget.setFocusHover(_focus, _hover);
|
||||||
_name.editWidget.draw(tx, ty, _tw, _th, _name.showValue(), _m, _name.display_type);
|
_name.editWidget.draw(tx, ty, _tw, _th, _name.showValue(), _m, _name.display_type);
|
||||||
|
|
||||||
draw_sprite_ui(THEME.arrow, 0, tx + _tw + ui(16), ty + _th / 2,,,, COLORS._main_icon);
|
draw_sprite_ui(THEME.arrow, 0, tx + _tw + ui(16), ty + _th / 2,,,, COLORS._main_icon);
|
||||||
|
|
||||||
_rule.editWidget.setActiveFocus(_focus, _hover);
|
_rule.editWidget.setFocusHover(_focus, _hover);
|
||||||
_rule.editWidget.draw(tx + _tw + ui(32), ty, _w - (_tw + ui(8 + 24 + 32)), _th, _rule.showValue(), _m, _rule.display_type);
|
_rule.editWidget.draw(tx + _tw + ui(32), ty, _w - (_tw + ui(8 + 24 + 32)), _th, _rule.showValue(), _m, _rule.display_type);
|
||||||
|
|
||||||
ty += _th + ui(6);
|
ty += _th + ui(6);
|
||||||
|
|
|
@ -57,6 +57,7 @@ enum VALUE_DISPLAY {
|
||||||
vector_range,
|
vector_range,
|
||||||
area,
|
area,
|
||||||
kernel,
|
kernel,
|
||||||
|
transform,
|
||||||
|
|
||||||
//Curve
|
//Curve
|
||||||
curve,
|
curve,
|
||||||
|
@ -358,7 +359,10 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
_initName = _name;
|
_initName = _name;
|
||||||
name = __txt_junction_name(instanceof(node), type, index, _name);
|
name = __txt_junction_name(instanceof(node), type, index, _name);
|
||||||
name = _name;
|
name = _name;
|
||||||
internalName = string_lower(string_replace_all(_name, " ", "_"));
|
|
||||||
|
static updateName = function() {
|
||||||
|
internalName = string_lower(string_replace_all(name, " ", "_"));
|
||||||
|
} updateName();
|
||||||
|
|
||||||
if(struct_has(node, "inputMap")) {
|
if(struct_has(node, "inputMap")) {
|
||||||
if(_connect == JUNCTION_CONNECT.input) node.inputMap[? internalName] = self;
|
if(_connect == JUNCTION_CONNECT.input) node.inputMap[? internalName] = self;
|
||||||
|
@ -728,6 +732,15 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
for( var i = 0; i < array_length(animators); i++ )
|
for( var i = 0; i < array_length(animators); i++ )
|
||||||
animators[i].suffix = " " + string(i);
|
animators[i].suffix = " " + string(i);
|
||||||
|
|
||||||
|
extract_node = "";
|
||||||
|
break;
|
||||||
|
case VALUE_DISPLAY.transform :
|
||||||
|
editWidget = new transformBox(function(index, _val) {
|
||||||
|
var _val = animator.getValue();
|
||||||
|
_val[index] = val;
|
||||||
|
return setValueDirect(_val);
|
||||||
|
});
|
||||||
|
|
||||||
extract_node = "";
|
extract_node = "";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor {
|
||||||
draw_sprite_ui_uniform(THEME.inspector_padding, 0, _x, _y + ui(64));
|
draw_sprite_ui_uniform(THEME.inspector_padding, 0, _x, _y + ui(64));
|
||||||
|
|
||||||
for(var i = 0; i < 4; i++) {
|
for(var i = 0; i < 4; i++) {
|
||||||
tb[i].setActiveFocus(hover, active);
|
tb[i].setFocusHover(active, hover);
|
||||||
tb[i].align = fa_center;
|
tb[i].align = fa_center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor {
|
||||||
tb[2].draw(_x - ui(64) - ui(64), _y + ui(64 - 17), ui(64), TEXTBOX_HEIGHT, _data[2], _m);
|
tb[2].draw(_x - ui(64) - ui(64), _y + ui(64 - 17), ui(64), TEXTBOX_HEIGHT, _data[2], _m);
|
||||||
tb[3].draw(_x - ui(32), _y + ui(64 + 48 + 8), ui(64), TEXTBOX_HEIGHT, _data[3], _m);
|
tb[3].draw(_x - ui(32), _y + ui(64 + 48 + 8), ui(64), TEXTBOX_HEIGHT, _data[3], _m);
|
||||||
|
|
||||||
b_link.setActiveFocus(hover, active);
|
b_link.setFocusHover(active, hover);
|
||||||
b_link.icon_index = linked;
|
b_link.icon_index = linked;
|
||||||
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
||||||
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
||||||
|
@ -87,7 +87,7 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor {
|
||||||
b_link.draw(bx + ui(4), by + ui(4), ui(24), ui(24), _m, THEME.button_hide);
|
b_link.draw(bx + ui(4), by + ui(4), ui(24), ui(24), _m, THEME.button_hide);
|
||||||
|
|
||||||
if(unit != noone && unit.reference != noone) {
|
if(unit != noone && unit.reference != noone) {
|
||||||
unit.triggerButton.setActiveFocus(ihover, iactive);
|
unit.triggerButton.setFocusHover(iactive, ihover);
|
||||||
unit.draw(_x + ui(48), _y - ui(25), ui(32), ui(32), _m);
|
unit.draw(_x + ui(48), _y - ui(25), ui(32), ui(32), _m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ function Panel_Addon() : PanelContent() constructor {
|
||||||
tb_search.draw(px, py, pw, ui(32), search_string, [mx, my]);
|
tb_search.draw(px, py, pw, ui(32), search_string, [mx, my]);
|
||||||
if(search_string == "") tb_search.sprite_index = 1;
|
if(search_string == "") tb_search.sprite_index = 1;
|
||||||
|
|
||||||
sc_addon.setActiveFocus(pFOCUS, pHOVER);
|
sc_addon.setFocusHover(pFOCUS, pHOVER);
|
||||||
sc_addon.draw(px, py + ui(40), mx - px, my - (py + ui(40)));
|
sc_addon.draw(px, py + ui(40), mx - px, my - (py + ui(40)));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -341,10 +341,10 @@ function Panel_Collection() : PanelContent() constructor {
|
||||||
|
|
||||||
var content_y = ui(48);
|
var content_y = ui(48);
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, 1, group_w, content_y, content_w, content_h);
|
draw_sprite_stretched(THEME.ui_panel_bg, 1, group_w, content_y, content_w, content_h);
|
||||||
contentPane.setActiveFocus(pFOCUS, pHOVER);
|
contentPane.setFocusHover(pFOCUS, pHOVER);
|
||||||
contentPane.draw(group_w, content_y, mx - group_w, my - content_y);
|
contentPane.draw(group_w, content_y, mx - group_w, my - content_y);
|
||||||
|
|
||||||
folderPane.setActiveFocus(pFOCUS, pHOVER);
|
folderPane.setFocusHover(pFOCUS, pHOVER);
|
||||||
folderPane.draw(0, content_y, mx, my - content_y);
|
folderPane.draw(0, content_y, mx, my - content_y);
|
||||||
|
|
||||||
#region resize width
|
#region resize width
|
||||||
|
|
|
@ -45,7 +45,7 @@ function Panel_Globalvar() : PanelContent() constructor {
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
|
|
||||||
contentPane.setActiveFocus(pFOCUS, pHOVER);
|
contentPane.setFocusHover(pFOCUS, pHOVER);
|
||||||
contentPane.draw(px, py, mx - px, my - py);
|
contentPane.draw(px, py, mx - px, my - py);
|
||||||
|
|
||||||
var bx = w - ui(32 + 16);
|
var bx = w - ui(32 + 16);
|
||||||
|
|
|
@ -90,7 +90,7 @@ function Panel_Gradient() : PanelContent() constructor {
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
|
|
||||||
sp_gradient.setActiveFocus(pFOCUS, pHOVER);
|
sp_gradient.setFocusHover(pFOCUS, pHOVER);
|
||||||
sp_gradient.draw(px, py, mx - px, my - py);
|
sp_gradient.draw(px, py, mx - px, my - py);
|
||||||
|
|
||||||
var bx = w - ui(32 + 16);
|
var bx = w - ui(32 + 16);
|
||||||
|
|
|
@ -77,7 +77,7 @@ function Panel_Graph_Export_Image(targetPanel) : PanelContent() constructor {
|
||||||
|
|
||||||
var _wid = widgets[i][1];
|
var _wid = widgets[i][1];
|
||||||
var _dat = widgets[i][2]();
|
var _dat = widgets[i][2]();
|
||||||
_wid.setActiveFocus(pFOCUS, pHOVER);
|
_wid.setFocusHover(pFOCUS, pHOVER);
|
||||||
|
|
||||||
switch(instanceof(widgets[i][1])) {
|
switch(instanceof(widgets[i][1])) {
|
||||||
case "textBox" : _wid.draw(_tx - _ww, ty + wh * i - _hh / 2, _ww, _hh, _dat, _m); break;
|
case "textBox" : _wid.draw(_tx - _ww, ty + wh * i - _hh / 2, _ww, _hh, _dat, _m); break;
|
||||||
|
@ -136,7 +136,7 @@ function Panel_Graph_Export_Image(targetPanel) : PanelContent() constructor {
|
||||||
var sx = tx;
|
var sx = tx;
|
||||||
var sy = ty + sh + ui(16);
|
var sy = ty + sh + ui(16);
|
||||||
|
|
||||||
sc_settings.setActiveFocus(pFOCUS, pHOVER);
|
sc_settings.setFocusHover(pFOCUS, pHOVER);
|
||||||
sc_settings.draw(sx, sy, mx - sx, my - sy);
|
sc_settings.draw(sx, sy, mx - sx, my - sy);
|
||||||
|
|
||||||
if(is_surface(surface)) {
|
if(is_surface(surface)) {
|
||||||
|
@ -147,7 +147,7 @@ function Panel_Graph_Export_Image(targetPanel) : PanelContent() constructor {
|
||||||
bx = w - padding - _bw;
|
bx = w - padding - _bw;
|
||||||
by = h - padding - _bh;
|
by = h - padding - _bh;
|
||||||
|
|
||||||
b_export.setActiveFocus(pFOCUS, pHOVER);
|
b_export.setFocusHover(pFOCUS, pHOVER);
|
||||||
b_export.draw(bx, by, _bw, _bh, _m);
|
b_export.draw(bx, by, _bw, _bh, _m);
|
||||||
draw_text(bx + ui(16), by + ui(6), txt);
|
draw_text(bx + ui(16), by + ui(6), txt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ function Panel_History() : PanelContent() constructor {
|
||||||
var ph = h - ui(title_height + padding);
|
var ph = h - ui(title_height + padding);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sc_history.setActiveFocus(pFOCUS, pHOVER);
|
sc_history.setFocusHover(pFOCUS, pHOVER);
|
||||||
sc_history.draw(px, py, mx - px, my - py);
|
sc_history.draw(px, py, mx - px, my - py);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -148,7 +148,7 @@ function Panel_Inspector() : PanelContent() constructor {
|
||||||
draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy, con_w, ui(32), COLORS.panel_inspector_group_bg, 1);
|
draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy, con_w, ui(32), COLORS.panel_inspector_group_bg, 1);
|
||||||
|
|
||||||
if(_b != noone) {
|
if(_b != noone) {
|
||||||
_b.setActiveFocus(pFOCUS, _hover);
|
_b.setFocusHover(pFOCUS, _hover);
|
||||||
_b.draw(_x1, yy + ui(2), ui(28), ui(28), _m, THEME.button_hide_fill);
|
_b.draw(_x1, yy + ui(2), ui(28), ui(28), _m, THEME.button_hide_fill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ function Panel_Inspector() : PanelContent() constructor {
|
||||||
yy += line_get_height() + ui(6);
|
yy += line_get_height() + ui(6);
|
||||||
hh += line_get_height() + ui(6);
|
hh += line_get_height() + ui(6);
|
||||||
|
|
||||||
meta_tb[j].setActiveFocus(pFOCUS, _hover);
|
meta_tb[j].setFocusHover(pFOCUS, _hover);
|
||||||
if(pFOCUS) meta_tb[j].register(contentPane);
|
if(pFOCUS) meta_tb[j].register(contentPane);
|
||||||
|
|
||||||
var wh = 0;
|
var wh = 0;
|
||||||
|
@ -291,11 +291,11 @@ function Panel_Inspector() : PanelContent() constructor {
|
||||||
var hh = ui(40);
|
var hh = ui(40);
|
||||||
|
|
||||||
//tb_prop_filter.register(contentPane);
|
//tb_prop_filter.register(contentPane);
|
||||||
//tb_prop_filter.setActiveFocus(pHOVER, pFOCUS);
|
//tb_prop_filter.setFocusHover(pHOVER, pFOCUS);
|
||||||
//tb_prop_filter.draw(ui(32), _y + ui(4), con_w - ui(64), ui(28), filter_text, _m);
|
//tb_prop_filter.draw(ui(32), _y + ui(4), con_w - ui(64), ui(28), filter_text, _m);
|
||||||
//draw_sprite_ui(THEME.search, 0, ui(32 + 16), _y + ui(4 + 14), 1, 1, 0, COLORS._main_icon, 1);
|
//draw_sprite_ui(THEME.search, 0, ui(32 + 16), _y + ui(4 + 14), 1, 1, 0, COLORS._main_icon, 1);
|
||||||
|
|
||||||
prop_page_button.setActiveFocus(pFOCUS, pHOVER);
|
prop_page_button.setFocusHover(pFOCUS, pHOVER);
|
||||||
prop_page_button.draw(ui(32), _y + ui(4), contentPane.w - ui(76), ui(28), prop_page, _m);
|
prop_page_button.draw(ui(32), _y + ui(4), contentPane.w - ui(76), ui(28), prop_page, _m);
|
||||||
|
|
||||||
var xc = con_w / 2;
|
var xc = con_w / 2;
|
||||||
|
@ -329,7 +329,7 @@ function Panel_Inspector() : PanelContent() constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
var val = inspecting.attributes[$ edt[1]];
|
var val = inspecting.attributes[$ edt[1]];
|
||||||
edt[2].setActiveFocus(pFOCUS, pHOVER);
|
edt[2].setFocusHover(pFOCUS, pHOVER);
|
||||||
|
|
||||||
if(instanceof(edt[2]) == "buttonClass") {
|
if(instanceof(edt[2]) == "buttonClass") {
|
||||||
edt[2].text = edt[0];
|
edt[2].text = edt[0];
|
||||||
|
@ -588,7 +588,7 @@ function Panel_Inspector() : PanelContent() constructor {
|
||||||
function drawInspectingNode() {
|
function drawInspectingNode() {
|
||||||
tb_node_name.font = f_h5;
|
tb_node_name.font = f_h5;
|
||||||
tb_node_name.hide = true;
|
tb_node_name.hide = true;
|
||||||
tb_node_name.setActiveFocus(pFOCUS, pHOVER);
|
tb_node_name.setFocusHover(pFOCUS, pHOVER);
|
||||||
tb_node_name.align = fa_center;
|
tb_node_name.align = fa_center;
|
||||||
var txt = inspecting.display_name == ""? inspecting.name : inspecting.display_name;
|
var txt = inspecting.display_name == ""? inspecting.name : inspecting.display_name;
|
||||||
tb_node_name.draw(ui(64), ui(14), w - ui(128), ui(32), txt, [mx, my], VALUE_DISPLAY.node_title);
|
tb_node_name.draw(ui(64), ui(14), w - ui(128), ui(32), txt, [mx, my], VALUE_DISPLAY.node_title);
|
||||||
|
@ -700,7 +700,7 @@ function Panel_Inspector() : PanelContent() constructor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
contentPane.setActiveFocus(pFOCUS, pHOVER);
|
contentPane.setFocusHover(pFOCUS, pHOVER);
|
||||||
contentPane.draw(ui(16), top_bar_h, mx - ui(16), my - top_bar_h);
|
contentPane.draw(ui(16), top_bar_h, mx - ui(16), my - top_bar_h);
|
||||||
|
|
||||||
if(!locked && PANEL_GRAPH.node_focus && inspecting != PANEL_GRAPH.node_focus)
|
if(!locked && PANEL_GRAPH.node_focus && inspecting != PANEL_GRAPH.node_focus)
|
||||||
|
|
|
@ -110,10 +110,10 @@ function Panel_Nodes() : PanelContent() constructor {
|
||||||
var ph = h - ui(title_height + padding);
|
var ph = h - ui(title_height + padding);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
tb_search.setActiveFocus(pFOCUS, pHOVER);
|
tb_search.setFocusHover(pFOCUS, pHOVER);
|
||||||
tb_search.draw(px, py, pw, ui(32), search_string, [mx, my]);
|
tb_search.draw(px, py, pw, ui(32), search_string, [mx, my]);
|
||||||
|
|
||||||
sc_nodes.setActiveFocus(pFOCUS, pHOVER);
|
sc_nodes.setFocusHover(pFOCUS, pHOVER);
|
||||||
sc_nodes.draw(px, py + ui(40), mx - px, my - (py + ui(40)));
|
sc_nodes.draw(px, py + ui(40), mx - px, my - (py + ui(40)));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -175,7 +175,7 @@ function Panel_Notification() : PanelContent() constructor {
|
||||||
var ph = h - ui(title_height + padding);
|
var ph = h - ui(title_height + padding);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
sp_noti.setActiveFocus(pHOVER, pHOVER);
|
sp_noti.setFocusHover(pHOVER, pHOVER);
|
||||||
sp_noti.draw(px, py, mx - px, my - py);
|
sp_noti.draw(px, py, mx - px, my - py);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -106,7 +106,7 @@ function Panel_Palette() : PanelContent() constructor {
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
||||||
|
|
||||||
sp_palettes.setActiveFocus(pFOCUS, pHOVER);
|
sp_palettes.setFocusHover(pFOCUS, pHOVER);
|
||||||
sp_palettes.draw(px, py, mx - px, my - py);
|
sp_palettes.draw(px, py, mx - px, my - py);
|
||||||
|
|
||||||
var bx = w - ui(32 + 16);
|
var bx = w - ui(32 + 16);
|
||||||
|
|
|
@ -312,7 +312,7 @@ function Panel_Preview() : PanelContent() constructor {
|
||||||
ww = max(ww, string_width(_node.outputs[| i].name) + ui(40));
|
ww = max(ww, string_width(_node.outputs[| i].name) + ui(40));
|
||||||
}
|
}
|
||||||
sbChannel.data_list = chName;
|
sbChannel.data_list = chName;
|
||||||
sbChannel.setActiveFocus(pFOCUS, pHOVER);
|
sbChannel.setFocusHover(pFOCUS, pHOVER);
|
||||||
|
|
||||||
sbChannel.draw(_x - ww, _y - hh / 2, ww, hh, currName, [mx, my], x, y);
|
sbChannel.draw(_x - ww, _y - hh / 2, ww, hh, currName, [mx, my], x, y);
|
||||||
right_menu_y += ui(40);
|
right_menu_y += ui(40);
|
||||||
|
@ -692,7 +692,7 @@ function Panel_Preview() : PanelContent() constructor {
|
||||||
tolx += string_width(nme) + ui(8);
|
tolx += string_width(nme) + ui(8);
|
||||||
tol_max_w += string_width(nme) + ui(8);
|
tol_max_w += string_width(nme) + ui(8);
|
||||||
|
|
||||||
wdg.setActiveFocus(pFOCUS, pHOVER);
|
wdg.setFocusHover(pFOCUS, pHOVER);
|
||||||
switch(instanceof(wdg)) {
|
switch(instanceof(wdg)) {
|
||||||
case "textBox" :
|
case "textBox" :
|
||||||
wdg.draw(tolx, toly, tolw, tolh, atr[$ key], [ mx, my ]);
|
wdg.draw(tolx, toly, tolw, tolh, atr[$ key], [ mx, my ]);
|
||||||
|
|
|
@ -63,7 +63,7 @@ function Panel_Test() : PanelContent() constructor {
|
||||||
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(8, yy + hh / 2, "Directory");
|
draw_text(8, yy + hh / 2, "Directory");
|
||||||
|
|
||||||
tb_test_dir.setActiveFocus(pFOCUS, pHOVER);
|
tb_test_dir.setFocusHover(pFOCUS, pHOVER);
|
||||||
tb_test_dir.draw(128, yy, w - 8 - 128, hh, test_dir, [ mx, my ]);
|
tb_test_dir.draw(128, yy, w - 8 - 128, hh, test_dir, [ mx, my ]);
|
||||||
yy += hh + 8;
|
yy += hh + 8;
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ function Panel_Tunnels() : PanelContent() constructor {
|
||||||
if(search_string == "")
|
if(search_string == "")
|
||||||
tb_search.sprite_index = 1;
|
tb_search.sprite_index = 1;
|
||||||
|
|
||||||
sc_tunnel.setActiveFocus(pFOCUS, pHOVER);
|
sc_tunnel.setFocusHover(pFOCUS, pHOVER);
|
||||||
sc_tunnel.draw(px, py + ui(40), mx - px, my - (py + ui(40)));
|
sc_tunnel.draw(px, py + ui(40), mx - px, my - (py + ui(40)));
|
||||||
|
|
||||||
var bx = w - ui(32 + 16);
|
var bx = w - ui(32 + 16);
|
||||||
|
|
|
@ -23,7 +23,7 @@ function pathArrayBox(_target, _data, _onClick) : widget() constructor {
|
||||||
w = _w;
|
w = _w;
|
||||||
h = _h;
|
h = _h;
|
||||||
|
|
||||||
openPath.setActiveFocus(hover, active);
|
openPath.setFocusHover(active, hover);
|
||||||
openPath.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
openPath.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
_w -= ui(40);
|
_w -= ui(40);
|
||||||
|
|
||||||
|
|
|
@ -76,18 +76,10 @@ function getWiggle(_min, _max, _freq, _time, seed_shift = 0, startTime = noone,
|
||||||
return lerp(_min, _max, _lrp);
|
return lerp(_min, _max, _lrp);
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateUUID() {
|
function UUID_generate(length = 16) {
|
||||||
randomize();
|
static str = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||||
var uuid;
|
|
||||||
do {
|
|
||||||
uuid = irandom(1000000000);
|
|
||||||
} until(!ds_map_exists(NODE_MAP, uuid))
|
|
||||||
return uuid;
|
|
||||||
}
|
|
||||||
|
|
||||||
function UUID_generate() {
|
|
||||||
var _id = "";
|
var _id = "";
|
||||||
repeat(16)
|
repeat(length) _id += string_char_at(str, irandom_range(1, string_length(str)));
|
||||||
_id += chr(choose(irandom_range(48, 57), irandom_range(65, 90), irandom_range(97, 122)));
|
|
||||||
return _id;
|
return _id;
|
||||||
}
|
}
|
|
@ -54,7 +54,7 @@ function rangeBox(_type, _onModify) : widget() constructor {
|
||||||
w = _w;
|
w = _w;
|
||||||
h = _h;
|
h = _h;
|
||||||
|
|
||||||
b_link.setActiveFocus(hover, active);
|
b_link.setFocusHover(active, hover);
|
||||||
b_link.icon_index = linked;
|
b_link.icon_index = linked;
|
||||||
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
||||||
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
||||||
|
@ -67,7 +67,7 @@ function rangeBox(_type, _onModify) : widget() constructor {
|
||||||
_w -= ui(28);
|
_w -= ui(28);
|
||||||
|
|
||||||
if(extras != -1 && is_struct(extras) && instanceof(extras) == "buttonClass") {
|
if(extras != -1 && is_struct(extras) && instanceof(extras) == "buttonClass") {
|
||||||
extras.setActiveFocus(hover, active);
|
extras.setFocusHover(active, hover);
|
||||||
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
_w -= ui(40);
|
_w -= ui(40);
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ function rangeBox(_type, _onModify) : widget() constructor {
|
||||||
if(is_array(_data) && array_length(_data) >= 2) {
|
if(is_array(_data) && array_length(_data) >= 2) {
|
||||||
var ww = _w / 2;
|
var ww = _w / 2;
|
||||||
for(var i = 0; i < 2; i++) {
|
for(var i = 0; i < 2; i++) {
|
||||||
tb[i].setActiveFocus(hover, active);
|
tb[i].setFocusHover(active, hover);
|
||||||
|
|
||||||
var bx = _x + ww * i;
|
var bx = _x + ww * i;
|
||||||
tb[i].draw(bx + ui(44), _y, ww - ui(44), _h, _data[i], _m);
|
tb[i].draw(bx + ui(44), _y, ww - ui(44), _h, _data[i], _m);
|
||||||
|
|
|
@ -34,7 +34,7 @@ function rotator(_onModify, _step = -1) : widget() constructor {
|
||||||
var knob_y = _y + ui(48) * scale;
|
var knob_y = _y + ui(48) * scale;
|
||||||
|
|
||||||
if(draw_tb) {
|
if(draw_tb) {
|
||||||
tb_value.setActiveFocus(hover, active);
|
tb_value.setFocusHover(active, hover);
|
||||||
tb_value.draw(_x + ui(64), knob_y - ui(17), ui(64), TEXTBOX_HEIGHT, _data, _m);
|
tb_value.draw(_x + ui(64), knob_y - ui(17), ui(64), TEXTBOX_HEIGHT, _data, _m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@ function rotatorRange(_onModify) : widget() constructor {
|
||||||
if(!is_real(_data[1])) return;
|
if(!is_real(_data[1])) return;
|
||||||
var knob_y = _y + ui(48);
|
var knob_y = _y + ui(48);
|
||||||
|
|
||||||
tb_min.setActiveFocus(hover, active);
|
tb_min.setFocusHover(active, hover);
|
||||||
tb_max.setActiveFocus(hover, active);
|
tb_max.setFocusHover(active, hover);
|
||||||
|
|
||||||
tb_min.draw(_x - ui(40 + 16 + 80), knob_y - TEXTBOX_HEIGHT / 2, ui(80), TEXTBOX_HEIGHT, array_safe_get(_data, 0), _m);
|
tb_min.draw(_x - ui(40 + 16 + 80), knob_y - TEXTBOX_HEIGHT / 2, ui(80), TEXTBOX_HEIGHT, array_safe_get(_data, 0), _m);
|
||||||
tb_max.draw(_x + ui(40 + 16), knob_y - TEXTBOX_HEIGHT / 2, ui(80), TEXTBOX_HEIGHT, array_safe_get(_data, 1), _m);
|
tb_max.draw(_x + ui(40 + 16), knob_y - TEXTBOX_HEIGHT / 2, ui(80), TEXTBOX_HEIGHT, array_safe_get(_data, 1), _m);
|
||||||
|
|
|
@ -38,7 +38,7 @@ function scrollBox(_data, _onModify, update_hover = true) : widget() constructor
|
||||||
|
|
||||||
w = _w;
|
w = _w;
|
||||||
if(extra_button != noone) {
|
if(extra_button != noone) {
|
||||||
extra_button.setActiveFocus(hover, active);
|
extra_button.setFocusHover(active, hover);
|
||||||
extra_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
extra_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
w -= ui(40);
|
w -= ui(40);
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ function slider(_min, _max, _step, _onModify = noone, _onRelease = noone) : widg
|
||||||
if(tb_w > 0) {
|
if(tb_w > 0) {
|
||||||
sw = _w - (tb_w + ui(16));
|
sw = _w - (tb_w + ui(16));
|
||||||
|
|
||||||
tb_value.setActiveFocus(hover, active);
|
tb_value.setFocusHover(active, hover);
|
||||||
tb_value.draw(_x + sw + ui(16), _y, tb_w, _h, _data, _m);
|
tb_value.draw(_x + sw + ui(16), _y, tb_w, _h, _data, _m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,10 +43,10 @@ function sliderRange(_min, _max, _step, _onModify) : widget() constructor {
|
||||||
var tb_w = ui(64);
|
var tb_w = ui(64);
|
||||||
var sw = _w - (tb_w + ui(16)) * 2;
|
var sw = _w - (tb_w + ui(16)) * 2;
|
||||||
|
|
||||||
tb_value_min.setActiveFocus(hover, active);
|
tb_value_min.setFocusHover(active, hover);
|
||||||
tb_value_min.draw(_x, _y, tb_w, TEXTBOX_HEIGHT, _data[0], _m);
|
tb_value_min.draw(_x, _y, tb_w, TEXTBOX_HEIGHT, _data[0], _m);
|
||||||
|
|
||||||
tb_value_max.setActiveFocus(hover, active);
|
tb_value_max.setFocusHover(active, hover);
|
||||||
tb_value_max.draw(_x + _w - tb_w, _y, tb_w, TEXTBOX_HEIGHT, _data[1], _m);
|
tb_value_max.draw(_x + _w - tb_w, _y, tb_w, TEXTBOX_HEIGHT, _data[1], _m);
|
||||||
|
|
||||||
var _x0 = _x + tb_w + ui(16);
|
var _x0 = _x + tb_w + ui(16);
|
||||||
|
|
|
@ -474,7 +474,7 @@ function textArea(_input, _onModify, _extras = noone) : textInput(_input, _onMod
|
||||||
//}
|
//}
|
||||||
|
|
||||||
if(extras && instanceof(extras) == "buttonClass") {
|
if(extras && instanceof(extras) == "buttonClass") {
|
||||||
extras.setActiveFocus(hover, active);
|
extras.setFocusHover(active, hover);
|
||||||
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
_w -= ui(40);
|
_w -= ui(40);
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,7 +333,7 @@ function textBox(_input, _onModify, _extras = noone) : textInput(_input, _onModi
|
||||||
}
|
}
|
||||||
|
|
||||||
if(extras && instanceof(extras) == "buttonClass") {
|
if(extras && instanceof(extras) == "buttonClass") {
|
||||||
extras.setActiveFocus(hover, active);
|
extras.setFocusHover(active, hover);
|
||||||
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
_w -= ui(40);
|
_w -= ui(40);
|
||||||
}
|
}
|
||||||
|
|
72
scripts/transformBox/transformBox.gml
Normal file
72
scripts/transformBox/transformBox.gml
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
enum TRANSFORM {
|
||||||
|
pos_x,
|
||||||
|
pos_y,
|
||||||
|
rot,
|
||||||
|
sca_x,
|
||||||
|
sca_y
|
||||||
|
}
|
||||||
|
|
||||||
|
function transformBox(_onModify) : widget() constructor {
|
||||||
|
onModify = _onModify;
|
||||||
|
|
||||||
|
onModifySingle[TRANSFORM.pos_x] = function(val) { onModify(TRANSFORM.pos_x, val); }
|
||||||
|
onModifySingle[TRANSFORM.pos_y] = function(val) { onModify(TRANSFORM.pos_y, val); }
|
||||||
|
onModifySingle[TRANSFORM.rot ] = function(val) { onModify(TRANSFORM.rot , val); }
|
||||||
|
onModifySingle[TRANSFORM.sca_x] = function(val) { onModify(TRANSFORM.sca_x, val); }
|
||||||
|
onModifySingle[TRANSFORM.sca_y] = function(val) { onModify(TRANSFORM.sca_y, val); }
|
||||||
|
|
||||||
|
for(var i = 0; i < 5; i++) {
|
||||||
|
tb[i] = new textBox(TEXTBOX_INPUT.number, onModifySingle[i]);
|
||||||
|
tb[i].slidable = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static setInteract = function(interactable = noone) {
|
||||||
|
self.interactable = interactable;
|
||||||
|
|
||||||
|
for( var i = 0; i < array_length(tb); i++ )
|
||||||
|
tb[i].interactable = interactable;
|
||||||
|
}
|
||||||
|
|
||||||
|
static register = function(parent = noone) {
|
||||||
|
for( var i = 0; i < array_length(tb); i++ )
|
||||||
|
tb[i].register(parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
static drawParam = function(param) {
|
||||||
|
return draw(param.x, param.y, param.w, param.data, param.mouse);
|
||||||
|
}
|
||||||
|
|
||||||
|
static draw = function(_x, _y, _w, _data, _m) {
|
||||||
|
x = _x;
|
||||||
|
y = _y;
|
||||||
|
w = _w;
|
||||||
|
h = ui(192);
|
||||||
|
|
||||||
|
for(var i = 0; i < array_length(_data); i++)
|
||||||
|
tb[i].setFocusHover(active, hover);
|
||||||
|
|
||||||
|
var tbh = TEXTBOX_HEIGHT;
|
||||||
|
|
||||||
|
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner);
|
||||||
|
draw_text(_x + ui(8), _y + tbh / 2, "Position");
|
||||||
|
|
||||||
|
var tbw = (_w - ui(64)) / 2 - ui(4);
|
||||||
|
tb[TRANSFORM.pos_x].draw(_x + ui(64), _y, tbw, tbh, _data[TRANSFORM.pos_x], _m);
|
||||||
|
tb[TRANSFORM.pos_y].draw(_x + ui(64 + 8) + tbw, _y, tbw, tbh, _data[TRANSFORM.pos_y], _m);
|
||||||
|
|
||||||
|
_y += ui(80);
|
||||||
|
|
||||||
|
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner);
|
||||||
|
draw_text(_x + ui(8), _y + tbh / 2, "Scale");
|
||||||
|
|
||||||
|
var tbw = array_length(_data) > 4? (_w - ui(64)) / 2 - ui(4) : _w - ui(64);
|
||||||
|
|
||||||
|
tb[TRANSFORM.sca_x].draw(_x + ui(64), _y, tbw, tbh, _data[TRANSFORM.sca_x], _m);
|
||||||
|
if(array_length(_data) > 4)
|
||||||
|
tb[TRANSFORM.sca_y].draw(_x + ui(64 + 8) + tbw, _y, tbw, tbh, _data[TRANSFORM.sca_y], _m);
|
||||||
|
|
||||||
|
resetFocus();
|
||||||
|
|
||||||
|
return h;
|
||||||
|
}
|
||||||
|
}
|
11
scripts/transformBox/transformBox.yy
Normal file
11
scripts/transformBox/transformBox.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "transformBox",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "widgets",
|
||||||
|
"path": "folders/widgets.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -84,7 +84,7 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor {
|
||||||
current_value = _data;
|
current_value = _data;
|
||||||
|
|
||||||
if(extras && instanceof(extras) == "buttonClass") {
|
if(extras && instanceof(extras) == "buttonClass") {
|
||||||
extras.setActiveFocus(hover, active);
|
extras.setFocusHover(active, hover);
|
||||||
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
_w -= ui(40);
|
_w -= ui(40);
|
||||||
}
|
}
|
||||||
|
@ -92,12 +92,12 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor {
|
||||||
if(unit != noone && unit.reference != noone) {
|
if(unit != noone && unit.reference != noone) {
|
||||||
_w += ui(4);
|
_w += ui(4);
|
||||||
|
|
||||||
unit.triggerButton.setActiveFocus(ihover, iactive);
|
unit.triggerButton.setFocusHover(iactive, ihover);
|
||||||
unit.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m);
|
unit.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m);
|
||||||
_w -= ui(40);
|
_w -= ui(40);
|
||||||
}
|
}
|
||||||
|
|
||||||
b_link.setActiveFocus(hover, active);
|
b_link.setFocusHover(active, hover);
|
||||||
b_link.icon_index = linked;
|
b_link.icon_index = linked;
|
||||||
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
||||||
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
||||||
|
@ -112,7 +112,7 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor {
|
||||||
var sz = min(size, array_length(_data));
|
var sz = min(size, array_length(_data));
|
||||||
var ww = _w / sz;
|
var ww = _w / sz;
|
||||||
for(var i = 0; i < sz; i++) {
|
for(var i = 0; i < sz; i++) {
|
||||||
tb[i].setActiveFocus(hover, active);
|
tb[i].setFocusHover(active, hover);
|
||||||
|
|
||||||
var bx = _x + ww * i;
|
var bx = _x + ww * i;
|
||||||
tb[i].draw(bx + ui(24), _y, ww - ui(24), _h, _data[i], _m);
|
tb[i].draw(bx + ui(24), _y, ww - ui(24), _h, _data[i], _m);
|
||||||
|
|
|
@ -63,7 +63,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const
|
||||||
w = _w;
|
w = _w;
|
||||||
h = _h * 2 + ui(4);
|
h = _h * 2 + ui(4);
|
||||||
|
|
||||||
b_link.setActiveFocus(hover, active);
|
b_link.setFocusHover(active, hover);
|
||||||
b_link.icon_index = linked;
|
b_link.icon_index = linked;
|
||||||
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
||||||
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
||||||
|
@ -76,14 +76,14 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const
|
||||||
_w -= ui(28);
|
_w -= ui(28);
|
||||||
|
|
||||||
if(extras && instanceof(extras) == "buttonClass") {
|
if(extras && instanceof(extras) == "buttonClass") {
|
||||||
extras.setActiveFocus(hover, active);
|
extras.setFocusHover(active, hover);
|
||||||
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide);
|
||||||
_w -= ui(40);
|
_w -= ui(40);
|
||||||
}
|
}
|
||||||
|
|
||||||
var ww = _w / size * 2;
|
var ww = _w / size * 2;
|
||||||
for(var i = 0; i < size; i++) {
|
for(var i = 0; i < size; i++) {
|
||||||
tb[i].setActiveFocus(hover, active);
|
tb[i].setFocusHover(active, hover);
|
||||||
|
|
||||||
var bx = _x + ww * floor(i / 2);
|
var bx = _x + ww * floor(i / 2);
|
||||||
var by = _y + i % 2 * (_h + ui(4));
|
var by = _y + i % 2 * (_h + ui(4));
|
||||||
|
|
|
@ -56,7 +56,7 @@ function widget() constructor {
|
||||||
WIDGET_CURRENT_SCROLL = noone;
|
WIDGET_CURRENT_SCROLL = noone;
|
||||||
}
|
}
|
||||||
|
|
||||||
static setActiveFocus = function(active = false, hover = false) {
|
static setFocusHover = function(active = false, hover = false) {
|
||||||
self.active = interactable && active;
|
self.active = interactable && active;
|
||||||
self.hover = interactable && hover;
|
self.hover = interactable && hover;
|
||||||
self.iactive = active;
|
self.iactive = active;
|
||||||
|
@ -67,4 +67,7 @@ function widget() constructor {
|
||||||
active = false;
|
active = false;
|
||||||
hover = false;
|
hover = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static draw_param = function(param) {}
|
||||||
|
static draw = function() {}
|
||||||
}
|
}
|
Loading…
Reference in a new issue