-
Notifications
You must be signed in to change notification settings - Fork 21
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
Implement cosmic_text as the text renderer and editor #179
Conversation
Unsure of why the tests are failing! |
Need input on the tests Otherwise should be ready for review! |
1c380da
to
75b5829
Compare
Hm! Either I'm doing something wrong here, or whatever #125 aims to fix is hitting me hard here. It seems that if I switch to another page in my game, textboxes will happily reuse the contents of the old one selected. |
Even after #125 or a similar fix, you'll still run into that until we fix widget keys. More details in Discord! Ideally, widgets are able to react to props changing so that it isn't a major issue to reuse widget state but sometimes that isn't possible. |
we've made a branch that contains code to solve the issue. but it depends on this pr because we were too lazy to find a reprod on main that actually does have the issue, lol! |
AAAaahhhhh. hi-dpi actually works now. This has become like 40 commits, god damn it |
8189518
to
a8491fe
Compare
oops squashed them wrongly i think |
a8491fe
to
4ed97ee
Compare
4ed97ee
to
e6126a7
Compare
apparently the text fixes broke the height of texts on certain fonts, so the actual thing we should've done was to change the tests 💯 |
* implement cosmic_text as the text renderer and editor * fix text related tests * fix text sizing being incorrect on certain fonts * Re-add TextAlignment so that we don't break more code * Restore textbox API * Fix overflow detection; left debug prints in while I diagnose other problems * Make PaintLimits optional because they aren't initialized right away * Fix textbox state machine * Working textbox state machine * Fix up modifier keys and some warnings * Fix alignment (which works in more cases now! O_o) * Remove debug prints, fix cursor when buffer is empty * Use ((x, y), (w, h)) order instead of ((x, w), (y, h)) order for coordinates * Improve variable names since there are two 'text changed' variables now * Re-export cosmic_text from yakui crate * Fix tests, restore old YakuiWgpu constructor, add button alignment example * Remove Yakui argument from boostrap, app, and demo * Always import cosmic_text from yakui instead of yakui_widgets if available * Restore examples and text API to use (potentially flawed) Into<String> generic * Fix clear_textbox example * Remove yakui_widgets references from yakui_app and bootstrap * Clean up examples * Borrow and initialize Option instead of taking it to prevent possible mistakes * Triple whammy to fix button alignment — I think this is good enough * Accept snapshots, for better or worse --------- Co-authored-by: Madeline Sparkles <[email protected]>
Closed as per #194 |
Closes #95