Brush node fixes
This commit is contained in:
@@ -44,12 +44,27 @@ function operator_shortcut(s: string, type: shortcut_type_t = shortcut_type_t.ST
|
||||
return flag;
|
||||
}
|
||||
|
||||
let key: bool = (s == "left" || s == "right" || s == "middle") ?
|
||||
// Mouse
|
||||
(type == shortcut_type_t.DOWN ? mouse_down(s) : mouse_started(s)) :
|
||||
// Keyboard
|
||||
(type == shortcut_type_t.REPEAT ? keyboard_repeat(s) : type == shortcut_type_t.DOWN ? keyboard_down(s) :
|
||||
type == shortcut_type_t.RELEASED ? keyboard_released(s) : keyboard_started(s));
|
||||
let key: bool = false;
|
||||
if (s == "left" || s == "right" || s == "middle") {
|
||||
if (type == shortcut_type_t.DOWN) {
|
||||
key = mouse_down(s);
|
||||
}
|
||||
else {
|
||||
key = mouse_started(s);
|
||||
}
|
||||
}
|
||||
else if (type == shortcut_type_t.REPEAT) {
|
||||
key = keyboard_repeat(s);
|
||||
}
|
||||
else if (type == shortcut_type_t.DOWN) {
|
||||
key = keyboard_down(s);
|
||||
}
|
||||
else if (type == shortcut_type_t.RELEASED) {
|
||||
key = keyboard_released(s);
|
||||
}
|
||||
else {
|
||||
key = keyboard_started(s);
|
||||
}
|
||||
|
||||
return flag && key;
|
||||
}
|
||||
|
||||
@@ -112,19 +112,6 @@ function parser_logic_build_node(node: ui_node_t): string {
|
||||
map_set(parser_logic_node_map, name, v);
|
||||
map_set(parser_logic_raw_map, v, node);
|
||||
|
||||
// Expose button values in node
|
||||
// for (let i: i32 = 0; i < node.buttons.length; ++i) {
|
||||
// let b: ui_node_button_t = node.buttons[i];
|
||||
// if (b.type == "ENUM") {
|
||||
// let array_data: bool = b.data.length > 1;
|
||||
// let texts: string[] = array_data ? b.data : ui_enum_texts_js(node.type);
|
||||
// v[b.name] = texts[b.default_value];
|
||||
// }
|
||||
// else {
|
||||
// v[b.name] = b.default_value;
|
||||
// }
|
||||
// }
|
||||
|
||||
// Create inputs
|
||||
let inp_node: logic_node_ext_t = null;
|
||||
let inp_from: i32 = 0;
|
||||
|
||||
Reference in New Issue
Block a user