core: Make objects focusable by default
Since is_focusable has been moved to InteractiveObject, it may now return true by default, because non-interactive objects do not implement this method anymore.
This commit is contained in:
parent
5173fa4118
commit
47758e1fb3
|
@ -624,10 +624,6 @@ impl<'gc> TInteractiveObject<'gc> for Avm1Button<'gc> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_focusable(&self, _context: &mut UpdateContext<'_, 'gc>) -> bool {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
fn on_focus_changed(
|
fn on_focus_changed(
|
||||||
&self,
|
&self,
|
||||||
context: &mut UpdateContext<'_, 'gc>,
|
context: &mut UpdateContext<'_, 'gc>,
|
||||||
|
|
|
@ -824,10 +824,6 @@ impl<'gc> TInteractiveObject<'gc> for Avm2Button<'gc> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_focusable(&self, _context: &mut UpdateContext<'_, 'gc>) -> bool {
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
fn on_focus_changed(
|
fn on_focus_changed(
|
||||||
&self,
|
&self,
|
||||||
_context: &mut UpdateContext<'_, 'gc>,
|
_context: &mut UpdateContext<'_, 'gc>,
|
||||||
|
|
|
@ -2471,11 +2471,6 @@ impl<'gc> TInteractiveObject<'gc> for EditText<'gc> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_focusable(&self, _context: &mut UpdateContext<'_, 'gc>) -> bool {
|
|
||||||
// Even if this isn't selectable or editable, a script can focus on it manually.
|
|
||||||
true
|
|
||||||
}
|
|
||||||
|
|
||||||
fn on_focus_changed(
|
fn on_focus_changed(
|
||||||
&self,
|
&self,
|
||||||
context: &mut UpdateContext<'_, 'gc>,
|
context: &mut UpdateContext<'_, 'gc>,
|
||||||
|
|
|
@ -511,9 +511,10 @@ pub trait TInteractiveObject<'gc>:
|
||||||
MouseCursor::Hand
|
MouseCursor::Hand
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether this clip may be focusable for keyboard input.
|
/// Whether this object is focusable for keyboard input.
|
||||||
fn is_focusable(&self, _context: &mut UpdateContext<'_, 'gc>) -> bool {
|
fn is_focusable(&self, _context: &mut UpdateContext<'_, 'gc>) -> bool {
|
||||||
false
|
// By default, all interactive objects are focusable.
|
||||||
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Called whenever the focus tracker has deemed this display object worthy, or no longer worthy,
|
/// Called whenever the focus tracker has deemed this display object worthy, or no longer worthy,
|
||||||
|
|
Loading…
Reference in New Issue