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

Simplify main render system #106

Merged
merged 13 commits into from
Nov 2, 2023
Merged

Simplify main render system #106

merged 13 commits into from
Nov 2, 2023

Conversation

bytemunch
Copy link
Collaborator

@bytemunch bytemunch commented Oct 30, 2023

Moving this to it's own PR as it's gonna be a fair bit of changes not related to the 3D bits :)

  • Main function should just draw to target texture
  • Separate texture resizing systems
  • Render to sprite by default
  • Separate image creation system (in case of DEFAULT_IMAGE_HANDLE)
  • Separate CosmicTextPosition systems
  • Separate CosmicTextMode systems
    Cache calculated widget_width & widget_height, update when any relevant values change
    Need to learn a bit more about when mutable derefs happen in Bevy to correctly use Changed<Component>
  • Put all mentioned systems into a rendering SystemSet
  • Test with system ordering in mind
  • Fix padding when typing
  • Restore click & drag functionality
  • Fix cursor changing when hovered over unrendered sprite position
  • Update & test examples
  • Fix autoheight not setting target size when used in UI element
    bug: text_input example adds E when pressing enter on wasm
    systems ordering issue
    Pressing Enter on wasm sends E and Delete sends D in text_input example #107
    bug: ReadOnly inputs can still receive backspace inputs on wasm Delete and Backspace still work on ReadOnly widgets on WASM #108
    padding is inconsistent (in text_input) InfiniteLine cursor position is broken in latest update #109

@bytemunch bytemunch self-assigned this Oct 30, 2023
@bytemunch bytemunch mentioned this pull request Oct 30, 2023
3 tasks
breaks loads of stuff: sizing, click functions, cursor hovering just a few

Only tested on login example

not optimized; spams handle weak clones to ensure got correct handle (will be fixed by new handle swapping routine)

not sure about the API changes but might just need to get used to it, is much more extensible
@Dimchikkk
Copy link
Owner

bug: text_input example adds E when pressing enter on wasm
systems ordering issue

I had such bug in the past.... I remember overcoming it by some hacky solution for wasm

@bytemunch
Copy link
Collaborator Author

Yeah the fix is commented ( thank you :D ), I think it's being overridden with the ReadOnly component being removed too early.

@bytemunch
Copy link
Collaborator Author

Oof I thought I was going insane trying to find where I could've broken the enter fix, turns out it's broke on main too. Could be a browser update, winit update, I'm unsure.

@bytemunch bytemunch marked this pull request as ready for review November 1, 2023 19:25
@Dimchikkk
Copy link
Owner

oh, let me test it :D

@bytemunch bytemunch mentioned this pull request Nov 2, 2023
6 tasks
@Dimchikkk
Copy link
Owner

This is a bit unfortunate: #109 but hopefully we can fix it soonish :)

@Dimchikkk Dimchikkk merged commit 0bb15de into main Nov 2, 2023
4 checks passed
@Dimchikkk Dimchikkk deleted the render-refactor branch November 2, 2023 12:30
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