forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Windows as Entities #1
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 tasks
Process flow:
|
Or
|
Current way the user interacts with windows:
|
Type inconsitencies: Cursor position
|
Weibye
force-pushed
the
windows-as-entities
branch
from
June 6, 2022 16:19
425a8be
to
f9b3c3e
Compare
Weibye
force-pushed
the
windows-as-entities
branch
from
June 6, 2022 19:12
f9b3c3e
to
b64d741
Compare
Weibye
pushed a commit
that referenced
this pull request
Aug 19, 2022
Rename fields to `window` & add some missing documentation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:WindowsCommandQueue
WindowCursor
WindowCursorPosition
WindowHandle
WindowPosition
WindowResizeConstraints
WindowResolution
WindowTitle
WindowPresentation
WindowModeComponent
WindowCurrentlyFocused
(marker) (WindowFocused is taken by a window event)WindowDecorated
(marker)WindowResizable
(marker)WindowDescriptor
componentWindow
marker confirming they have been created, queryAdded<Window>
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
WindowId
has been replaced byEntity
Window
has been split into multiple components:Window
(marker)WindowCursor
WindowCursorPosition
WindowHandle
WindowPresentation
WindowModeComponent
WindowPosition
WindowResolution
WindowTitle
WindowCanvas
WindowDecoraded
(marker)WindowCurrentlyFocused
(marker)WindowResizable
(marker)WindowTransparent
(marker)WindowMinimized
(marker)WindowMaximized
(marker)WindowCommandsExtensions
so that we cancommands.window(entity)
to getWindowCommands
ÈntityCommands
workenum WindowCommand
into separate structs that allimpl Command
Window
is now eiWindows
as this should now be accomplished by querying for entities with theWindow
marker component:Query<Entity, With<Window>>
Migration Guide