Closed
Conversation
25 tasks
Owner
Author
|
Process flow:
|
Owner
Author
Or
|
Owner
Author
|
Current way the user interacts with windows:
|
Owner
Author
|
Type inconsitencies: Cursor position
|
425a8be to
f9b3c3e
Compare
f9b3c3e to
b64d741
Compare
Weibye
pushed a commit
that referenced
this pull request
Aug 19, 2022
Rename fields to `window` & add some missing documentation
This file contains hidden or 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
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?
WindowIdis nowEntityCommandswith awindowmethod returnsWindowCommandssimilar to how the entity method returnsEntityCommands,WindowCommandQueuedwill implementCommandand onwritesend itself as an event that window backends likebevy_winitwill process.Windowshould be separated into different components:WindowsCommandQueueWindowCursorWindowCursorPositionWindowHandleWindowPositionWindowResizeConstraintsWindowResolutionWindowTitleWindowPresentationWindowModeComponentWindowCurrentlyFocused(marker) (WindowFocused is taken by a window event)WindowDecorated(marker)WindowResizable(marker)WindowDescriptorcomponentWindowmarker confirming they have been created, queryAdded<Window>or use aWindowCreatedevent to get newly created windows.PrimaryWindowcontains the entity id of initial window created byWindowPlugin,this replacesWindows::primaryPrimaryWindowresource when primary window has been createdPrimaryWindowwhen add_primary_window is false?WindowPluginshould change exit_on_close into a enum calledExitConditionwith the valuesOnPrimaryClosed(when primary window is closed),OnAllClosed(when all windows are closed),DontExit(keep app headless)Changelog
WindowIdhas been replaced byEntityWindowhas been split into multiple components:Window(marker)WindowCursorWindowCursorPositionWindowHandleWindowPresentationWindowModeComponentWindowPositionWindowResolutionWindowTitleWindowCanvasWindowDecoraded(marker)WindowCurrentlyFocused(marker)WindowResizable(marker)WindowTransparent(marker)WindowMinimized(marker)WindowMaximized(marker)WindowCommandsExtensionsso that we cancommands.window(entity)to getWindowCommandsÈntityCommandsworkenum WindowCommandinto separate structs that allimpl CommandWindowis now eiWindowsas this should now be accomplished by querying for entities with theWindowmarker component:Query<Entity, With<Window>>Migration Guide