avm1: Change cursor to arrow when the `enabled` property is set to false
This commit is contained in:
parent
81c8f040fa
commit
fff9cd1d63
|
@ -545,7 +545,7 @@ impl<'gc> TInteractiveObject<'gc> for Avm1Button<'gc> {
|
|||
}
|
||||
|
||||
fn mouse_cursor(self, _context: &mut UpdateContext<'_, 'gc, '_>) -> MouseCursor {
|
||||
if self.use_hand_cursor() {
|
||||
if self.use_hand_cursor() && self.enabled() {
|
||||
MouseCursor::Hand
|
||||
} else {
|
||||
MouseCursor::Arrow
|
||||
|
|
|
@ -805,6 +805,7 @@ impl<'gc> TInteractiveObject<'gc> for Avm2Button<'gc> {
|
|||
}
|
||||
|
||||
fn mouse_cursor(self, _context: &mut UpdateContext<'_, 'gc, '_>) -> MouseCursor {
|
||||
// TODO: Should we also need to check for the `enabled` property like AVM1 buttons?
|
||||
if self.use_hand_cursor() {
|
||||
MouseCursor::Hand
|
||||
} else {
|
||||
|
|
|
@ -2211,7 +2211,7 @@ impl<'gc> TInteractiveObject<'gc> for MovieClip<'gc> {
|
|||
}
|
||||
|
||||
fn mouse_cursor(self, context: &mut UpdateContext<'_, 'gc, '_>) -> MouseCursor {
|
||||
if self.use_hand_cursor() && self.is_button_mode(context) {
|
||||
if self.use_hand_cursor() && self.enabled() && self.is_button_mode(context) {
|
||||
MouseCursor::Hand
|
||||
} else {
|
||||
MouseCursor::Arrow
|
||||
|
|
|
@ -1235,6 +1235,7 @@ impl Player {
|
|||
if released_inside {
|
||||
// Released inside the clicked object.
|
||||
if let Some(down_object) = context.mouse_down_object {
|
||||
new_cursor = down_object.mouse_cursor(context);
|
||||
events.push((down_object, ClipEvent::Release));
|
||||
} else {
|
||||
events.push((context.stage.into(), ClipEvent::Release));
|
||||
|
|
Loading…
Reference in New Issue