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 colored texts #7036

Merged
merged 4 commits into from
Jan 4, 2023
Merged

Conversation

AmesingFlank
Copy link
Collaborator

Issue: #3013

Brief Summary

Implementing colored texts:

window = ti.ui.Window('Window', (768, 768),
                        vsync=True)
canvas = window.get_canvas()
gui = window.get_gui()
while window.running:
    with gui.sub_window("Yo", 0.05, 0.05, 0.9, 0.2) as w:
        w.text("haha", (1.0,0.2,0.3))
    window.show()

Screenshot 2023-01-03 at 20 07 11

@netlify
Copy link

netlify bot commented Jan 3, 2023

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit 921fcb5
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/63b4ddb35b613000092c751a
😎 Deploy Preview https://deploy-preview-7036--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Collaborator

@bobcao3 bobcao3 left a comment

Choose a reason for hiding this comment

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

LGTM!

haha

@bobcao3 bobcao3 merged commit ec79dc1 into taichi-dev:master Jan 4, 2023
feisuzhu pushed a commit to feisuzhu/taichi that referenced this pull request Jan 5, 2023
Issue: taichi-dev#3013

### Brief Summary

Implementing colored texts:
```py
window = ti.ui.Window('Window', (768, 768),
                        vsync=True)
canvas = window.get_canvas()
gui = window.get_gui()
while window.running:
    with gui.sub_window("Yo", 0.05, 0.05, 0.9, 0.2) as w:
        w.text("haha", (1.0,0.2,0.3))
    window.show()
```
<img width="767" alt="Screenshot 2023-01-03 at 20 07 11"
src="https://user-images.githubusercontent.com/16066115/210433302-e58fbc41-5331-4904-ae10-65f60e0b3446.png">

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
Issue: taichi-dev#3013

### Brief Summary

Implementing colored texts:
```py
window = ti.ui.Window('Window', (768, 768),
                        vsync=True)
canvas = window.get_canvas()
gui = window.get_gui()
while window.running:
    with gui.sub_window("Yo", 0.05, 0.05, 0.9, 0.2) as w:
        w.text("haha", (1.0,0.2,0.3))
    window.show()
```
<img width="767" alt="Screenshot 2023-01-03 at 20 07 11"
src="https://user-images.githubusercontent.com/16066115/210433302-e58fbc41-5331-4904-ae10-65f60e0b3446.png">

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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