Skip to content
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

Removing namespace from header #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bennigraf
Copy link

These commits remove usage of ci/ci::app namespaces from the header, because using them there breaks quicktime on MacOS.

Using namespaces in header files break things like quicktime on MacOS (see i.e. https://forum.libcinder.org/topic/porting-windows-app-to-osx). This fixes it by adding calls to for example ci::Vec2f instead of Vec2f.
Prints the actual values of Int and Float controls right after their label.
Adding my own intentions with this repo.
@halogenica
Copy link
Owner

Thanks a lot for contributing to this! The changes to remove the namespace from the header are great, and they caught some issues in my other projects that include SimpleGUI.

This pull request includes your changes to print the values for sliders. I had a couple requests. Could you make that disabled by default, and add another default parameter to "addParam" to toggle when to display this value? The second change I was hoping you could make was for float values to display a formatted string. This is just a style preference thing, but I think the float values look better when always displayed as x.xxx, regardless of value. I made a function separate from toString because I didn't want to mistakenly truncate the saved float values, which is what toString is used for. Here's the formatting function I was thinking of:

std::string FloatVarControl::toStringFormatted() {
std::stringstream ss;
ss << std::fixed << std::setprecision(3) << *var;
return ss.str();
}

@bennigraf
Copy link
Author

Hi!

I’m not good enough in doing those pull requests yet ;-). I didn’t want to include the latest commit because the printing functionality is not complete yet… you’re right about that, it would be nice to make it selectable and extend it to other kinds of values as well. 

I probably won’t be able to complete it in the next couple of days, but I’ll come back to it and submit another request!

Best,
Benni.

Am 14. Juni 2014 bei 23:53:14, Michael Romero ([email protected]) schrieb:

Thanks a lot for contributing to this! The changes to remove the namespace from the header
are great, and they caught some issues in my other projects that include SimpleGUI.

This pull request includes your changes to print the values for sliders. I had a couple
requests. Could you make that disabled by default, and add another default parameter
to "addParam" to toggle when to display this value? The second change I was hoping you
could make was for float values to display a formatted string. This is just a style preference
thing, but I think the float values look better when always displayed as x.xxx, regardless
of value. I made a function separate from toString because I didn't want to mistakenly
truncate the saved float values, which is what toString is used for. Here's the formatting
function I was thinking of:

std::string FloatVarControl::toStringFormatted() {
std::stringstream ss;
ss << std::fixed << std::setprecision(3) << *var;
return ss.str();
}


Reply to this email directly or view it on GitHub:
#2 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants