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

Update example to move setting window in frame. #36

Merged
merged 1 commit into from
May 24, 2018
Merged

Update example to move setting window in frame. #36

merged 1 commit into from
May 24, 2018

Conversation

abreheret
Copy link
Contributor

Update canny example to move the setting window :

example_move

@Dovyski
Copy link
Owner

Dovyski commented Apr 21, 2018

Wow! Thanks for such an awesome pull request! Actually, your idea is so cool and useful to other users of cvui that it deserves its own example (independent of the canny one). And I can't stop watching the gif you provided 😃

I will merge your PR within the next days. Thank you!

@abreheret
Copy link
Contributor Author

Cool that you like it ! Perhaps it would be better to put this class Setting in the lib cvui so that it is directly integrated into it ?
When I have free time I could do a PR of this class in cvui lib

@Dovyski
Copy link
Owner

Dovyski commented Apr 24, 2018

I love the idea of integrating this feature into cvui, but it has to be done without classes. cvui follows a design where one call should produce one thing on the screen.

I was thinking that we could create a new window component whose X and Y params are pointers, so we can make the window move using that. What do you think?

@pthom
Copy link
Contributor

pthom commented Apr 24, 2018

Sorry to interfer, but I have one suggestion.

cvui's public API does not expose any classes; this is a design choice in order to be an immediate mode GUI. However, it might still use hidden classes inside its private implementation (inside the cvui::internalnamespace).

Thus, a possible implementation would be to store a dictionnary name->WindowOptions inside cvui::internal (something like map<string, WindowOptions> ?)

@abreheret
Copy link
Contributor Author

Ok, I have not read the cvui source code yet, but i have that look at the use with the examples provided. I did not notice that classes were proscribed. So I do not know what would be the best way to integrate this feature. For my part, I must to read more deeply the source of cvui for better understand are internal work.

@Dovyski
Copy link
Owner

Dovyski commented Apr 27, 2018

Ok, I have not read the cvui source code yet, but i have that look at the use with the examples provided. I did not notice that classes were proscribed.

That's totally my fault, I am sorry. A contribution's guide explaining those ideas is long overdue.

Thus, a possible implementation would be to store a dictionnary name->WindowOptions inside cvui::internal (something like map<string, WindowOptions> ?)

That's a possible solution if we want cvui to handle everything internally.

@Dovyski Dovyski changed the base branch from master to dev May 24, 2018 14:20
@Dovyski Dovyski merged commit 55ca78e into Dovyski:dev May 24, 2018
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.

3 participants