Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
Windows as Entities
Solution
What solution would you like?
WindowId
is nowEntity
Commands
with awindow
method returnsWindowCommands
similar to how the entity method returnsEntityCommands,
WindowCommandQueued
will implementCommand
and onwrite
send itself as an event that window backends likebevy_winit
will process.Window
should be separated into different components:WindowCursor
WindowCursorPosition
WindowHandle
WindowPosition
WindowResizeConstraints
WindowResolution
WindowTitle
WindowCurrentlyFocused
(marker) (WindowFocused is taken by a window event)WindowDecorated
(marker)WindowResizable
(marker)Window
marker confirming they have been created, query Added or use aWindowCreated
event to get newly created windows.PrimaryWindow
contains the entity id of initial window created byWindowPlugin,
this replacesWindows::primary
PrimaryWindow
resource when primary window has been createdPrimaryWindow
when add_primary_window is false?WindowPlugin
should change exit_on_close into a enum calledExitCondition
with the valuesOnPrimaryClosed
(when primary window is closed),OnAllClosed
(when all windows are closed),DontExit
(keep app headless)Changelog
Migration Guide