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

[GUI] Support slider, label and button as widgets #1490

Merged
merged 4 commits into from
Jul 14, 2020

Conversation

archibate
Copy link
Collaborator

Related issue = close #484

[Click here for the format server]


Btw, I found the slider circle is not shown, is this intentional?

@archibate archibate requested a review from zhai-xiao July 13, 2020 16:53
@archibate archibate added skip ci and removed skip ci labels Jul 13, 2020
gui->slider(text, *val_ptr, minimum, maximum, step);
return gui->widget_values.size() - 1;
})
.def("make_label",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why a label must have a floating value? And there's no way to change its text?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please run my example and use key 'a' and 'd'.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not saying the printed text as a whole cannot be changed. Instead, it seems that only the floating value part could change? But now I looked at Label, I guess this is a restriction from the GUI system itself..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think people could use gui.text for more flexibility, given that the label is provided by the legacy C++ part, let's try improve it iapr, instead of itpr.

@archibate archibate added the LGTM label Jul 14, 2020
@archibate archibate merged commit 7d94720 into taichi-dev:master Jul 14, 2020
@FantasyVR FantasyVR mentioned this pull request Jul 15, 2020
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.

Interface legacy C++ GUI Widget system with Python
3 participants