Add rotation custom cursor icon for the transform cage

This commit is contained in:
Keavon Chambers
2022-11-05 23:02:21 -07:00
parent 782f528279
commit 3f98d1c896
6 changed files with 39 additions and 13 deletions

View File

@@ -34,6 +34,7 @@ pub enum MouseCursorIcon {
EWResize,
NESWResize,
NWSEResize,
Rotate,
}
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]

View File

@@ -1037,19 +1037,19 @@ fn node_section_node_graph_frame(node_graph_frame: &NodeGraphFrameLayer) -> Layo
layout: vec![
LayoutGroup::Row {
widgets: vec![WidgetHolder::new(Widget::TextLabel(TextLabel {
value: "Temporary layer that applies a greyscale to the layers below it.".into(),
value: "Temporary layer that applies a grayscale to the layers below it.".into(),
..TextLabel::default()
}))],
},
LayoutGroup::Row {
widgets: vec![WidgetHolder::new(Widget::TextLabel(TextLabel {
value: "Powered by the node graph :)".into(),
value: "Powered by the node graph! :)".into(),
..TextLabel::default()
}))],
},
LayoutGroup::Row {
widgets: vec![WidgetHolder::new(Widget::TextButton(TextButton {
label: "Open Node Graph UI (todo)".into(),
label: "Open Node Graph UI (coming soon)".into(),
tooltip: "Open the node graph associated with this layer".into(),
on_update: WidgetCallback::new(|_| DialogMessage::RequestComingSoonDialog { issue: Some(800) }.into()),
..Default::default()

View File

@@ -333,7 +333,7 @@ impl BoundingBoxOverlays {
_ => MouseCursorIcon::Default,
}
} else if rotate && self.check_rotate(input.mouse.position) {
MouseCursorIcon::Grabbing
MouseCursorIcon::Rotate
} else {
MouseCursorIcon::Default
}