mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-24 14:06:23 +01:00
- [Wiggler] Fix random seed button reset the wrong value.
This commit is contained in:
parent
1e77dcc18d
commit
35753e22e8
2 changed files with 13 additions and 7 deletions
|
@ -8,7 +8,7 @@ function Node_Wiggler(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) construc
|
|||
.setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] });
|
||||
|
||||
inputs[| inl + 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(6))
|
||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[| inl + 2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
||||
|
||||
inputs[| inl + 3] = nodeValue("Clip", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b11 )
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data : [ "Start", "End" ] });
|
||||
|
|
|
@ -452,14 +452,20 @@ function Panel_Collection() : PanelContent() constructor {
|
|||
|
||||
}
|
||||
|
||||
var _x = ui(20);
|
||||
var _y = ui(24);
|
||||
var bh = line_get_height(f_p0b, 8);
|
||||
var _x = ui(20);
|
||||
var _y = ui(24);
|
||||
var bh = line_get_height(f_p0b, 8);
|
||||
var rootx = 0;
|
||||
|
||||
draw_set_font(f_p0b);
|
||||
|
||||
for( var i = 0, n = array_length(roots); i < n; i++ ) {
|
||||
var r = roots[i];
|
||||
if(buttonInstant(THEME.button_hide_fill, _x - ui(8), _y - bh / 2, string_width(r[0]) + ui(20), bh, [mx, my], pFOCUS, pHOVER) == 2) {
|
||||
var r = roots[i];
|
||||
var _bx = _x - ui(8);
|
||||
var _by = _y - bh / 2;
|
||||
var _bw = string_width(r[0]) + ui(20);
|
||||
|
||||
if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bw, bh, [ mx, my ], pFOCUS, pHOVER) == 2) {
|
||||
mode = i;
|
||||
root = r[1];
|
||||
context = root;
|
||||
|
|
Loading…
Reference in a new issue