public void HookupTriggers() { MouseButton.GetValue(INodeField.InputKey).PropertyChanged += MouseButtonTrigger_PropertyChanged; MouseButtonTrigger_PropertyChanged(null, new PropertyChangedEventArgs(nameof(ILaminarValue.Value))); Hook.GlobalEvents().MouseDown += MouseButtonTrigger_MouseDown; }
private void NumberOfLetters_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (e.PropertyName is not nameof(ILaminarValue.Value)) { return; } int NewNumberOfKeys = (int)NumberOfLetters.GetInput <double>(); if (NewNumberOfKeys > Keys.VisualComponentList.Count) { for (int i = Keys.Count; i < NewNumberOfKeys; i++) { INodeField newField = Constructor.NodeField($"Letter {i+1}").WithInput <Keys>(); newField.GetValue(INodeField.InputKey).PropertyChanged += AnyKey_PropertyChanged; Keys.Add(newField); } } else if (NewNumberOfKeys < Keys.Count) { for (int i = Keys.Count; i >= NewNumberOfKeys; i--) { Keys.RemoveAt(i); } } AnyKey_PropertyChanged(null, new PropertyChangedEventArgs(nameof(ILaminarValue.Value))); }
public void HookupTriggers() { KeyField.GetValue(INodeField.InputKey).PropertyChanged += KeyboardButtonTrigger_PropertyChanged; KeyboardButtonTrigger_PropertyChanged(null, new PropertyChangedEventArgs(nameof(ILaminarValue.Value))); Hook.GlobalEvents().KeyUp += KeyboardButtonTrigger_KeyDown; }
private void RegisterContainer(INodeContainer container, int index) { INodeField newField = Constructor.NodeField(container.NameLabel.LabelText.Value).WithValue("display", ((InputNodeContainer <InputNode>)container).GetValue(null), true); container.NameLabel.LabelText.OnChange += s => { newField.Name.Value = s; }; newField.GetValue("display").OnChange += (o) => { ((InputNodeContainer <InputNode>)container).SetValue(_scriptInstance, o); }; AllInputs.Insert(index, newField); }
public void HookupTriggers() { NumberOfLetters.GetValue(INodeField.InputKey).PropertyChanged += NumberOfLetters_PropertyChanged; live = true; }
public FlowSwitch() { valueInput.GetValue(INodeField.InputKey).TypeDefinitionChanged += FlowSwitch_TypeDefinitionChanged; }
public void HookupTriggers() { textInput.GetValue(INodeField.InputKey).OnChange += TextInputChanged; TextInputChanged(textInput.GetValue(INodeField.InputKey).Value); }