bluecadet / Cinder-BluecadetViews

Scene graph Cinder block with touch management and various tools for UI dev
MIT License
11 stars 3 forks source link

Wrap Touch-related in `#ifndef NOTOUCH` to support faster builds #122

Closed mattfelsen closed 6 years ago

mattfelsen commented 6 years ago

I had been thinking about this previously in order to avoid needing the Osc & TUIO blocks, but after needing to do rebuilds in VS frequently lately this seemed like a worthwhile effort.

To create/modify a Views project to remove touch support:

I suppose everything in the bluecadet/touch folder could also be wrapped in an #ifndef so that files don't have to be removed, but it seemed excessive.

And no, of course I didn't measure how much less time it takes.

benjaminbojko commented 6 years ago

This looks great. Can I ask for one nitpicky thing though: Can we rename it to NO_TOUCH? Then we can extend that later on to NO_... for other features a little more legibly. Was also wondering if we should prefix it with something specific for this block (VIEWS_ or BC_), but this seems general enough to keep as is.

mattfelsen commented 6 years ago

Haha, not nitpicky and I had the same thoughts on both :) I actually used NO_TOUCH initially but saw there's an existing def for NOMINMAX, I think from Cinder, so went with that style. Also thought of BCV_ as a prefix, but 🤷‍♂️ LMK what you want, happy to change

benjaminbojko commented 6 years ago

Ha, yeah I took a peek too at Cinder and it seems like there's a mix of UNDER_SCORE and just EVERYTHINGTOGETHER. I'd say let's go with NO_TOUCH for legibility and that'll make it consistent with the very few defines we currently have in the block.

mattfelsen commented 6 years ago

Ok, updated with https://github.com/bluecadet/Cinder-BluecadetViews/pull/122/commits/a4d169712202eef67a705ad445214ef405019e69

benjaminbojko commented 6 years ago

Looks good, thanks @mattfelsen !