-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Position indicator (willing to help) #29
Comments
That leaves me with some extra questions.
|
1: Thanks for the suggestion 2: Either of these might be the reason. I still use VS 2015 since it has never failed me before now. I'll update and try to compile again next time. I also did download the project instead of cloning it (I didn't realize there was a difference : X) 3: I'm trying to add a motion sensor-based mouse tracker to the layout. Some people do mouse cams (I both can't and don't want to), this is supposed to achieve a similar effect via the dot moving around the mouse pad area. Ideally it will actually be an arrow to include the mouse orientation 4: Due to 3, and the fact that motion sensing is not really a standardized feature, I don't ever see generating the position being a part of NohBoard. I'm writing a standalone program to take the input from an arduino that the motion capture is attached to and interpret that into absolute position. I don't know if there are other good uses for such a feature, and I know my particular use is very niche. The only thing that I can think of that's sort of related is if someone wanted to do a similar thing with just the mouse input. Instead of having the direction/magnitude display as is there now, one could display a moving dot or even traced line. This would have to be recentered periodically, obviously. I don't know if there's a desire to have a feature like this though, which is why I have no issue writing this mod myself. 5: This might be the way to go. It would be nice to have everything in one package (since I plan on using this in conjunction with NohBoard's current functionality), and getting all of the elements correctly and consistently aligned would be a matter of setting up the NohBoard layout once, but yeah, maybe it's not worth the setting up effort. Thank you for your time ThoNohT, and the quick reply! |
I have another idea. This will require some work on my end. But why not make it in the form of a plugin? NohBoard currently has no plugin support. But a typical plugin could be a new ElementDefinition. I can't tell you the specifics about it from the top of my head. But it would need several functions for starters:
It has to have a data contract, and all of its relevant properties should be data members, so the element can be serialized into a .kb file. Then if you want to support the Edit Mode that I am currently in the process of creating. It would need the following other functions:
It would take quite some work I think to get NohBoard ready to accept plugins, because the external elements would probably differ in several ways from the current ElementDefinitions. And how to handle styles for these things, I cannot begin to think about :P |
Do you have any tips on things to (not) do to minimize incompatibility of elements? Again, no experience with them, but considering the notes in your code (about some segments being auto-generated and not to touch them) it seems like at least some of this setup is not directly accessible. And by styles, are you referring to the sets of base images ala the different keyboard layouts available right now? Or style info generated by VS? |
Generated code is exactly that: generated by Visual Studio when you design a form using the form designer. If you navigate through the code with Visual Studio, you should not easily land on such code, as it hides it from you (though it is possible to see it naturally). If you look through my code setup, you can find that keyboards are displayed by two types of ..things: The upper level is a Keyboard Definition, which contains:
Using all of this information, NohBoard is able to display the keyboard. Now how would a plugin work, from my current point of view (nothing is implemented yet, and I only gave it some real quick thoughts)? Now problem 1 is: ElementDefinition contains a lot of extra stuff that is not relevant for elements defined in a plugin, so I would have to change some stuff so a suitable base-class is provided that only requires the plugin creator to implement the absolutely necessary methods. Problem 2 is: Styles: Styles are defined in a file different from the keyboard, this allows people to create multiple styles for a single keyboard. In my code I know which Style types belong to which Element types, and can apply them easily. I don't have this knowledge when loading a plugin. So I need to find a way to let the plugin determine which style class applies to which element definition class. And naturally, these styles need to be serializable, implement the base class ElementStyle, etc, etc. Problem 3: I created special forms (windows) for editing the styles of elements/the keyboard. And I am currently creating the forms for editing the properties of elements/the keyboard. I can't create this for elements from plugins. So I would probably have to get a pointer to a function that shows the element properties window, the element style form (both for a default per keyboard, and for specific instances of that element, should there be multiple). And all of these forms would have to be implemented in the plugin itself. Note: none of these problems make it impossible to do this. They are just points that will need to be tackled if I were to support this. And it will probably take quite a while to get this implemented. So if you are in a hurry getting this done, then it may be best to just make your own fork which has the element added. And eventually, it can then hopefully pretty easily be rewritten to a plugin. |
This definitely will exist as a standalone thing before I even consider making it compatible with NB. I just got the sensors and still have to set up the whole motion sensing thing (and, no small feat, make it work well enough to warrant the trouble of live displaying the data). Thank you for all of the information you've already provided. I'll definitely keep these things in mind while developing on my end. If I get it up and working and interfacing with my own build of NB I'll let you know, and I'll keep an eye out for plugin support. |
I'd like to be able to generate a rectangular area and have another program tell NohBoard where to draw a dot within it. I think this could be accomplished in a manner similar to the mouse movement indicator's behavior. I'm willing to write this whole feature (even if just for my own personal build), but answering either of the following (or pointing me in the right direction) would speed up the process a lot:
Really, even if you can just help me with 2 so I can get to the point of being able to tinker with the software I can probably figure things out from there.
The text was updated successfully, but these errors were encountered: