Seneral / Node_Editor_Framework

A flexible and modular Node Editor Framework for creating node based displays and editors in Unity
https://nodeeditor.seneral.dev
MIT License
2.01k stars 414 forks source link

Added Keyboard Support for moving nodes #76

Closed ReevMich closed 8 years ago

ReevMich commented 8 years ago

using the arrow keys As well as if you hold shift it increases the movement amount for the node.

This is { TheCaptainJuneBug } from the Node Editor Unity forum.

Seneral commented 8 years ago

Cool, seems neat. Any use case you specifically designed it for or is it simply 'nice-to-have'? ;)

Anyway, is there a reason to use reflection to get the handled hotkey when it's hardcoded? That seems like a 'waste' of resources there... Also, but this is not too important, you could just stack all HotKeyAttributes on the single main method and then check for the key (inputInfo.inputEvent.keyCode). It would minimise code and is (atleast compared to the reflection method) more optimized. :)

Seneral commented 8 years ago

Also, the enum MoveNodeDirection seems to be redundant:)

ReevMich commented 8 years ago

Ahh, gotcha, yeah very new to a lot of this.

It was a feature i use a lot.

Those are some adjustments i will definitely make. Thank you for the information :)

Seneral commented 8 years ago

Cool, no problem:) That's what pull requests are for:)

Seneral commented 8 years ago

Really clean now, I'll merge now. Thanks!

ReevMich commented 8 years ago

yaay! :) my first actual contribution. I will continue to contributing this awesome project :)

Seneral commented 8 years ago

Cool, always nice to see other people contributing! Don't hesitate if you find something you would want to change/add;)