Skip to content

Removing namespace from header - #2

Open
bennigraf wants to merge 4 commits into
halogenica:masterfrom
bennigraf:master
Open

Removing namespace from header#2
bennigraf wants to merge 4 commits into
halogenica:masterfrom
bennigraf:master

Conversation

@bennigraf

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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 (notifications@github.com) 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 freeto 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

@bennigraf@halogenica