-
Notifications
You must be signed in to change notification settings - Fork 3
Update deps and some other changes #1
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
Conversation
cbrewster
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @rofrol! Thanks for contributing 😄
Just a heads up, this is more of a toy project at the moment, but I plan to keep working on it and am happy to accept contributions. Also the editor is currently in a not-really-functioning state, I need to finish up some work w.r.t. text selections.
Everything looks pretty good, thanks for updating winit. I've left some review comments if you have time to update a few things. As for the issue with the black screen, I'll see if I can reproduce this locally.
| // TODO: Dynamically load fonts or something? | ||
| let inconsolata: &[u8] = | ||
| include_bytes!("/Users/connor/Library/Fonts/InconsolataGo-Regular.ttf"); | ||
| let inconsolata: &[u8] = include_bytes!("/usr/share/fonts/truetype/ubuntu/UbuntuMono-R.ttf"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably just ship a font like Inconsolata in the repo and have a relative path here. (we would just need to make sure to add the font's license to the repo as well).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about https://github.com/servo/font-kit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it'd be great to use something like font-kit for this!
| .. | ||
| } => { | ||
| if input.virtual_keycode == Some(VirtualKeyCode::LWin) { | ||
| if input.virtual_keycode == Some(VirtualKeyCode::LControl) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had this as LWin as on macOS quit is Command-Q and not Ctrl-Q (Command and LWin are the same thing I believe). We should probably add some platform checks to make sure each platform get their correct keybindings.
|
I just tried locally, the patch appears to work fine although the resizing needs to be fixed (see my review comment about that). What platform are you running on? Also the delete/backspace behavior seems a bit odd, backspace should delete one character on the left of the cursor and delete should delete a char on the right side of the cursor. When I hit backspace is performs a delete instead and hitting delete does nothing. This could be another case of weird cross-platform things? Input handling is very basic at the moment and will need to become a bit more robust in the future to better handle different keybindings across platforms. |
|
I am running Ubuntu 19.10 x86_64 |
|
Hmm okay, I can probably try this on Linux soonish, but maybe not today. Do you end up with any Vulkan validation errors when running? |
|
I still see black window :/ |
No |
|
Did it work with the old winit version? |
|
yes |
|
I have converted locally hello-triangle from wgpu-rs to winit 0.20 and it works |
|
I'll look into the issue with the blank window soon. Feel free to dig into it if you'd like. Thanks again! |
|
I run it on Windows and it works 😭 |
Sorry for this low quality PR. I am just learning all this stuff.
In the wip commit I tried to update deps to winit
0.20.0. It succeeded in next commit but now I don't see any code displayed in the editor. Just black window.