forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Objective The window's cursor should be settable without having to implement a custom cursor icon solution. This will especially be helpful when creating user-interfaces that might like to use the cursor to denote some meaning (e.g., _clickable_, _resizable_, etc.). ## Solution Added a `CursorIcon` enum that maps one-to-one to winit's `CursorIcon` enum, as well as a method to set/get it for the given `Window`.
- Loading branch information
Showing
6 changed files
with
132 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/// The icon to display for a window's cursor | ||
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)] | ||
pub enum CursorIcon { | ||
Default, | ||
Crosshair, | ||
Hand, | ||
Arrow, | ||
Move, | ||
Text, | ||
Wait, | ||
Help, | ||
Progress, | ||
NotAllowed, | ||
ContextMenu, | ||
Cell, | ||
VerticalText, | ||
Alias, | ||
Copy, | ||
NoDrop, | ||
Grab, | ||
Grabbing, | ||
AllScroll, | ||
ZoomIn, | ||
ZoomOut, | ||
EResize, | ||
NResize, | ||
NeResize, | ||
NwResize, | ||
SResize, | ||
SeResize, | ||
SwResize, | ||
WResize, | ||
EwResize, | ||
NsResize, | ||
NeswResize, | ||
NwseResize, | ||
ColResize, | ||
RowResize, | ||
} |
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
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
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
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
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