mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 06:26:42 +01:00
[canvas group] modifier double click
This commit is contained in:
parent
08435332a6
commit
cb288a6db0
5 changed files with 19 additions and 13 deletions
Binary file not shown.
|
@ -73,13 +73,13 @@ function fontScrollBox(_onModify) : widget() constructor {
|
|||
|
||||
draw_set_text(font, align, fa_center, COLORS._main_text);
|
||||
draw_set_alpha(0.5 + 0.5 * interactable);
|
||||
if(align == fa_center)
|
||||
draw_text(_x + w / 2, _y + _h / 2 - ui(2), _text);
|
||||
else if(align == fa_left)
|
||||
draw_text(_x + ui(8), _y + _h / 2 - ui(2), _text);
|
||||
|
||||
if(align == fa_center) draw_text_add(_x + w / 2, _y + _h / 2, _text);
|
||||
else if(align == fa_left) draw_text_add(_x + ui(8), _y + _h / 2, _text);
|
||||
|
||||
draw_set_alpha(1);
|
||||
|
||||
draw_sprite_ui_uniform(THEME.scroll_box_arrow, 0, _x + _w - min(_h / 2, ui(20)), _y + _h / 2, min(1, _h / 64), COLORS._main_icon, 0.5 + 0.5 * interactable);
|
||||
draw_sprite_ui_uniform(THEME.icon_font, 0, _x + min(_h / 2, ui(20)), _y + _h / 2, min(1, _h / 24), COLORS._main_icon, 0.5 + 0.5 * interactable);
|
||||
|
||||
if(WIDGET_CURRENT == self)
|
||||
draw_sprite_stretched_ext(THEME.widget_selecting, 0, _x - ui(3), _y - ui(3), _w + ui(6), _h + ui(6), COLORS._main_accent, 1);
|
||||
|
@ -91,7 +91,6 @@ function fontScrollBox(_onModify) : widget() constructor {
|
|||
|
||||
static clone = function() { #region
|
||||
var cln = new fontScrollBox(onModify);
|
||||
|
||||
return cln;
|
||||
} #endregion
|
||||
}
|
|
@ -207,10 +207,10 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
var _txh = string_height(_txt);
|
||||
|
||||
if(_junc_canvas) {
|
||||
draw_sprite_ui_uniform(THEME.icon_canvas, 0, _txx + ui(12), _txy - ui(1), 1, COLORS._main_icon, aa * .8);
|
||||
draw_sprite_ui_uniform(THEME.icon_canvas, 0, _txx + ui(8), _txy - ui(1), 1, draw_get_color(), aa * .8);
|
||||
|
||||
draw_set_alpha(aa);
|
||||
draw_text(_txx + ui(28), _txy, _txt);
|
||||
draw_text(_txx + ui(8 + 16), _txy, _txt);
|
||||
draw_set_alpha(1);
|
||||
} else {
|
||||
draw_set_alpha(aa);
|
||||
|
@ -223,9 +223,9 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
#region modifiers
|
||||
if(_jun_layer) {
|
||||
var _modis = _jun_layer.modifier;
|
||||
var _mdx = _txx - ui(23);
|
||||
var _mdy = _cy + _lh;
|
||||
var mh = ui(24);
|
||||
var _mdx = _sx0;
|
||||
var _mdy = _cy + _lh;
|
||||
var mh = ui(24);
|
||||
|
||||
for (var j = array_length(_modis) - 1; j >= 0; j--) {
|
||||
var _modi = _modis[j];
|
||||
|
@ -252,6 +252,12 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
draw_set_text(f_p2, fa_left, fa_center, _mhov? COLORS._main_text : COLORS._main_text_sub);
|
||||
draw_text_add(_mtx, _mdy + mh / 2 - ui(2), _modi.display_name);
|
||||
|
||||
if(_mhov && DOUBLE_CLICK) {
|
||||
var pan = panelAdd("Panel_Inspector", true);
|
||||
// pan.destroy_on_click_out = false;
|
||||
pan.content.setInspecting(_modi, true);
|
||||
}
|
||||
|
||||
_h += mh;
|
||||
_lh += mh;
|
||||
_mdy += mh;
|
||||
|
|
|
@ -211,10 +211,11 @@ function Panel_Inspector() : PanelContent() constructor {
|
|||
menu_junc_color.spacing = ui(24);
|
||||
#endregion
|
||||
|
||||
function setInspecting(inspecting) { #region
|
||||
function setInspecting(inspecting, _lock = false) { #region
|
||||
if(locked) return;
|
||||
|
||||
self.inspecting = inspecting;
|
||||
if(_lock) locked = true;
|
||||
|
||||
if(inspecting != noone)
|
||||
inspecting.onInspect();
|
||||
|
|
|
@ -101,7 +101,7 @@ function scrollBox(_data, _onModify, update_hover = true) : widget() constructor
|
|||
}
|
||||
|
||||
var _sps = min(1, _h / 24);
|
||||
var _ars = min(1, _h / 64);
|
||||
var _ars = min(1, _h / 48);
|
||||
var _arw = sprite_get_width(arrow_spr) * _ars + ui(8);
|
||||
var _spr = is_instanceof(_selVal, scrollItem) && _selVal.spr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue